Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1068)

Unified Diff: third_party/WebKit/Source/platform/graphics/GradientGeneratedImage.cpp

Issue 2007553002: Retire setGradientSpaceTransform, setPatternSpaceTransform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more expectations Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/GradientGeneratedImage.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GradientGeneratedImage.cpp b/third_party/WebKit/Source/platform/graphics/GradientGeneratedImage.cpp
index ad589a5ae9691cce390ed83ec5e9286cd32ea032..51e3a2d244f3a59b469e405026f6e9921700273a 100644
--- a/third_party/WebKit/Source/platform/graphics/GradientGeneratedImage.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GradientGeneratedImage.cpp
@@ -57,21 +57,8 @@ void GradientGeneratedImage::drawTile(GraphicsContext& context, const FloatRect&
bool GradientGeneratedImage::applyShader(SkPaint& paint, const SkMatrix* localMatrix)
{
- AffineTransform transform;
- if (localMatrix) {
- transform.setMatrix(
- localMatrix->getScaleX(), localMatrix->getSkewY(),
- localMatrix->getSkewX(), localMatrix->getScaleY(),
- localMatrix->getTranslateX(), localMatrix->getTranslateY());
- }
-
DCHECK(m_gradient);
- // TODO(fmalita): remove the transform from gradient/pattern state, and pass the matrix to
- // applyToPaint if needed.
- const AffineTransform previousTransform = m_gradient->gradientSpaceTransform();
- m_gradient->setGradientSpaceTransform(transform);
- m_gradient->applyToPaint(paint);
- m_gradient->setGradientSpaceTransform(previousTransform);
+ m_gradient->applyToPaint(paint, localMatrix);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698