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

Unified Diff: cc/trees/layer_tree_host_pixeltest_masks.cc

Issue 2509983004: Revert "Change call-sites now that SkCanvas is not ref-counted" (Closed)
Patch Set: Created 4 years, 1 month 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/test/solid_color_content_layer_client.cc ('k') | cc/trees/layer_tree_host_pixeltest_tiles.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 0ce262cb50a7f6f38df6945936c4ea50e9008d3f..87e92a43553e64c984710db6af7aafb7eaaaf373 100644
--- a/cc/trees/layer_tree_host_pixeltest_masks.cc
+++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
@@ -40,8 +40,8 @@ class MaskContentLayerClient : public ContentLayerClient {
scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
PaintingControlSetting picture_control) override {
SkPictureRecorder recorder;
- SkCanvas* canvas =
- recorder.beginRecording(gfx::RectToSkRect(gfx::Rect(bounds_)));
+ sk_sp<SkCanvas> canvas = sk_ref_sp(
+ recorder.beginRecording(gfx::RectToSkRect(gfx::Rect(bounds_))));
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
@@ -163,8 +163,8 @@ class CheckerContentLayerClient : public ContentLayerClient {
scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
PaintingControlSetting picture_control) override {
SkPictureRecorder recorder;
- SkCanvas* canvas =
- recorder.beginRecording(gfx::RectToSkRect(gfx::Rect(bounds_)));
+ sk_sp<SkCanvas> canvas = sk_ref_sp(
+ recorder.beginRecording(gfx::RectToSkRect(gfx::Rect(bounds_))));
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
@@ -207,8 +207,8 @@ class CircleContentLayerClient : public ContentLayerClient {
scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
PaintingControlSetting picture_control) override {
SkPictureRecorder recorder;
- SkCanvas* canvas =
- recorder.beginRecording(gfx::RectToSkRect(gfx::Rect(bounds_)));
+ sk_sp<SkCanvas> canvas = sk_ref_sp(
+ recorder.beginRecording(gfx::RectToSkRect(gfx::Rect(bounds_))));
SkPaint paint;
paint.setStyle(SkPaint::kFill_Style);
« no previous file with comments | « cc/test/solid_color_content_layer_client.cc ('k') | cc/trees/layer_tree_host_pixeltest_tiles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698