summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DisplayListRenderer.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2013-09-11 16:23:37 -0700
committerChris Craik <ccraik@google.com>2013-09-12 13:33:01 -0700
commitc1c5f0870282b56dafe5a4d756e4b9e6884655a7 (patch)
treeb8fb332db36986d9548a862d5dfa218c0e637e58 /libs/hwui/DisplayListRenderer.cpp
parentb8b017cb6879352aee015ba24e9bfd05cc094e74 (diff)
downloadframeworks_base-c1c5f0870282b56dafe5a4d756e4b9e6884655a7.zip
frameworks_base-c1c5f0870282b56dafe5a4d756e4b9e6884655a7.tar.gz
frameworks_base-c1c5f0870282b56dafe5a4d756e4b9e6884655a7.tar.bz2
Move DeferredDisplayState out of ops
bug:9969358 Instead of storing DeferredDisplayState within an op (thus forcing ops to be tied to a single state instance), associate each op with a new state at DeferredDisplayList insertion time. Now, DisplayLists (and the ops within) can be reused in a single DeferredDisplayList draw call, as ops will use different state instances at different points in the frame. Change-Id: I525ab2abe0c3883679f2fa00b219b293e9ec53d9
Diffstat (limited to 'libs/hwui/DisplayListRenderer.cpp')
-rw-r--r--libs/hwui/DisplayListRenderer.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index 90dcf93..8866029 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -505,17 +505,12 @@ void DisplayListRenderer::addStateOp(StateOp* op) {
void DisplayListRenderer::addDrawOp(DrawOp* op) {
Rect localBounds;
- if (mDrawModifiers.mHasShadow) {
- op->state.mDrawModifiers = mDrawModifiers;
- }
- if (op->getLocalBounds(localBounds)) {
+ if (op->getLocalBounds(mDrawModifiers, localBounds)) {
bool rejected = quickRejectNoScissor(localBounds.left, localBounds.top,
localBounds.right, localBounds.bottom);
op->setQuickRejected(rejected);
}
- if (mDrawModifiers.mHasShadow) {
- op->state.mDrawModifiers.reset();
- }
+
mHasDrawOps = true;
addOpInternal(op);
}