Allow RT animation of new renderer
Change-Id: I60136dc080dc4fd853ac8c3d37fefa85da1181df
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index ca85dfb..0620653 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -513,9 +513,11 @@
// Called by choreographer to do an RT-driven animation
void CanvasContext::doFrame() {
- if (CC_UNLIKELY(!mCanvas || mEglSurface == EGL_NO_SURFACE)) {
- return;
- }
+#if HWUI_NEW_OPS
+ if (CC_UNLIKELY(mEglSurface == EGL_NO_SURFACE)) return;
+#else
+ if (CC_UNLIKELY(!mCanvas || mEglSurface == EGL_NO_SURFACE)) return;
+#endif
prepareAndDraw(nullptr);
}