Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp b/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp |
| index db82f6d9235e54c53f83222da1ebe1555d410a46..a0410521f6362dbc7bd872ecdea07b6ba8d02e87 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp |
| @@ -32,6 +32,7 @@ |
| #include "platform/geometry/FloatRect.h" |
| #include "platform/graphics/GraphicsContext.h" |
| +#include "platform/graphics/paint/PaintController.h" |
| #include "platform/graphics/paint/SkPictureBuilder.h" |
|
chrishtr
2016/12/09 02:02:31
You can remove this include.
vmiura
2016/12/09 03:48:57
Done.
|
| #include "third_party/skia/include/core/SkImage.h" |
| #include "third_party/skia/include/core/SkPicture.h" |
| @@ -48,10 +49,11 @@ void GeneratedImage::drawPattern(GraphicsContext& destContext, |
| FloatRect tileRect = srcRect; |
| tileRect.expand(FloatSize(repeatSpacing)); |
| - SkPictureBuilder builder(tileRect, nullptr, &destContext); |
| - builder.context().beginRecording(tileRect); |
| - drawTile(builder.context(), srcRect); |
| - sk_sp<SkPicture> tilePicture = builder.endRecording(); |
| + std::unique_ptr<PaintController> paintController = PaintController::create(); |
| + GraphicsContext context(*paintController); |
| + context.beginRecording(tileRect); |
| + drawTile(context, srcRect); |
| + sk_sp<SkPicture> tilePicture = context.endRecording(); |
| SkMatrix patternMatrix = SkMatrix::MakeTrans(phase.x(), phase.y()); |
| patternMatrix.preScale(scale.width(), scale.height()); |