summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DisplayListOp.h
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-05-21 13:03:52 -0700
committerChris Craik <ccraik@google.com>2014-05-21 13:04:10 -0700
commit61317325b7b4b4ffafd9400ab5966e8d7c67df2e (patch)
tree314290dd297344c3b8eb62030deef402067e6233 /libs/hwui/DisplayListOp.h
parentd6a91b0bb64b17dcf4ae635f428dfd4ad310f73e (diff)
downloadframeworks_base-61317325b7b4b4ffafd9400ab5966e8d7c67df2e.zip
frameworks_base-61317325b7b4b4ffafd9400ab5966e8d7c67df2e.tar.gz
frameworks_base-61317325b7b4b4ffafd9400ab5966e8d7c67df2e.tar.bz2
Disable shadow drawing for empty/null outlines
Change-Id: I60d0f326cfab97d88c49d17cf32e619b5e60b94a
Diffstat (limited to 'libs/hwui/DisplayListOp.h')
-rw-r--r--libs/hwui/DisplayListOp.h34
1 files changed, 10 insertions, 24 deletions
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h
index f1d70eb..e4867220 100644
--- a/libs/hwui/DisplayListOp.h
+++ b/libs/hwui/DisplayListOp.h
@@ -1547,32 +1547,23 @@ class DrawShadowOp : public DrawOp {
public:
DrawShadowOp(const mat4& transformXY, const mat4& transformZ,
float casterAlpha, bool casterUnclipped,
- float fallbackWidth, float fallbackHeight,
- const SkPath* outline, const SkPath* revealClip)
+ const SkPath* casterOutline, const SkPath* revealClip)
: DrawOp(NULL), mTransformXY(transformXY), mTransformZ(transformZ),
- mCasterAlpha(casterAlpha), mCasterUnclipped(casterUnclipped),
- mFallbackWidth(fallbackWidth), mFallbackHeight(fallbackHeight),
- mOutline(outline), mRevealClip(revealClip) {}
-
- virtual status_t applyDraw(OpenGLRenderer& renderer, Rect& dirty) {
- SkPath casterPerimeter;
- if (!mOutline || mOutline->isEmpty()) {
- casterPerimeter.addRect(0, 0, mFallbackWidth, mFallbackHeight);
- } else {
- casterPerimeter = *mOutline;
- }
-
- if (mRevealClip) {
+ mCasterAlpha(casterAlpha), mCasterUnclipped(casterUnclipped) {
+ mOutline = *casterOutline;
+ if (revealClip) {
// intersect the outline with the convex reveal clip
- Op(casterPerimeter, *mRevealClip, kIntersect_PathOp, &casterPerimeter);
+ Op(mOutline, *revealClip, kIntersect_PathOp, &mOutline);
}
+ }
+ virtual status_t applyDraw(OpenGLRenderer& renderer, Rect& dirty) {
return renderer.drawShadow(mTransformXY, mTransformZ,
- mCasterAlpha, mCasterUnclipped, &casterPerimeter);
+ mCasterAlpha, mCasterUnclipped, &mOutline);
}
virtual void output(int level, uint32_t logFlags) const {
- OP_LOG("DrawShadow of outline %p", mOutline);
+ OP_LOGS("DrawShadow");
}
virtual const char* name() { return "DrawShadow"; }
@@ -1582,12 +1573,7 @@ private:
const mat4 mTransformZ;
const float mCasterAlpha;
const bool mCasterUnclipped;
- const float mFallbackWidth;
- const float mFallbackHeight;
-
- // these point at convex SkPaths owned by RenderProperties, or null
- const SkPath* mOutline;
- const SkPath* mRevealClip;
+ SkPath mOutline;
};
class DrawLayerOp : public DrawOp {