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

Unified Diff: ui/gfx/blit_unittest.cc

Issue 2476113002: Change call-sites now that SkCanvas is not ref-counted (Closed)
Patch Set: try fixing win again 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
Index: ui/gfx/blit_unittest.cc
diff --git a/ui/gfx/blit_unittest.cc b/ui/gfx/blit_unittest.cc
index 7598ef65828964339aa1d9cc395ebc0b3cd66ba3..50e7952265adbf157ccdda77dbafbf89a364d982 100644
--- a/ui/gfx/blit_unittest.cc
+++ b/ui/gfx/blit_unittest.cc
@@ -64,8 +64,8 @@ void VerifyCanvasValues(SkCanvas* canvas, uint8_t values[h][w]) {
TEST(Blit, ScrollCanvas) {
static const int kCanvasWidth = 5;
static const int kCanvasHeight = 5;
- sk_sp<SkCanvas> canvas(
- skia::CreatePlatformCanvas(kCanvasWidth, kCanvasHeight, true));
+ std::unique_ptr<SkCanvas> canvas =
+ skia::CreatePlatformCanvas(kCanvasWidth, kCanvasHeight, true);
uint8_t initial_values[kCanvasHeight][kCanvasWidth] = {
{0x00, 0x01, 0x02, 0x03, 0x04},
{0x10, 0x11, 0x12, 0x13, 0x14},
@@ -152,9 +152,9 @@ TEST(Blit, WithSharedMemory) {
base::SharedMemory shared_mem;
ASSERT_TRUE(shared_mem.CreateAnonymous(kCanvasWidth * kCanvasHeight));
base::SharedMemoryHandle section = shared_mem.handle();
- sk_sp<SkCanvas> canvas(skia::CreatePlatformCanvas(
+ std::unique_ptr<SkCanvas> canvas = skia::CreatePlatformCanvas(
kCanvasWidth, kCanvasHeight, true, section.GetHandle(),
- skia::RETURN_NULL_ON_FAILURE));
+ skia::RETURN_NULL_ON_FAILURE);
ASSERT_TRUE(canvas);
shared_mem.Close();

Powered by Google App Engine
This is Rietveld 408576698