diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-04 05:08:15 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-04 05:08:15 +0000 |
commit | 1940c4ee397232a4948b0328e728024ea19e3f5f (patch) | |
tree | 34571d6bff7ecc3904b54bfc3df97c906437b7f1 /cc/render_pass.cc | |
parent | 45413146bcedc4087f4a8862384dd1508411848d (diff) | |
download | chromium_src-1940c4ee397232a4948b0328e728024ea19e3f5f.zip chromium_src-1940c4ee397232a4948b0328e728024ea19e3f5f.tar.gz chromium_src-1940c4ee397232a4948b0328e728024ea19e3f5f.tar.bz2 |
cc: Use skia::RefPtr in place of raw pointers and SkAutoTUnref.
Safe reference counting for skia objects ahoy!
R=jamesr
BUG=163454
Depends on: https://codereview.chromium.org/11418217/
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11412255
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170889 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/render_pass.cc')
-rw-r--r-- | cc/render_pass.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/cc/render_pass.cc b/cc/render_pass.cc index 2d49907..dba8e10 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()); |