Clean up and fix skia-RenderEngine tests
Skia-RenderEngine tests were accidentally exercising solely
GLESRenderEngine, so the wrong backend was being used. This patch:
* Correctly enables Skia-Renderengine tests
* Adds a downcasted pointer to GLESRenderEngine to access test-only
methods so that there's no loss of test coverage
* Disables Skia tests that rely on those GLES-specific test-only
methods, since those tests were behavior-specific anyways
* Correctly destroy the Skia RenderEngine instance
* Add fixes for the remaining failing tests. Fixes include:
** Fix SkImage caching to...actually cache
** Forcing the opaque bit must occur on the SkShader, rather than on the
SkColorFilter, so that the alpha channel is not sampled when computing
the src colors.
** When only a color transform is applied but color management is
enabled, converting between RGB primaries and linear XYZ reduces down to
an identity matrix, which avoids clamping artifacts in the shader.
** Apply source dataspace properly when there are solid colors
** Support for black clearRegions for SurfaceView
Bug: 173416417
Test: librenderengine_test
Change-Id: I530441a80039c7807931985665892017e4c48e76
diff --git a/libs/renderengine/tests/Android.bp b/libs/renderengine/tests/Android.bp
index bcf389b..51c7028 100644
--- a/libs/renderengine/tests/Android.bp
+++ b/libs/renderengine/tests/Android.bp
@@ -14,17 +14,21 @@
cc_test {
name: "librenderengine_test",
- defaults: ["surfaceflinger_defaults"],
+ defaults: ["skia_deps", "surfaceflinger_defaults"],
test_suites: ["device-tests"],
srcs: [
"RenderEngineTest.cpp",
"RenderEngineThreadedTest.cpp",
],
+ include_dirs: [
+ "external/skia/src/gpu",
+ ],
static_libs: [
"libgmock",
"librenderengine",
"librenderengine_mocks",
],
+
shared_libs: [
"libbase",
"libcutils",