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

Unified Diff: cc/layer.h

Issue 11418117: cc: Increment the ref count when assigning the SkImageFilter (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
Index: cc/layer.h
diff --git a/cc/layer.h b/cc/layer.h
index c947b9649d0b92d6c07027494ff5fe1baa932014..e0a94a8b1c25b4a6ee15f6f2295f87cb8e298ca1 100644
--- a/cc/layer.h
+++ b/cc/layer.h
@@ -12,6 +12,8 @@
#include "cc/region.h"
#include "cc/render_surface.h"
#include "third_party/skia/include/core/SkColor.h"
+#include "third_party/skia/include/core/SkImageFilter.h"
+#include "third_party/skia/include/core/SkRefCnt.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/rect_f.h"
#include <public/WebFilterOperations.h>
@@ -24,8 +26,6 @@ class WebAnimationDelegate;
class WebLayerScrollClient;
}
-class SkImageFilter;
-
namespace cc {
class ActiveAnimation;
@@ -101,8 +101,8 @@ public:
void setFilters(const WebKit::WebFilterOperations&);
const WebKit::WebFilterOperations& filters() const { return m_filters; }
- void setFilter(SkImageFilter* filter);
- SkImageFilter* filter() const { return m_filter; }
+ void setFilter(const SkRefPtr<SkImageFilter>& filter);
+ SkRefPtr<SkImageFilter> filter() const { return m_filter; }
// Background filters are filters applied to what is behind this layer, when they are viewed through non-opaque
// regions in this layer. They are used through the WebLayer interface, and are not exposed to HTML.
@@ -363,7 +363,7 @@ private:
SkColor m_backgroundColor;
std::string m_debugName;
float m_opacity;
- SkImageFilter* m_filter;
+ SkRefPtr<SkImageFilter> m_filter;
WebKit::WebFilterOperations m_filters;
WebKit::WebFilterOperations m_backgroundFilters;
float m_anchorPointZ;

Powered by Google App Engine
This is Rietveld 408576698