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

Unified Diff: src/core/SkImageFilter.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 | « no previous file | src/core/SkMatrixImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index be48ca17ba101b231b7708af7ef7804bcef583f5..9373dc1a1d3cc5f28badce7355f32ef9cea59990 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -348,9 +348,9 @@ bool SkImageFilter::applyCropRect(const Context& ctx, const SkIRect& srcBounds,
// around it.
static sk_sp<SkSpecialImage> pad_image(SkSpecialImage* src,
int newWidth, int newHeight, int offX, int offY) {
-
- SkImageInfo info = SkImageInfo::MakeN32Premul(newWidth, newHeight);
- sk_sp<SkSpecialSurface> surf(src->makeSurface(info));
+ // We explicitly want to operate in the source's color space here
+ SkImageFilter::OutputProperties outProps(src->getColorSpace());
+ sk_sp<SkSpecialSurface> surf(src->makeSurface(outProps, SkISize::Make(newWidth, newHeight)));
if (!surf) {
return nullptr;
}
« no previous file with comments | « no previous file | src/core/SkMatrixImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698