Cleanup initialization of GrContext.
Update GrContext options and setup the cache sizes to be based on
the size of the display and not the current default value of 255MB.
Test: atest librenderengine_test
Bug: 183391755
Change-Id: I5be8d6fc54c31f0e2d1c44968284ad772866d6ab
diff --git a/libs/renderengine/skia/SkiaGLRenderEngine.h b/libs/renderengine/skia/SkiaGLRenderEngine.h
index 7605df9..25557f1 100644
--- a/libs/renderengine/skia/SkiaGLRenderEngine.h
+++ b/libs/renderengine/skia/SkiaGLRenderEngine.h
@@ -65,6 +65,7 @@
bool useProtectedContext(bool useProtectedContext) override;
bool supportsBackgroundBlur() override { return mBlurFilter != nullptr; }
void assertShadersCompiled(int numShaders) override;
+ void onPrimaryDisplaySizeChanged(ui::Size size) override;
protected:
void dump(std::string& result) override;
@@ -109,6 +110,7 @@
EGLSurface mProtectedPlaceholderSurface;
BlurFilter* mBlurFilter = nullptr;
+ const PixelFormat mDefaultPixelFormat;
const bool mUseColorManagement;
// Cache of GL textures that we'll store per GraphicBuffer ID