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

Unified Diff: src/effects/SkPictureImageFilter.cpp

Issue 2349373004: Create special surfaces according to original device (not always in N32) (Closed)
Patch Set: Remove copy-pasted default parameter, expand comment Created 4 years, 3 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 | « src/effects/SkPaintImageFilter.cpp ('k') | src/effects/SkTileImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkPictureImageFilter.cpp
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp
index bfe26b62c556b165e5c1d788b7749ca7c69f98e1..6539104a305659fa88d666ca9bdb5e5c736294eb 100644
--- a/src/effects/SkPictureImageFilter.cpp
+++ b/src/effects/SkPictureImageFilter.cpp
@@ -118,8 +118,7 @@ sk_sp<SkSpecialImage> SkPictureImageFilter::onFilterImage(SkSpecialImage* source
SkASSERT(!bounds.isEmpty());
- SkImageInfo info = SkImageInfo::MakeN32(bounds.width(), bounds.height(), kPremul_SkAlphaType);
- sk_sp<SkSpecialSurface> surf(source->makeSurface(info));
+ sk_sp<SkSpecialSurface> surf(source->makeSurface(ctx.outputProperties(), bounds.size()));
if (!surf) {
return nullptr;
}
@@ -167,10 +166,8 @@ void SkPictureImageFilter::drawPictureAtLocalResolution(SkSpecialImage* source,
sk_sp<SkSpecialImage> localImg;
{
- const SkImageInfo info = SkImageInfo::MakeN32(localIBounds.width(), localIBounds.height(),
- kPremul_SkAlphaType);
-
- sk_sp<SkSpecialSurface> localSurface(source->makeSurface(info));
+ sk_sp<SkSpecialSurface> localSurface(source->makeSurface(ctx.outputProperties(),
+ localIBounds.size()));
if (!localSurface) {
return;
}
« no previous file with comments | « src/effects/SkPaintImageFilter.cpp ('k') | src/effects/SkTileImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698