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

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

Issue 465503002: Fix FEConvolveMatrix bias issue. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/filters/FEConvolveMatrix.cpp
diff --git a/Source/platform/graphics/filters/FEConvolveMatrix.cpp b/Source/platform/graphics/filters/FEConvolveMatrix.cpp
index a96eaa1608f3cdd2188270bec2c72dc75112223a..ea854710995810b11f32ef35b9ac93f4565b31f2 100644
--- a/Source/platform/graphics/filters/FEConvolveMatrix.cpp
+++ b/Source/platform/graphics/filters/FEConvolveMatrix.cpp
@@ -527,7 +527,7 @@ PassRefPtr<SkImageFilter> FEConvolveMatrix::createImageFilter(SkiaImageFilterBui
SkISize kernelSize(SkISize::Make(m_kernelSize.width(), m_kernelSize.height()));
int numElements = kernelSize.width() * kernelSize.height();
SkScalar gain = SkFloatToScalar(1.0f / m_divisor);
- SkScalar bias = SkFloatToScalar(m_bias);
+ SkScalar bias = SkFloatToScalar(m_bias * 255);
SkIPoint target = SkIPoint::Make(m_targetOffset.x(), m_targetOffset.y());
SkMatrixConvolutionImageFilter::TileMode tileMode = toSkiaTileMode(m_edgeMode);
bool convolveAlpha = !m_preserveAlpha;
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698