Skip to content
Commit 4d3df820 authored by Derek Sollenberger's avatar Derek Sollenberger
Browse files

Add filtering and directSampling features for BitmapShader

This adds filterMode directly to BitmapShader's public API
which allows users to override the global flag on the paint
or for BitmapShaders used in a RuntimeShader this provides
some explicit control over how the hardware will sample.

Addtionally BitmapShader adds an internal directSampling API
that is exposed only for RuntimeShader via the setInputBuffer
API. Previously, if you want to sample the unaltered contents
of a bitmap you must ensure that the bitmaps contents have the
same format (premul, colorspace, etc) of the destination. This
API enables you to do so without knowledge of the destination
format. This is necessary for use cases where the bitmap content
is data like a normal map or lighting values.

Bug: 189102731
Bug: 201546136
Test: atest CtsGraphicsTestCases:BitmapShaderTest
Test: atest CtsUiRenderingTestCases:RuntimeShaderTests
Change-Id: I8e9eaa8fae1d3ff45ab8c98b3878bb9da24dac47
parent 265aab13
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment