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

Unified Diff: cc/trees/layer_tree_host_pixeltest_masks.cc

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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
« no previous file with comments | « cc/tiles/tile_manager_unittest.cc ('k') | cc/trees/layer_tree_host_pixeltest_scrollbars.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « cc/tiles/tile_manager_unittest.cc ('k') | cc/trees/layer_tree_host_pixeltest_scrollbars.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698