summaryrefslogtreecommitdiffstats
path: root/include/gui
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2015-04-21 16:42:49 -0700
committerDan Stoza <stoza@google.com>2015-04-21 16:56:52 -0700
commitc62acbd12711ee6cff1ef94c146316dfe5169045 (patch)
tree5209ecbf7d22fe30e209eccec8631e98dfebea6f /include/gui
parentff5c1a6b677d8d25630ffc3d1a868eb98a38ceab (diff)
downloadframeworks_native-c62acbd12711ee6cff1ef94c146316dfe5169045.zip
frameworks_native-c62acbd12711ee6cff1ef94c146316dfe5169045.tar.gz
frameworks_native-c62acbd12711ee6cff1ef94c146316dfe5169045.tar.bz2
libgui: Fix CPU rendering on Surface
When the surface damage code went in, it incorrectly assumed that if an application was doing CPU rendering, it would be using lock and unlockAndPost instead of dequeue and queue, so it repurposed the dirty region too aggressively. This change keeps it from clobbering the dirty region if a CPU producer is attached. Bug: 20431815 Change-Id: Id4dfd71378311ea822f0289f6de2d20a7bd84014
Diffstat (limited to 'include/gui')
-rw-r--r--include/gui/Surface.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/gui/Surface.h b/include/gui/Surface.h
index 8217652..a9f78cf 100644
--- a/include/gui/Surface.h
+++ b/include/gui/Surface.h
@@ -298,12 +298,12 @@ private:
sp<GraphicBuffer> mPostedBuffer;
bool mConnectedToCpu;
- // In the lock/unlock context, this reflects the region that the producer
- // wished to update and whether the Surface was able to copy the previous
- // buffer back to allow a partial update.
+ // When a CPU producer is attached, this reflects the region that the
+ // producer wished to update as well as whether the Surface was able to copy
+ // the previous buffer back to allow a partial update.
//
- // In the dequeue/queue context, this reflects the surface damage (the
- // damage since the last frame) passed in by the producer.
+ // When a non-CPU producer is attached, this reflects the surface damage
+ // (the change since the previous frame) passed in by the producer.
Region mDirtyRegion;
};