summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-09-02 17:34:21 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-02 17:34:21 -0700
commitd21f22e2c07d61bf15ee3af91869901adb6f0cde (patch)
tree5277acb7de48541f5a39f57f3017a69b3ecfcec3 /core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp
parent6296f2d501e2749d98e890ed722f923ee584c9ca (diff)
downloadpdfium-d21f22e2c07d61bf15ee3af91869901adb6f0cde.tar.xz
Make CPDF_ClipPath have a CPDF_ClipPathData rather than inheriting.
Make Data private to the ClipPath class which manages it transparently for its callers. This prevents the callers from having to remember to make a copy before dirtying the shared data, since the operations that modify state will do this under the covers for us. Review-Url: https://codereview.chromium.org/2301263003
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp')
-rw-r--r--core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp b/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp
index d869bc20b3..03dd22c134 100644
--- a/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp
@@ -35,10 +35,9 @@ CPDF_PageObject::Type CPDF_ShadingObject::GetType() const {
}
void CPDF_ShadingObject::Transform(const CFX_Matrix& matrix) {
- if (m_ClipPath) {
- m_ClipPath.GetPrivateCopy();
+ if (m_ClipPath)
m_ClipPath.Transform(matrix);
- }
+
m_Matrix.Concat(matrix);
if (m_ClipPath) {
CalcBoundingBox();