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

Unified Diff: cc/output/gl_renderer.cc

Issue 1849213002: Remove SK_SUPPORT_LEGACY_XFERMODE_PTR (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adopt the pointer but don't ref it Created 4 years, 9 months 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 | « no previous file | cc/output/software_renderer.cc » ('j') | cc/output/software_renderer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 47b851fee26b2ac43b2e891ed959317d4690a157..e96863a40a9efaeb39d2a6b3286c67611d947642 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -649,11 +649,11 @@ static skia::RefPtr<SkImage> ApplyImageFilter(
SkMatrix local_matrix;
local_matrix.setScale(scale.x(), scale.y());
- skia::RefPtr<SkImageFilter> filter_with_local_scale =
- skia::AdoptRef(filter->newWithLocalMatrix(local_matrix));
+ sk_sp<SkImageFilter> filter_with_local_scale =
+ filter->makeWithLocalMatrix(local_matrix);
SkPaint paint;
- paint.setImageFilter(filter_with_local_scale.get());
+ paint.setImageFilter(filter_with_local_scale);
f(malita) 2016/04/01 18:16:00 std::move(filter_with_local_scale) or inline.
surface->getCanvas()->translate(-dst_rect.x(), -dst_rect.y());
surface->getCanvas()->drawImage(srcImage.get(), src_rect.x(), src_rect.y(),
&paint);
@@ -999,13 +999,9 @@ void GLRenderer::DrawRenderPassQuad(DrawingFrame* frame,
skia::RefPtr<SkImageFilter> filter = RenderSurfaceFilters::BuildImageFilter(
quad->filters, gfx::SizeF(contents_texture->size()));
if (filter) {
- skia::RefPtr<SkColorFilter> cf;
-
- {
- SkColorFilter* colorfilter_rawptr = NULL;
- filter->asColorFilter(&colorfilter_rawptr);
- cf = skia::AdoptRef(colorfilter_rawptr);
- }
+ SkColorFilter* colorfilter_rawptr = NULL;
+ filter->asColorFilter(&colorfilter_rawptr);
+ sk_sp<SkColorFilter> cf(colorfilter_rawptr);
if (cf && cf->asColorMatrix(color_matrix) && !filter->getInput(0)) {
// We have a single color matrix as a filter; apply it locally
« no previous file with comments | « no previous file | cc/output/software_renderer.cc » ('j') | cc/output/software_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698