+6
−0
+9
−4
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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