diff options
author | Chris Craik <ccraik@google.com> | 2015-12-15 19:17:32 -0800 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2015-12-16 10:20:41 -0800 |
commit | adfeec94560c6661c5e6600b10c05f34a40f6454 (patch) | |
tree | ff36367c650761dcf27fb4991851acfd9d6a4939 /libs/hwui/renderthread/CanvasContext.cpp | |
parent | 20754c5a112e418c11cc88176283db2c4bf2efd6 (diff) |
Allow RT animation of new renderer
Change-Id: I60136dc080dc4fd853ac8c3d37fefa85da1181df
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index ca85dfbf1bab..0620653371a6 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -513,9 +513,11 @@ void CanvasContext::draw() { // 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); } |