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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasStyle.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/modules/canvas2d/CanvasStyle.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp
index b777d979a412c65868f7df82b68a3a9281b6cb8f..ca3fd2f901e9e8769a2a1bd2339eaf0e8792b209 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp
@@ -34,6 +34,7 @@
#include "core/html/HTMLCanvasElement.h"
#include "modules/canvas2d/CanvasGradient.h"
#include "modules/canvas2d/CanvasPattern.h"
+#include "platform/graphics/skia/SkiaUtils.h"
#include "third_party/skia/include/core/SkShader.h"
#include "wtf/PassRefPtr.h"
@@ -119,8 +120,10 @@ void CanvasStyle::applyToPaint(SkPaint& paint) const
case Gradient:
getCanvasGradient()->getGradient()->applyToPaint(paint);
break;
- case ImagePattern:
- getCanvasPattern()->getPattern()->applyToPaint(paint);
+ case ImagePattern: {
+ const SkMatrix localMatrix = affineTransformToSkMatrix(getCanvasPattern()->getTransform());
+ getCanvasPattern()->getPattern()->applyToPaint(paint, &localMatrix);
+ }
break;
fs 2016/05/24 18:32:03 Nit: Exchange this line with the one above?
f(malita) 2016/05/24 18:42:26 Done.
default:
ASSERT_NOT_REACHED();

Powered by Google App Engine
This is Rietveld 408576698