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

Unified Diff: src/effects/SkDisplacementMapEffect.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/SkDisplacementMapEffect.cpp
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index e74ca4fe3fbe1a3475cb0975f11965c4688bab92..0f49a991c22e9a0c6c938d0b5409b7fb62042f47 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -19,6 +19,7 @@
#include "GrCoordTransform.h"
#include "GrInvariantOutput.h"
#include "SkGr.h"
+#include "SkGrPriv.h"
#include "effects/GrTextureDomain.h"
#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
@@ -337,7 +338,8 @@ sk_sp<SkSpecialImage> SkDisplacementMapEffect::onFilterImage(SkSpecialImage* sou
sk_sp<GrDrawContext> drawContext(
context->makeDrawContext(SkBackingFit::kApprox, bounds.width(), bounds.height(),
- kSkia8888_GrPixelConfig, sk_ref_sp(source->getColorSpace())));
+ GrRenderableConfigForColorSpace(source->getColorSpace()),
+ sk_ref_sp(source->getColorSpace())));
if (!drawContext) {
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698