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

Unified Diff: ui/gfx/blit_unittest.cc

Issue 11299262: ui: Use skia::RefPtr<T> for implicit safe reference counting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: winbuild Created 8 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 | « chrome/browser/ui/views/detachable_toolbar_view.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 f71be18ac4c09e30e4ca6ee0109a8999efddde90..b8d3ab693bce4ecef40f1487d2282d97e9e8dd28 100644
--- a/ui/gfx/blit_unittest.cc
+++ b/ui/gfx/blit_unittest.cc
@@ -143,10 +143,10 @@ TEST(Blit, WithSharedMemory) {
base::SharedMemory shared_mem;
ASSERT_TRUE(shared_mem.CreateAnonymous(kCanvasWidth * kCanvasHeight));
base::SharedMemoryHandle section = shared_mem.handle();
- SkCanvas* canvas = skia::CreatePlatformCanvas(kCanvasWidth, kCanvasHeight,
- true, section, skia::RETURN_NULL_ON_FAILURE);
- ASSERT_TRUE(NULL != canvas);
- SkAutoUnref aur(canvas);
+ skia::RefPtr<SkCanvas> canvas = skia::AdoptRef(
+ skia::CreatePlatformCanvas(kCanvasWidth, kCanvasHeight, true, section,
+ skia::RETURN_NULL_ON_FAILURE));
+ ASSERT_TRUE(canvas);
shared_mem.Close();
uint8 initial_values[kCanvasHeight][kCanvasWidth] = {
@@ -155,10 +155,10 @@ TEST(Blit, WithSharedMemory) {
{ 0x20, 0x21, 0x22, 0x23, 0x24 },
{ 0x30, 0x31, 0x32, 0x33, 0x34 },
{ 0x40, 0x41, 0x42, 0x43, 0x44 }};
- SetToCanvas<5, 5>(canvas, initial_values);
+ SetToCanvas<5, 5>(canvas.get(), initial_values);
// Sanity check on input.
- VerifyCanvasValues<5, 5>(canvas, initial_values);
+ VerifyCanvasValues<5, 5>(canvas.get(), initial_values);
}
#endif
« no previous file with comments | « chrome/browser/ui/views/detachable_toolbar_view.cc ('k') | ui/gfx/canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698