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

Unified Diff: src/core/SkImageFilter.cpp

Issue 2359443003: Fix some GPU image filter code to preserve precision and color space (Closed)
Patch Set: 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/effects/SkDisplacementMapEffect.cpp » ('j') | src/gpu/SkGrPriv.h » ('J')
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 b2c04450fff42d12b112a4316b05fba3b3a528a3..64b62759e2c8b83dfd1ba0d61d161a61008b92bd 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -22,6 +22,7 @@
#include "GrContext.h"
#include "GrDrawContext.h"
#include "GrFixedClip.h"
+#include "SkGrPriv.h"
#endif
#ifndef SK_IGNORE_TO_STRING
@@ -282,9 +283,10 @@ sk_sp<SkSpecialImage> SkImageFilter::DrawWithFP(GrContext* context,
paint.addColorFragmentProcessor(std::move(fp));
paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
+ GrPixelConfig config = GrRenderableConfigForColorSpace(colorSpace.get());
sk_sp<GrDrawContext> drawContext(context->makeDrawContext(SkBackingFit::kApprox,
bounds.width(), bounds.height(),
- kRGBA_8888_GrPixelConfig,
+ config,
std::move(colorSpace)));
if (!drawContext) {
return nullptr;
« no previous file with comments | « no previous file | src/effects/SkDisplacementMapEffect.cpp » ('j') | src/gpu/SkGrPriv.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698