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

Unified Diff: chrome/renderer/print_web_view_helper_win.cc

Issue 11418217: Add skia::RefPtr class to wrap ref counted classes from Skia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit+rebase 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/renderer/print_web_view_helper_mac.mm ('k') | skia/ext/bitmap_platform_device_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/print_web_view_helper_win.cc
diff --git a/chrome/renderer/print_web_view_helper_win.cc b/chrome/renderer/print_web_view_helper_win.cc
index d5868df2e72b3bbccab3a52da46572e97a4199ba..8968308e1ecad2bd00bb83ea3b4f4063fda4eaae 100644
--- a/chrome/renderer/print_web_view_helper_win.cc
+++ b/chrome/renderer/print_web_view_helper_win.cc
@@ -17,9 +17,9 @@
#include "printing/metafile_skia_wrapper.h"
#include "printing/page_size_margins.h"
#include "printing/units.h"
-#include "skia/ext/vector_canvas.h"
#include "skia/ext/platform_device.h"
-#include "third_party/skia/include/core/SkRefCnt.h"
+#include "skia/ext/refptr.h"
+#include "skia/ext/vector_canvas.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "ui/gfx/gdi_util.h"
#include "ui/gfx/point.h"
@@ -179,8 +179,8 @@ void PrintWebViewHelper::RenderPage(
DCHECK(device);
// The printPage method may take a reference to the canvas we pass down, so it
// can't be a stack object.
- SkRefPtr<skia::VectorCanvas> canvas = new skia::VectorCanvas(device);
- canvas->unref(); // SkRefPtr and new both took a reference.
+ skia::RefPtr<skia::VectorCanvas> canvas =
+ skia::AdoptRef(new skia::VectorCanvas(device));
if (is_preview) {
printing::MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
« no previous file with comments | « chrome/renderer/print_web_view_helper_mac.mm ('k') | skia/ext/bitmap_platform_device_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698