summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DisplayListRenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/DisplayListRenderer.cpp')
-rw-r--r--libs/hwui/DisplayListRenderer.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index 8866029..19a027d 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -111,6 +111,7 @@ DisplayList* DisplayListRenderer::getDisplayList(DisplayList* displayList) {
} else {
displayList->initFromDisplayListRenderer(*this, true);
}
+ // TODO: should just avoid setting the DisplayList's DisplayListData
displayList->setRenderable(mHasDrawOps);
return displayList;
}
@@ -120,7 +121,8 @@ bool DisplayListRenderer::isDeferred() {
}
void DisplayListRenderer::setViewport(int width, int height) {
- mOrthoMatrix.loadOrtho(0, width, height, 0, -1, 1);
+ // TODO: DisplayListRenderer shouldn't have a projection matrix, as it should never be used
+ mViewProjMatrix.loadOrtho(0, width, height, 0, -1, 1);
mWidth = width;
mHeight = height;
@@ -248,7 +250,10 @@ status_t DisplayListRenderer::drawDisplayList(DisplayList* displayList,
// resources cache, but we rely on the caller (UI toolkit) to
// do the right thing for now
- addDrawOp(new (alloc()) DrawDisplayListOp(displayList, flags));
+ DrawDisplayListOp* op = new (alloc()) DrawDisplayListOp(displayList, flags, currentTransform());
+ addDrawOp(op);
+ mDisplayListData->children.push(op);
+
return DrawGlInfo::kStatusDone;
}
@@ -506,7 +511,7 @@ void DisplayListRenderer::addStateOp(StateOp* op) {
void DisplayListRenderer::addDrawOp(DrawOp* op) {
Rect localBounds;
if (op->getLocalBounds(mDrawModifiers, localBounds)) {
- bool rejected = quickRejectNoScissor(localBounds.left, localBounds.top,
+ bool rejected = quickRejectConservative(localBounds.left, localBounds.top,
localBounds.right, localBounds.bottom);
op->setQuickRejected(rejected);
}