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

Unified Diff: ui/gfx/blit_unittest.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 | « ui/compositor/paint_recorder.cc ('k') | ui/gfx/canvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/blit_unittest.cc
diff --git a/ui/gfx/blit_unittest.cc b/ui/gfx/blit_unittest.cc
index 50e7952265adbf157ccdda77dbafbf89a364d982..7598ef65828964339aa1d9cc395ebc0b3cd66ba3 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;
- std::unique_ptr<SkCanvas> canvas =
- skia::CreatePlatformCanvas(kCanvasWidth, kCanvasHeight, true);
+ sk_sp<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();
- std::unique_ptr<SkCanvas> canvas = skia::CreatePlatformCanvas(
+ sk_sp<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();
« no previous file with comments | « ui/compositor/paint_recorder.cc ('k') | ui/gfx/canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698