Loading core/jni/android_view_Surface.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -324,7 +324,7 @@ static jobject Surface_lockCanvas(JNIEnv* env, jobject clazz, jobject dirtyRect) SkRegion clipReg; if (dirtyRegion.isRect()) { // very common case const Rect& b(dirtyRegion.getBounds()); const Rect b(dirtyRegion.getBounds()); clipReg.setRect(b.left, b.top, b.right, b.bottom); } else { size_t count; Loading include/surfaceflinger/Surface.h +1 −1 Original line number Diff line number Diff line Loading @@ -250,7 +250,7 @@ private: sp<GraphicBuffer> mLockedBuffer; sp<GraphicBuffer> mPostedBuffer; mutable Region mOldDirtyRegion; bool mNeedFullUpdate; bool mReserved; // query() must be called from dequeueBuffer() thread uint32_t mWidth; Loading libs/surfaceflinger/Layer.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -540,10 +540,16 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions) mFlinger->signalEvent(); } if (!mPostedDirtyRegion.isEmpty()) { /* a buffer was posted, so we need to call reloadTexture(), which * will update our internal data structures (eg: EGLImageKHR or * texture names). we need to do this even if mPostedDirtyRegion is * empty -- it's orthogonal to the fact that a new buffer was posted, * for instance, a degenerate case could be that the user did an empty * update but repainted the buffer with appropriate content (after a * resize for instance). */ reloadTexture( mPostedDirtyRegion ); } } void Layer::unlockPageFlip( const Transform& planeTransform, Region& outDirtyRegion) Loading libs/surfaceflinger/LayerBase.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ LayerBase::LayerBase(SurfaceFlinger* flinger, DisplayID display) mOrientation(0), mLeft(0), mTop(0), mTransactionFlags(0), mPremultipliedAlpha(true), mDebug(false), mPremultipliedAlpha(true), mName("unnamed"), mDebug(false), mInvalidate(0) { const DisplayHardware& hw(flinger->graphicPlane(0).displayHardware()); Loading libs/surfaceflinger_client/SharedBufferStack.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -84,10 +84,14 @@ status_t SharedBufferStack::setDirtyRegion(int buffer, const Region& dirty) if (uint32_t(buffer) >= NUM_BUFFER_MAX) return BAD_INDEX; // in the current implementation we only send a single rectangle FlatRegion& reg(buffers[buffer].dirtyRegion); if (dirty.isEmpty()) { reg.count = 0; return NO_ERROR; } size_t count; Rect const* r = dirty.getArray(&count); FlatRegion& reg(buffers[buffer].dirtyRegion); if (count > FlatRegion::NUM_RECT_MAX) { const Rect bounds(dirty.getBounds()); reg.count = 1; Loading Loading
core/jni/android_view_Surface.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -324,7 +324,7 @@ static jobject Surface_lockCanvas(JNIEnv* env, jobject clazz, jobject dirtyRect) SkRegion clipReg; if (dirtyRegion.isRect()) { // very common case const Rect& b(dirtyRegion.getBounds()); const Rect b(dirtyRegion.getBounds()); clipReg.setRect(b.left, b.top, b.right, b.bottom); } else { size_t count; Loading
include/surfaceflinger/Surface.h +1 −1 Original line number Diff line number Diff line Loading @@ -250,7 +250,7 @@ private: sp<GraphicBuffer> mLockedBuffer; sp<GraphicBuffer> mPostedBuffer; mutable Region mOldDirtyRegion; bool mNeedFullUpdate; bool mReserved; // query() must be called from dequeueBuffer() thread uint32_t mWidth; Loading
libs/surfaceflinger/Layer.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -540,10 +540,16 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions) mFlinger->signalEvent(); } if (!mPostedDirtyRegion.isEmpty()) { /* a buffer was posted, so we need to call reloadTexture(), which * will update our internal data structures (eg: EGLImageKHR or * texture names). we need to do this even if mPostedDirtyRegion is * empty -- it's orthogonal to the fact that a new buffer was posted, * for instance, a degenerate case could be that the user did an empty * update but repainted the buffer with appropriate content (after a * resize for instance). */ reloadTexture( mPostedDirtyRegion ); } } void Layer::unlockPageFlip( const Transform& planeTransform, Region& outDirtyRegion) Loading
libs/surfaceflinger/LayerBase.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ LayerBase::LayerBase(SurfaceFlinger* flinger, DisplayID display) mOrientation(0), mLeft(0), mTop(0), mTransactionFlags(0), mPremultipliedAlpha(true), mDebug(false), mPremultipliedAlpha(true), mName("unnamed"), mDebug(false), mInvalidate(0) { const DisplayHardware& hw(flinger->graphicPlane(0).displayHardware()); Loading
libs/surfaceflinger_client/SharedBufferStack.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -84,10 +84,14 @@ status_t SharedBufferStack::setDirtyRegion(int buffer, const Region& dirty) if (uint32_t(buffer) >= NUM_BUFFER_MAX) return BAD_INDEX; // in the current implementation we only send a single rectangle FlatRegion& reg(buffers[buffer].dirtyRegion); if (dirty.isEmpty()) { reg.count = 0; return NO_ERROR; } size_t count; Rect const* r = dirty.getArray(&count); FlatRegion& reg(buffers[buffer].dirtyRegion); if (count > FlatRegion::NUM_RECT_MAX) { const Rect bounds(dirty.getBounds()); reg.count = 1; Loading