Chromium Code Reviews| Index: third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp |
| diff --git a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp |
| index b1fcfb84c7e60ce7a66236f773b55e00d444eb9f..5beb28daf76e97ae8fff2cf2dc854c942aedd71a 100644 |
| --- a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp |
| +++ b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp |
| @@ -53,6 +53,7 @@ |
| #include "core/frame/UseCounter.h" |
| #include "core/layout/LayoutObject.h" |
| #include "core/paint/PaintLayer.h" |
| +#include "platform/Histogram.h" |
| #include "platform/animation/TimingFunction.h" |
| #include "public/platform/Platform.h" |
| #include "wtf/BitArray.h" |
| @@ -116,9 +117,10 @@ static StringKeyframeEffectModel* createKeyframeEffectModel(StyleResolver* resol |
| } |
| } |
| + DEFINE_STATIC_LOCAL(SparseHistogram, propertyHistogram, ("WebCore.Animation.CSSProperties")); |
| for (CSSPropertyID property : specifiedPropertiesForUseCounter) { |
| ASSERT(property != CSSPropertyInvalid); |
| - Platform::current()->histogramSparse("WebCore.Animation.CSSProperties", UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(property)); |
| + propertyHistogram.sample(UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(property)); |
| } |
| // Merge duplicate keyframes. |
| @@ -490,7 +492,9 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element) |
| runningTransition.animation = animation; |
| m_transitions.set(id, runningTransition); |
| ASSERT(id != CSSPropertyInvalid); |
| - Platform::current()->histogramSparse("WebCore.Animation.CSSProperties", UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(id)); |
| + |
| + DEFINE_STATIC_LOCAL(SparseHistogram, propertyHistogram, ("WebCore.Animation.CSSProperties")); |
| + propertyHistogram.sample(UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(id)); |
|
Alexei Svitkine (slow)
2016/02/01 21:30:31
Perhaps there should be a macro that wraps the ext
|
| } |
| clearPendingUpdate(); |
| } |