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

Unified Diff: cc/render_pass.cc

Issue 11412255: cc: Use skia::RefPtr in place of raw pointers and SkAutoTUnref. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ref() 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 | « cc/render_pass.h ('k') | cc/render_pass_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/render_pass.cc
diff --git a/cc/render_pass.cc b/cc/render_pass.cc
index 2d499076f299209c01b8057290b81c07cc52ef75..dba8e10ed67f53d4b494edb0671bdf9732b1fa3f 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"
-
namespace cc {
scoped_ptr<RenderPass> RenderPass::Create() {
@@ -15,12 +13,10 @@ scoped_ptr<RenderPass> RenderPass::Create() {
RenderPass::RenderPass()
: id(Id(-1, -1)),
has_transparent_background(true),
- has_occlusion_from_outside_target_surface(false),
- filter(NULL) {
+ has_occlusion_from_outside_target_surface(false) {
}
RenderPass::~RenderPass() {
- SkSafeUnref(filter);
}
scoped_ptr<RenderPass> RenderPass::Copy(Id new_id) const {
@@ -62,7 +58,7 @@ void RenderPass::SetAll(Id id,
bool has_transparent_background,
bool has_occlusion_from_outside_target_surface,
const WebKit::WebFilterOperations& filters,
- SkImageFilter* filter,
+ const skia::RefPtr<SkImageFilter>& filter,
const WebKit::WebFilterOperations& background_filters) {
DCHECK_GT(id.layer_id, 0);
DCHECK_GE(id.index, 0);
@@ -75,7 +71,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());
« no previous file with comments | « cc/render_pass.h ('k') | cc/render_pass_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698