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

Unified Diff: src/effects/SkMorphologyImageFilter.cpp

Issue 1845283003: Gamma-correctness pushed into Skia, top-down. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove helper function for old pixel-config method of enabling decode Created 4 years, 8 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/SkMorphologyImageFilter.cpp
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index bf8811b88702a7caf69e8cacde999b200a1194ac..e7294d8b91b1e62f7b105ea678c9000824c4cb0a 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -372,6 +372,7 @@ static void apply_morphology_rect(GrDrawContext* drawContext,
float bounds[2],
Gr1DKernelEffect::Direction direction) {
GrPaint paint;
+ // SRGBTODO: AllowSRGBInputs?
paint.addColorFragmentProcessor(GrMorphologyEffect::Create(texture,
direction,
radius,
@@ -391,6 +392,7 @@ static void apply_morphology_rect_no_bounds(GrDrawContext* drawContext,
GrMorphologyEffect::MorphologyType morphType,
Gr1DKernelEffect::Direction direction) {
GrPaint paint;
+ // SRGBTODO: AllowSRGBInputs?
paint.addColorFragmentProcessor(GrMorphologyEffect::Create(texture,
direction,
radius,
@@ -513,7 +515,7 @@ static sk_sp<SkSpecialImage> apply_morphology(SkSpecialImage* input,
return SkSpecialImage::MakeFromGpu(input->internal_getProxy(),
SkIRect::MakeWH(rect.width(), rect.height()),
kNeedNewImageUniqueID_SpecialImage,
- srcTexture);
+ srcTexture, &input->props());
}
#endif
@@ -621,5 +623,5 @@ sk_sp<SkSpecialImage> SkMorphologyImageFilter::onFilterImage(SkSpecialImage* sou
return SkSpecialImage::MakeFromRaster(source->internal_getProxy(),
SkIRect::MakeWH(bounds.width(), bounds.height()),
- dst);
+ dst, &source->props());
}

Powered by Google App Engine
This is Rietveld 408576698