Skip to content

Commit

Permalink
Sets the default for robolectric.pixelCopyRenderMode to hardware.
Browse files Browse the repository at this point in the history
This makes all new calls to HardwareRenderingScreenshot use
hardware rendering.

PiperOrigin-RevId: 657645123
  • Loading branch information
JuliaSullivanGoogle authored and copybara-github committed Jul 30, 2024
1 parent f1044df commit 17437ec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private HardwareRenderingScreenshot() {}
*/
static boolean canTakeScreenshot(View view) {
return RuntimeEnvironment.getApiLevel() >= P
&& "hardware".equalsIgnoreCase(System.getProperty(PIXEL_COPY_RENDER_MODE, ""))
&& "hardware".equalsIgnoreCase(System.getProperty(PIXEL_COPY_RENDER_MODE, "hardware"))
&& ShadowView.useRealGraphics()
&& view.canHaveDisplayList();
}
Expand Down

0 comments on commit 17437ec

Please sign in to comment.