DO NOT MERGE ANYWHERE Revert "DO NOT MERGE ANYWHERE libhwui: make setSurface asynchronous"
This reverts commit 80e6d8873b79ced40e79fcba0bf793ea6528d20c.
Bug: 32771832
Change-Id: Ia2f2ffd08dfd87cbce1ec750d6b61277799b536f
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 57e5832..4cf8b15 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -110,11 +110,12 @@
mSwapBehavior = swapBehavior;
}
-void CanvasContext::initialize(ANativeWindow* window) {
+bool CanvasContext::initialize(ANativeWindow* window) {
setSurface(window);
- if (mCanvas) return;
+ if (mCanvas) return false;
mCanvas = new OpenGLRenderer(mRenderThread.renderState());
mCanvas->initProperties();
+ return true;
}
void CanvasContext::updateSurface(ANativeWindow* window) {