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

Unified Diff: cc/render_pass.cc

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/render_pass.cc
diff --git a/cc/render_pass.cc b/cc/render_pass.cc
index 0a8dc488f66e8b23415af19929977d2eec7cd84c..2a66058e1a293f4d8d0d34e9a0044275c1f37118 100644
--- a/cc/render_pass.cc
+++ b/cc/render_pass.cc
@@ -4,8 +4,6 @@
#include "cc/render_pass.h"
-#include "third_party/skia/include/core/SkImageFilter.h"
-
using WebKit::WebTransformationMatrix;
namespace cc {
@@ -22,7 +20,6 @@ RenderPass::RenderPass()
}
RenderPass::~RenderPass() {
- SkSafeUnref(filter);
}
scoped_ptr<RenderPass> RenderPass::Copy(Id new_id) const {
@@ -64,7 +61,7 @@ void RenderPass::SetAll(Id id,
bool has_transparent_background,
bool has_occlusion_from_outside_target_surface,
const WebKit::WebFilterOperations& filters,
- SkImageFilter* filter,
+ const SkRefPtr<SkImageFilter>& filter,
const WebKit::WebFilterOperations& background_filters) {
DCHECK_GT(id.layer_id, 0);
DCHECK_GE(id.index, 0);
@@ -77,7 +74,7 @@ void RenderPass::SetAll(Id id,
this->has_occlusion_from_outside_target_surface =
has_occlusion_from_outside_target_surface;
this->filters = filters;
- SkRefCnt_SafeAssign(this->filter, filter);
+ this->filter = filter;
this->background_filters = background_filters;
DCHECK(quad_list.isEmpty());

Powered by Google App Engine
This is Rietveld 408576698