| Index: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
|
| index 5a289ed77ab418cd32a61929cc3c3151ad213dfa..dc47455a141837efb88987e92cc35532f69047d3 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
|
| @@ -58,9 +58,12 @@
|
| #include "wtf/CurrentTime.h"
|
| #include "wtf/HashMap.h"
|
| #include "wtf/HashSet.h"
|
| +#include "wtf/MathExtras.h"
|
| #include "wtf/text/StringUTF8Adaptor.h"
|
| #include "wtf/text/WTFString.h"
|
| #include <algorithm>
|
| +#include <cmath>
|
| +#include <utility>
|
|
|
| #ifndef NDEBUG
|
| #include <stdio.h>
|
| @@ -981,7 +984,7 @@ void GraphicsLayer::setBackfaceVisibility(bool visible)
|
|
|
| void GraphicsLayer::setOpacity(float opacity)
|
| {
|
| - float clampedOpacity = std::max(std::min(opacity, 1.0f), 0.0f);
|
| + float clampedOpacity = clampTo(opacity, 0.0f, 1.0f);
|
| m_opacity = clampedOpacity;
|
| platformLayer()->setOpacity(opacity);
|
| }
|
|
|