Loading libs/hwui/renderthread/CanvasContext.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -476,7 +476,7 @@ void CanvasContext::draw() { // metrics the frame was swapped at this point mCurrentFrameInfo->markSwapBuffers(); if (drew) { if (drew || mEglManager.damageRequiresSwap()) { if (CC_UNLIKELY(!mEglManager.swapBuffers(frame, screenDirty))) { setSurface(nullptr); } Loading libs/hwui/renderthread/EglManager.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -324,6 +324,10 @@ void EglManager::damageFrame(const Frame& frame, const SkRect& dirty) { #endif } bool EglManager::damageRequiresSwap() { return EglExtensions.setDamage && mSwapBehavior == SwapBehavior::BufferAge; } bool EglManager::swapBuffers(const Frame& frame, const SkRect& screenDirty) { if (CC_UNLIKELY(Properties::waitForGpuCompletion)) { Loading libs/hwui/renderthread/EglManager.h +4 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,10 @@ public: bool makeCurrent(EGLSurface surface, EGLint* errOut = nullptr); Frame beginFrame(EGLSurface surface); void damageFrame(const Frame& frame, const SkRect& dirty); // If this returns true it is mandatory that swapBuffers is called // if damageFrame is called without subsequent calls to damageFrame(). // See EGL_KHR_partial_update for more information bool damageRequiresSwap(); bool swapBuffers(const Frame& frame, const SkRect& screenDirty); // Returns true iff the surface is now preserving buffers. Loading Loading
libs/hwui/renderthread/CanvasContext.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -476,7 +476,7 @@ void CanvasContext::draw() { // metrics the frame was swapped at this point mCurrentFrameInfo->markSwapBuffers(); if (drew) { if (drew || mEglManager.damageRequiresSwap()) { if (CC_UNLIKELY(!mEglManager.swapBuffers(frame, screenDirty))) { setSurface(nullptr); } Loading
libs/hwui/renderthread/EglManager.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -324,6 +324,10 @@ void EglManager::damageFrame(const Frame& frame, const SkRect& dirty) { #endif } bool EglManager::damageRequiresSwap() { return EglExtensions.setDamage && mSwapBehavior == SwapBehavior::BufferAge; } bool EglManager::swapBuffers(const Frame& frame, const SkRect& screenDirty) { if (CC_UNLIKELY(Properties::waitForGpuCompletion)) { Loading
libs/hwui/renderthread/EglManager.h +4 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,10 @@ public: bool makeCurrent(EGLSurface surface, EGLint* errOut = nullptr); Frame beginFrame(EGLSurface surface); void damageFrame(const Frame& frame, const SkRect& dirty); // If this returns true it is mandatory that swapBuffers is called // if damageFrame is called without subsequent calls to damageFrame(). // See EGL_KHR_partial_update for more information bool damageRequiresSwap(); bool swapBuffers(const Frame& frame, const SkRect& screenDirty); // Returns true iff the surface is now preserving buffers. Loading