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

Unified Diff: cc/test/skia_common.cc

Issue 1900953004: Switch DrawImage to sk_sp<> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Florin's nit Created 4 years, 8 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: cc/test/skia_common.cc
diff --git a/cc/test/skia_common.cc b/cc/test/skia_common.cc
index ca9933579a29385bcc0a6624251a3cb1e7bae0c0..13fdd6f0c69c4fccbfc64fe644904c6aa16f8690 100644
--- a/cc/test/skia_common.cc
+++ b/cc/test/skia_common.cc
@@ -7,7 +7,6 @@
#include <stddef.h>
#include "cc/playback/display_item_list.h"
-#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkImageGenerator.h"
#include "ui/gfx/geometry/rect.h"
@@ -52,11 +51,9 @@ bool AreDisplayListDrawingResultsSame(const gfx::Rect& layer_rect,
return !memcmp(pixels_a.get(), pixels_b.get(), pixel_size);
}
-skia::RefPtr<SkImage> CreateDiscardableImage(const gfx::Size& size) {
- const SkImageInfo info =
- SkImageInfo::MakeN32Premul(size.width(), size.height());
- return skia::AdoptRef(
- SkImage::NewFromGenerator(new TestImageGenerator(info)));
+sk_sp<SkImage> CreateDiscardableImage(const gfx::Size& size) {
+ return SkImage::MakeFromGenerator(new TestImageGenerator(
+ SkImageInfo::MakeN32Premul(size.width(), size.height())));
}
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698