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

Unified Diff: third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp

Issue 1530723004: Use clampTo instead of chaining std::max(std::min(...)) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More rebase Created 5 years 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: third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp b/third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp
index 53d164f767ff63a047fd34d7541210992c2d3de0..680b43eab38cdf7753f9c95ee9e8220f266749ce 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp
+++ b/third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp
@@ -46,7 +46,7 @@ FELighting::FELighting(Filter* filter, LightingType lightingType, const Color& l
, m_surfaceScale(surfaceScale)
, m_diffuseConstant(std::max(diffuseConstant, 0.0f))
, m_specularConstant(std::max(specularConstant, 0.0f))
- , m_specularExponent(std::min(std::max(specularExponent, 1.0f), 128.0f))
+ , m_specularExponent(clampTo(specularExponent, 1.0f, 128.0f))
{
}

Powered by Google App Engine
This is Rietveld 408576698