Enable RenderEngine context switching to be async.
Also in the case of a threaded RenderEngine we can avoid the
thread hop entirely by quickly returning if the GPU is already
in the correct state.
Bug: 192099706
Test: atest librenderengine_test
Change-Id: I316096ffd89960a1d3742edacdeb442626e9ee3e
diff --git a/libs/renderengine/skia/SkiaGLRenderEngine.h b/libs/renderengine/skia/SkiaGLRenderEngine.h
index b30355b..a852bbc 100644
--- a/libs/renderengine/skia/SkiaGLRenderEngine.h
+++ b/libs/renderengine/skia/SkiaGLRenderEngine.h
@@ -64,7 +64,7 @@
int getContextPriority() override;
bool isProtected() const override { return mInProtectedContext; }
bool supportsProtectedContent() const override;
- bool useProtectedContext(bool useProtectedContext) override;
+ void useProtectedContext(bool useProtectedContext) override;
bool supportsBackgroundBlur() override { return mBlurFilter != nullptr; }
void assertShadersCompiled(int numShaders) override;
void onPrimaryDisplaySizeChanged(ui::Size size) override;