diff options
Diffstat (limited to 'libs/hwui/RenderProperties.cpp')
-rw-r--r-- | libs/hwui/RenderProperties.cpp | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/libs/hwui/RenderProperties.cpp b/libs/hwui/RenderProperties.cpp index 99de1fc..5f7d4e3 100644 --- a/libs/hwui/RenderProperties.cpp +++ b/libs/hwui/RenderProperties.cpp @@ -50,14 +50,11 @@ RenderProperties::PrimitiveFields::PrimitiveFields() } RenderProperties::ComputedFields::ComputedFields() - : mTransformMatrix(NULL) - , mClipPath(NULL) - , mClipPathOp(SkRegion::kIntersect_Op) { + : mTransformMatrix(NULL) { } RenderProperties::ComputedFields::~ComputedFields() { delete mTransformMatrix; - delete mClipPath; } RenderProperties::RenderProperties() @@ -77,9 +74,6 @@ RenderProperties& RenderProperties::operator=(const RenderProperties& other) { setAnimationMatrix(other.getAnimationMatrix()); setCameraDistance(other.getCameraDistance()); - // Update the computed clip path - updateClipPath(); - // Force recalculation of the matrix, since other's dirty bit may be clear mPrimitiveFields.mMatrixOrPivotDirty = true; updateMatrix(); @@ -166,39 +160,5 @@ void RenderProperties::updateMatrix() { } } -void RenderProperties::updateClipPath() { - const SkPath* outlineClipPath = mPrimitiveFields.mOutline.willClip() - ? mPrimitiveFields.mOutline.getPath() : NULL; - const SkPath* revealClipPath = mPrimitiveFields.mRevealClip.getPath(); - - if (!outlineClipPath && !revealClipPath) { - // mComputedFields.mClipPath doesn't need to be updated, since it won't be used - return; - } - - if (mComputedFields.mClipPath == NULL) { - mComputedFields.mClipPath = new SkPath(); - } - SkPath* clipPath = mComputedFields.mClipPath; - mComputedFields.mClipPathOp = SkRegion::kIntersect_Op; - - if (outlineClipPath && revealClipPath) { - SkPathOp op = kIntersect_PathOp; - if (mPrimitiveFields.mRevealClip.isInverseClip()) { - op = kDifference_PathOp; // apply difference step in the Op below, instead of draw time - } - - Op(*outlineClipPath, *revealClipPath, op, clipPath); - } else if (outlineClipPath) { - *clipPath = *outlineClipPath; - } else { - *clipPath = *revealClipPath; - if (mPrimitiveFields.mRevealClip.isInverseClip()) { - // apply difference step at draw time - mComputedFields.mClipPathOp = SkRegion::kDifference_Op; - } - } -} - } /* namespace uirenderer */ } /* namespace android */ |