Test: CtsGraphicsTestCases, CtsUiRenderingTestCases,
CtsRenderscriptTestCases
This is significantly faster than passing the Java object down and then
calling a JNI method to retrieve the pointer. See
https://buganizer.corp.google.com/issues/16656908#comment19
In some cases this changes what used to be native crashes (due to
android::BitmapWrapper:assertValid's LOG_ALWAYS_FATAL_IF) into
NullPointerExceptions (if a caller used a null Bitmap).
In addition:
- Remove unnecessary JNIEnv param from toBitmap(jlong)
- Change instances of toBitmap(JNIEnv*, jobject) to the above
- Replace calls to GraphicsJNI::getSkBitmap() to inline calls to
toBitmap/getSkBitmap
- make Canvas#nInitRaster @FastNative (FIXME: Could these be
@CriticalNative?)
Change-Id: I6194097be1b6e6952eba70e1e7052a5a250eed93
This CL should fix application startup regression for Vulkan
detected by "Hermetic Startup: EmptyActivity" test.
EGL drivers are loaded in a temp thread to leave more time
in RenderThread for other work. Loading EGL drivers
on the RenderThread may cause a perf regression.
Test: Ran cold-dropcache-test test.
Bug: 122659224
Bug: 123361175
Change-Id: I8ca818e98fac196a41d079be15594caca5cb1bab
Previously setColorMode must be called before view is set, and has no effect
after that. The state of WCG on Android when this patch was written, was that
most hardware out there can not handle mixed color spaces composition well
which results in GPU composition. And this situation will remain true for a
long time.
Despite photography applications want to have WCG, it's a power cost especially
during video playback. In order to mitigate this fact and the desire to move
the ecosystem forward in WCG, we make setColorMode togglable such that in the
next app vsync, when color mode is changed we issue a surface update which
results in the old EGLSurface or VkSurface being destroyed and new EGLSurface
or VkSurface being created with the target color space being set. As a result,
applications can now togglable WCG on/off.
BUG: 120288123
Test: Build, flash and boot. Verify with SurfaceFlinger dumpsys on demo app.
Change-Id: I09bf8c380a01f4dde364873d37b248cedc6ccfd3
Split out the View/ViewRootImpl bits from the
hardware rendering bits.
Create a potential public API surface for
hardware rendering
Bug: 112709971
Test: builds & boots
Change-Id: I9e6f44b07a170574a905f42338282c4bb7e95f56