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

Unified Diff: content/plugin/webplugin_proxy.h

Issue 11428099: Use skia::RefPtr in place of manual ref-counting for Skia types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | content/plugin/webplugin_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/plugin/webplugin_proxy.h
diff --git a/content/plugin/webplugin_proxy.h b/content/plugin/webplugin_proxy.h
index 7c5e412726f43e2acffa1aa60611a03c0bb5ecda..c3b79ce76798486d6fdad131f80df0e1f705b176 100644
--- a/content/plugin/webplugin_proxy.h
+++ b/content/plugin/webplugin_proxy.h
@@ -19,7 +19,8 @@
#include "base/timer.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_message.h"
-#include "third_party/skia/include/core/SkRefCnt.h"
+#include "skia/ext/refptr.h"
+#include "third_party/skia/include/core/SkCanvas.h"
#if defined(USE_X11)
#include "ui/base/x/x11_util.h"
#endif
@@ -27,8 +28,6 @@
#include "ui/surface/transport_dib.h"
#include "webkit/plugins/npapi/webplugin.h"
-class SkCanvas;
-
namespace webkit {
namespace npapi {
class WebPluginDelegateImpl;
@@ -213,7 +212,7 @@ class WebPluginProxy : public webkit::npapi::WebPlugin {
#if defined(OS_WIN)
void CreateCanvasFromHandle(const TransportDIB::Handle& dib_handle,
const gfx::Rect& window_rect,
- SkAutoTUnref<SkCanvas>* canvas);
+ skia::RefPtr<SkCanvas>* canvas);
#elif defined(OS_MACOSX)
static void CreateDIBAndCGContextFromHandle(
const TransportDIB::Handle& dib_handle,
@@ -225,7 +224,7 @@ class WebPluginProxy : public webkit::npapi::WebPlugin {
const TransportDIB::Handle& dib_handle,
const gfx::Rect& window_rect,
scoped_refptr<SharedTransportDIB>* dib_out,
- SkAutoTUnref<SkCanvas>* canvas);
+ skia::RefPtr<SkCanvas>* canvas);
static void CreateShmPixmapFromDIB(
TransportDIB* dib,
@@ -243,8 +242,8 @@ class WebPluginProxy : public webkit::npapi::WebPlugin {
return windowless_contexts_[windowless_buffer_index_].get();
}
#else
- SkCanvas* windowless_canvas() const {
- return windowless_canvases_[windowless_buffer_index_].get();
+ skia::RefPtr<SkCanvas> windowless_canvas() const {
+ return windowless_canvases_[windowless_buffer_index_];
}
#if defined(USE_X11)
@@ -280,8 +279,8 @@ class WebPluginProxy : public webkit::npapi::WebPlugin {
base::mac::ScopedCFTypeRef<CGContextRef> windowless_contexts_[2];
scoped_ptr<WebPluginAcceleratedSurfaceProxy> accelerated_surface_;
#else
- SkAutoTUnref<SkCanvas> windowless_canvases_[2];
- SkAutoTUnref<SkCanvas> background_canvas_;
+ skia::RefPtr<SkCanvas> windowless_canvases_[2];
+ skia::RefPtr<SkCanvas> background_canvas_;
#if defined(USE_X11)
scoped_refptr<SharedTransportDIB> windowless_dibs_[2];
« no previous file with comments | « no previous file | content/plugin/webplugin_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698