summaryrefslogtreecommitdiff
path: root/libs/hwui/RenderNode.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2014-03-24 21:22:35 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2014-03-24 21:22:36 +0000
commit76c30ce3c1d8f1a818502aaea2c42c84d6bd3f92 (patch)
tree71377c48bf4ac068dfaf27443d725c5209d2208a /libs/hwui/RenderNode.cpp
parentf114a5c4d123af574dbae89befc3be61a01d1382 (diff)
parentb49f446c98096c4790a11d9b5bc83a4e585278c9 (diff)
Merge "Rework Outline API, remove isolatedZVolume remnants"
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
-rw-r--r--libs/hwui/RenderNode.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index e371590b8120..8aed857eb275 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -128,14 +128,14 @@ void RenderNode::outputViewProperties(const int level) {
flags |= SkCanvas::kClipToLayer_SaveFlag;
clipToBoundsNeeded = false; // clipping done by save layer
}
- ALOGD("%*sSaveLayerAlpha %.2f, %.2f, %.2f, %.2f, %d, 0x%x", level * 2, "",
- (float) 0, (float) 0, (float) properties().mRight - properties().mLeft, (float) properties().mBottom - properties().mTop,
+ ALOGD("%*sSaveLayerAlpha %d, %d, %d, %d, %d, 0x%x", level * 2, "",
+ 0, 0, properties().mWidth, properties().mHeight,
(int)(properties().mAlpha * 255), flags);
}
}
if (clipToBoundsNeeded) {
- ALOGD("%*sClipRect %.2f, %.2f, %.2f, %.2f", level * 2, "", 0.0f, 0.0f,
- (float) properties().mRight - properties().mLeft, (float) properties().mBottom - properties().mTop);
+ ALOGD("%*sClipRect %d, %d, %d, %d", level * 2, "",
+ 0, 0, properties().mWidth, properties().mHeight);
}
}
@@ -185,17 +185,20 @@ void RenderNode::setViewProperties(OpenGLRenderer& renderer, T& handler,
}
SaveLayerOp* op = new (handler.allocator()) SaveLayerOp(
- 0, 0, properties().mRight - properties().mLeft, properties().mBottom - properties().mTop, properties().mAlpha * 255, saveFlags);
+ 0, 0, properties().mWidth, properties().mHeight,
+ properties().mAlpha * 255, saveFlags);
handler(op, PROPERTY_SAVECOUNT, properties().mClipToBounds);
}
}
if (clipToBoundsNeeded) {
- ClipRectOp* op = new (handler.allocator()) ClipRectOp(0, 0,
- properties().mRight - properties().mLeft, properties().mBottom - properties().mTop, SkRegion::kIntersect_Op);
+ ClipRectOp* op = new (handler.allocator()) ClipRectOp(
+ 0, 0, properties().mWidth, properties().mHeight, SkRegion::kIntersect_Op);
handler(op, PROPERTY_SAVECOUNT, properties().mClipToBounds);
}
- if (CC_UNLIKELY(properties().mClipToOutline && !properties().mOutline.isEmpty())) {
- ClipPathOp* op = new (handler.allocator()) ClipPathOp(&properties().mOutline, SkRegion::kIntersect_Op);
+ if (CC_UNLIKELY(properties().mOutline.willClip())) {
+ // TODO: optimize RR case
+ ClipPathOp* op = new (handler.allocator()) ClipPathOp(properties().mOutline.getPath(),
+ SkRegion::kIntersect_Op);
handler(op, PROPERTY_SAVECOUNT, properties().mClipToBounds);
}
}
@@ -443,7 +446,7 @@ void RenderNode::iterate3dChildren(const Vector<ZDrawDisplayListOpPair>& zTransl
DisplayListOp* shadowOp = new (alloc) DrawShadowOp(
shadowMatrixXY, shadowMatrixZ,
- caster->properties().mAlpha, &(caster->properties().mOutline),
+ caster->properties().mAlpha, caster->properties().mOutline.getPath(),
caster->properties().mWidth, caster->properties().mHeight);
handler(shadowOp, PROPERTY_SAVECOUNT, properties().mClipToBounds);
}