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

Unified Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 2357273002: Add output format properties to SkImageFilter::Context (Closed)
Patch Set: Spelling 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/SkMorphologyImageFilter.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkXfermodeImageFilter.cpp
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index 537175bc4a021e78f738eb3c397e0cf913aba8be..62daa5ae3bda7b5ab9ffd60b8307177b94f1fa63 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -91,7 +91,7 @@ sk_sp<SkSpecialImage> SkXfermodeImageFilter::onFilterImage(SkSpecialImage* sourc
return this->filterImageGPU(source,
background, backgroundOffset,
foreground, foregroundOffset,
- bounds);
+ bounds, ctx.outputProperties());
}
#endif
@@ -159,12 +159,14 @@ void SkXfermodeImageFilter::toString(SkString* str) const {
#include "SkXfermode_proccoeff.h"
-sk_sp<SkSpecialImage> SkXfermodeImageFilter::filterImageGPU(SkSpecialImage* source,
- sk_sp<SkSpecialImage> background,
- const SkIPoint& backgroundOffset,
- sk_sp<SkSpecialImage> foreground,
- const SkIPoint& foregroundOffset,
- const SkIRect& bounds) const {
+sk_sp<SkSpecialImage> SkXfermodeImageFilter::filterImageGPU(
+ SkSpecialImage* source,
+ sk_sp<SkSpecialImage> background,
+ const SkIPoint& backgroundOffset,
+ sk_sp<SkSpecialImage> foreground,
+ const SkIPoint& foregroundOffset,
+ const SkIRect& bounds,
+ const OutputProperties& outputProperties) const {
SkASSERT(source->isTextureBacked());
GrContext* context = source->getContext();
@@ -243,8 +245,8 @@ sk_sp<SkSpecialImage> SkXfermodeImageFilter::filterImageGPU(SkSpecialImage* sour
sk_sp<GrDrawContext> drawContext(
context->makeDrawContext(SkBackingFit::kApprox, bounds.width(), bounds.height(),
- GrRenderableConfigForColorSpace(source->getColorSpace()),
- sk_ref_sp(source->getColorSpace())));
+ GrRenderableConfigForColorSpace(outputProperties.colorSpace()),
+ sk_ref_sp(outputProperties.colorSpace())));
if (!drawContext) {
return nullptr;
}
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698