summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DeferredDisplayList.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-12-17 11:10:28 -0800
committerChris Craik <ccraik@google.com>2014-12-17 11:21:02 -0800
commitef8d6f272ae451aaedb0f02249c0f9f0576efdf3 (patch)
tree693f1a191c5a8704a55fc13360eab56e9db01fb3 /libs/hwui/DeferredDisplayList.cpp
parent596d4e7230ae1858aaafbae7987e46d65181f1bd (diff)
downloadframeworks_base-ef8d6f272ae451aaedb0f02249c0f9f0576efdf3.zip
frameworks_base-ef8d6f272ae451aaedb0f02249c0f9f0576efdf3.tar.gz
frameworks_base-ef8d6f272ae451aaedb0f02249c0f9f0576efdf3.tar.bz2
Revert overdraw avoidance visualization change
bug:18787324 Partial revert of 23d307c8d88f4a3849163b9e5b7cd11d0d4f372c. Change-Id: Ic8b91b046707fc5b8fa53c35ea7b37bb19c3c943
Diffstat (limited to 'libs/hwui/DeferredDisplayList.cpp')
-rw-r--r--libs/hwui/DeferredDisplayList.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/hwui/DeferredDisplayList.cpp b/libs/hwui/DeferredDisplayList.cpp
index fab4a1a..a998594 100644
--- a/libs/hwui/DeferredDisplayList.cpp
+++ b/libs/hwui/DeferredDisplayList.cpp
@@ -525,7 +525,7 @@ void DeferredDisplayList::addDrawOp(OpenGLRenderer& renderer, DrawOp* op) {
deferInfo.mergeable &= !recordingComplexClip();
deferInfo.opaqueOverBounds &= !recordingComplexClip() && mSaveStack.isEmpty();
- if (mBatches.size() &&
+ if (CC_LIKELY(mAvoidOverdraw) && mBatches.size() &&
state->mClipSideFlags != kClipSide_ConservativeFull &&
deferInfo.opaqueOverBounds && state->mBounds.contains(mBounds)) {
// avoid overdraw by resetting drawing state + discarding drawing ops
@@ -677,12 +677,13 @@ status_t DeferredDisplayList::flush(OpenGLRenderer& renderer, Rect& dirty) {
DrawModifiers restoreDrawModifiers = renderer.getDrawModifiers();
renderer.save(SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag);
- for (unsigned int i = 1; i < mBatches.size(); i++) {
- if (mBatches[i] && mBatches[i]->coversBounds(mBounds)) {
- discardDrawingBatches(i - 1);
+ if (CC_LIKELY(mAvoidOverdraw)) {
+ for (unsigned int i = 1; i < mBatches.size(); i++) {
+ if (mBatches[i] && mBatches[i]->coversBounds(mBounds)) {
+ discardDrawingBatches(i - 1);
+ }
}
}
-
// NOTE: depth of the save stack at this point, before playback, should be reflected in
// FLUSH_SAVE_STACK_DEPTH, so that save/restores match up correctly
status |= replayBatchList(mBatches, renderer, dirty);