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

Unified Diff: cc/render_pass.cc

Issue 11418217: Add skia::RefPtr class to wrap ref counted classes from Skia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit 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 2d499076f299209c01b8057290b81c07cc52ef75..686a530d0b38f504a72f230a0ae6f32cc93d5335 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 SkiaRefPtr<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') | cc/skia_refptr.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698