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

Unified Diff: src/effects/SkXfermodeImageFilter.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
Index: src/effects/SkXfermodeImageFilter.cpp
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index 558e29a82f996dbe4361651e1cd3c4b72b3dbcd7..537175bc4a021e78f738eb3c397e0cf913aba8be 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -21,6 +21,7 @@
#include "effects/GrTextureDomain.h"
#include "effects/GrSimpleTextureEffect.h"
#include "SkGr.h"
+#include "SkGrPriv.h"
#endif
///////////////////////////////////////////////////////////////////////////////
@@ -240,10 +241,10 @@ sk_sp<SkSpecialImage> SkXfermodeImageFilter::filterImageGPU(SkSpecialImage* sour
paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
- sk_sp<GrDrawContext> drawContext(context->makeDrawContext(SkBackingFit::kApprox,
- bounds.width(), bounds.height(),
- kSkia8888_GrPixelConfig,
- sk_ref_sp(source->getColorSpace())));
+ sk_sp<GrDrawContext> drawContext(
+ context->makeDrawContext(SkBackingFit::kApprox, bounds.width(), bounds.height(),
+ GrRenderableConfigForColorSpace(source->getColorSpace()),
+ sk_ref_sp(source->getColorSpace())));
if (!drawContext) {
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698