| Index: cc/trees/layer_tree_host_pixeltest_masks.cc
|
| diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc
|
| index 0b2a75a7303d8186b021c94541e9a12bb6a2829c..e6781e447d1b4b2374a09e72e84f5306c7f11edd 100644
|
| --- a/cc/trees/layer_tree_host_pixeltest_masks.cc
|
| +++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
|
| @@ -14,8 +14,10 @@
|
| #include "cc/test/layer_tree_pixel_resource_test.h"
|
| #include "cc/test/pixel_comparator.h"
|
| #include "cc/test/solid_color_content_layer_client.h"
|
| +#include "skia/ext/cdl_paint.h"
|
| +#include "skia/ext/cdl_picture_recorder.h"
|
| +#include "skia/ext/cdl_surface.h"
|
| #include "third_party/skia/include/core/SkImage.h"
|
| -#include "third_party/skia/include/core/SkPictureRecorder.h"
|
| #include "third_party/skia/include/core/SkSurface.h"
|
|
|
| #if !defined(OS_ANDROID)
|
| @@ -39,12 +41,12 @@ class MaskContentLayerClient : public ContentLayerClient {
|
|
|
| scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
|
| PaintingControlSetting picture_control) override {
|
| - SkPictureRecorder recorder;
|
| - SkCanvas* canvas =
|
| + CdlPictureRecorder recorder;
|
| + CdlCanvas* canvas =
|
| recorder.beginRecording(gfx::RectToSkRect(gfx::Rect(bounds_)));
|
|
|
| - SkPaint paint;
|
| - paint.setStyle(SkPaint::kStroke_Style);
|
| + CdlPaint paint;
|
| + paint.setStyle(CdlPaint::kStroke_Style);
|
| paint.setStrokeWidth(SkIntToScalar(2));
|
| paint.setColor(SK_ColorWHITE);
|
|
|
| @@ -103,8 +105,8 @@ TEST_P(LayerTreeHostMasksPixelTest, ImageMaskOfLayer) {
|
| mask->SetIsMask(true);
|
| mask->SetBounds(mask_bounds);
|
|
|
| - sk_sp<SkSurface> surface = SkSurface::MakeRasterN32Premul(200, 200);
|
| - SkCanvas* canvas = surface->getCanvas();
|
| + sk_sp<CdlSurface> surface = CdlSurface::MakeRasterN32Premul(200, 200);
|
| + CdlCanvas* canvas = surface->getCanvas();
|
| canvas->scale(SkIntToScalar(4), SkIntToScalar(4));
|
| MaskContentLayerClient client(mask_bounds);
|
| scoped_refptr<DisplayItemList> mask_display_list =
|
| @@ -162,12 +164,12 @@ class CheckerContentLayerClient : public ContentLayerClient {
|
| gfx::Rect PaintableRegion() override { return gfx::Rect(bounds_); }
|
| scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
|
| PaintingControlSetting picture_control) override {
|
| - SkPictureRecorder recorder;
|
| - SkCanvas* canvas =
|
| + CdlPictureRecorder recorder;
|
| + CdlCanvas* canvas =
|
| recorder.beginRecording(gfx::RectToSkRect(gfx::Rect(bounds_)));
|
|
|
| - SkPaint paint;
|
| - paint.setStyle(SkPaint::kStroke_Style);
|
| + CdlPaint paint;
|
| + paint.setStyle(CdlPaint::kStroke_Style);
|
| paint.setStrokeWidth(SkIntToScalar(4));
|
| paint.setColor(color_);
|
| canvas->clear(SK_ColorTRANSPARENT);
|
| @@ -206,12 +208,12 @@ class CircleContentLayerClient : public ContentLayerClient {
|
| gfx::Rect PaintableRegion() override { return gfx::Rect(bounds_); }
|
| scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
|
| PaintingControlSetting picture_control) override {
|
| - SkPictureRecorder recorder;
|
| - SkCanvas* canvas =
|
| + CdlPictureRecorder recorder;
|
| + CdlCanvas* canvas =
|
| recorder.beginRecording(gfx::RectToSkRect(gfx::Rect(bounds_)));
|
|
|
| - SkPaint paint;
|
| - paint.setStyle(SkPaint::kFill_Style);
|
| + CdlPaint paint;
|
| + paint.setStyle(CdlPaint::kFill_Style);
|
| paint.setColor(SK_ColorWHITE);
|
| canvas->clear(SK_ColorTRANSPARENT);
|
| canvas->drawCircle(bounds_.width() / 2,
|
|
|