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

Unified Diff: Source/platform/graphics/filters/FEDropShadow.cpp

Issue 134733016: Add support for converting Colors to linear RGB; Fix relevant filters (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase; update TestExpectations Created 6 years, 11 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 | « Source/platform/graphics/ImageBuffer.cpp ('k') | Source/platform/graphics/filters/FELighting.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/filters/FEDropShadow.cpp
diff --git a/Source/platform/graphics/filters/FEDropShadow.cpp b/Source/platform/graphics/filters/FEDropShadow.cpp
index 2a16778a3ff4870caa57a959d5ad8471454ab36d..b8e2ebddf308607848e21d5860f96dd86e88ee94 100644
--- a/Source/platform/graphics/filters/FEDropShadow.cpp
+++ b/Source/platform/graphics/filters/FEDropShadow.cpp
@@ -88,7 +88,7 @@ void FEDropShadow::applySoftware()
GraphicsContext* resultContext = resultImage->context();
ASSERT(resultContext);
- Color color = m_shadowColor.combineWithAlpha(m_shadowOpacity);
+ Color color = adaptColorToOperatingColorSpace(m_shadowColor.combineWithAlpha(m_shadowOpacity));
SkAutoTUnref<SkImageFilter> blurFilter(new SkBlurImageFilter(blurRadius.width(), blurRadius.height()));
SkAutoTUnref<SkColorFilter> colorFilter(SkColorFilter::CreateModeFilter(color.rgb(), SkXfermode::kSrcIn_Mode));
SkPaint paint;
@@ -113,7 +113,7 @@ PassRefPtr<SkImageFilter> FEDropShadow::createImageFilter(SkiaImageFilterBuilder
float dy = filter()->applyVerticalScale(m_dy);
float stdX = filter()->applyHorizontalScale(m_stdX);
float stdY = filter()->applyVerticalScale(m_stdY);
- Color color = m_shadowColor.combineWithAlpha(m_shadowOpacity);
+ Color color = adaptColorToOperatingColorSpace(m_shadowColor.combineWithAlpha(m_shadowOpacity));
SkImageFilter::CropRect cropRect = getCropRect(builder->cropOffset());
return adoptRef(new SkDropShadowImageFilter(SkFloatToScalar(dx), SkFloatToScalar(dy), SkFloatToScalar(stdX), SkFloatToScalar(stdY), color.rgb(), input.get(), &cropRect));
}
« no previous file with comments | « Source/platform/graphics/ImageBuffer.cpp ('k') | Source/platform/graphics/filters/FELighting.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698