| Index: third_party/WebKit/Source/core/layout/ImageQualityController.h
|
| diff --git a/third_party/WebKit/Source/core/layout/ImageQualityController.h b/third_party/WebKit/Source/core/layout/ImageQualityController.h
|
| index d9da6a44788f9986aed1032397a85ac79cfecdf1..374018fccc2f5dea830d8e5a3e1f8c43a59b8b99 100644
|
| --- a/third_party/WebKit/Source/core/layout/ImageQualityController.h
|
| +++ b/third_party/WebKit/Source/core/layout/ImageQualityController.h
|
| @@ -59,24 +59,28 @@ public:
|
| InterpolationQuality chooseInterpolationQuality(const LayoutObject&, Image*, const void* layer, const LayoutSize&);
|
|
|
| private:
|
| + static const double cLowQualityTimeThreshold;
|
| + static const double cTimerRestartThreshold;
|
| +
|
| ImageQualityController();
|
|
|
| static bool has(const LayoutObject&);
|
| void set(const LayoutObject&, LayerSizeMap* innerMap, const void* layer, const LayoutSize&, bool isResizing);
|
|
|
| - bool shouldPaintAtLowQuality(const LayoutObject&, Image*, const void* layer, const LayoutSize&);
|
| + bool shouldPaintAtLowQuality(const LayoutObject&, Image*, const void* layer, const LayoutSize&, double lastFrameTimeMonotonic);
|
| void removeLayer(const LayoutObject&, LayerSizeMap* innerMap, const void* layer);
|
| void objectDestroyed(const LayoutObject&);
|
| bool isEmpty() { return m_objectLayerSizeMap.isEmpty(); }
|
|
|
| void highQualityRepaintTimerFired(Timer<ImageQualityController>*);
|
| - void restartTimer();
|
| + void restartTimer(double lastFrameTimeMonotonic);
|
|
|
| // Only for use in testing.
|
| void setTimer(Timer<ImageQualityController>*);
|
|
|
| ObjectLayerSizeMap m_objectLayerSizeMap;
|
| OwnPtr<Timer<ImageQualityController>> m_timer;
|
| + double m_frameTimeWhenTimerStarted;
|
|
|
| // For calling set().
|
| FRIEND_TEST_ALL_PREFIXES(LayoutPartTest, DestroyUpdatesImageQualityController);
|
| @@ -85,6 +89,7 @@ private:
|
| FRIEND_TEST_ALL_PREFIXES(ImageQualityControllerTest, LowQualityFilterForResizingImage);
|
| FRIEND_TEST_ALL_PREFIXES(ImageQualityControllerTest, MediumQualityFilterForNotAnimatedWhileAnotherAnimates);
|
| FRIEND_TEST_ALL_PREFIXES(ImageQualityControllerTest, DontKickTheAnimationTimerWhenPaintingAtTheSameSize);
|
| + FRIEND_TEST_ALL_PREFIXES(ImageQualityControllerTest, DontRestartTimerUnlessAdvanced);
|
| };
|
|
|
| } // namespace blink
|
|
|