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

Unified Diff: chrome/renderer/print_web_view_helper_linux.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
Index: chrome/renderer/print_web_view_helper_linux.cc
diff --git a/chrome/renderer/print_web_view_helper_linux.cc b/chrome/renderer/print_web_view_helper_linux.cc
index f1ec86550ee3cea6c5cb5569de31050bae54bb05..ca1de1e595ad0824336edb5c994e81a834d3e280 100644
--- a/chrome/renderer/print_web_view_helper_linux.cc
+++ b/chrome/renderer/print_web_view_helper_linux.cc
@@ -16,7 +16,6 @@
#include "printing/page_size_margins.h"
#include "skia/ext/platform_device.h"
#include "skia/ext/vector_canvas.h"
-#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#if !defined(OS_CHROMEOS)
@@ -194,8 +193,8 @@ void PrintWebViewHelper::PrintPageInternal(
// The printPage method 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));
printing::MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
« no previous file with comments | « chrome/renderer/automation/automation_renderer_helper.cc ('k') | chrome/renderer/print_web_view_helper_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698