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

Unified Diff: Source/platform/graphics/filters/FilterEffect.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: 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
Index: Source/platform/graphics/filters/FilterEffect.cpp
diff --git a/Source/platform/graphics/filters/FilterEffect.cpp b/Source/platform/graphics/filters/FilterEffect.cpp
index d70f534081386d14850d5947da68be05971ef046..c55c2532daa5cb8c38a02a10afcdb889d142d975 100644
--- a/Source/platform/graphics/filters/FilterEffect.cpp
+++ b/Source/platform/graphics/filters/FilterEffect.cpp
@@ -458,6 +458,13 @@ Uint8ClampedArray* FilterEffect::createPremultipliedImageResult()
return m_premultipliedImageResult.get();
}
+Color FilterEffect::adaptColorToOperatingColorSpace(const Color& deviceColor)
+{
+ if (operatingColorSpace() == ColorSpaceLinearRGB)
+ return deviceColor.convertToLinear();
+ return deviceColor;
+}
+
void FilterEffect::transformResultColorSpace(ColorSpace dstColorSpace)
{
if (!hasResult() || dstColorSpace == m_resultColorSpace)

Powered by Google App Engine
This is Rietveld 408576698