| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef ImageQualityController_h | 31 #ifndef ImageQualityController_h |
| 32 #define ImageQualityController_h | 32 #define ImageQualityController_h |
| 33 | 33 |
| 34 #include "base/gtest_prod_util.h" | 34 #include "base/gtest_prod_util.h" |
| 35 #include "core/CoreExport.h" | |
| 36 #include "core/layout/LayoutObject.h" | 35 #include "core/layout/LayoutObject.h" |
| 37 #include "platform/geometry/IntSize.h" | |
| 38 #include "platform/geometry/LayoutSize.h" | 36 #include "platform/geometry/LayoutSize.h" |
| 39 #include "platform/graphics/Image.h" | |
| 40 #include "platform/graphics/ImageOrientation.h" | |
| 41 #include "platform/graphics/ImageSource.h" | |
| 42 #include "wtf/HashMap.h" | 37 #include "wtf/HashMap.h" |
| 43 | 38 |
| 44 namespace blink { | 39 namespace blink { |
| 45 | 40 |
| 46 typedef HashMap<const void*, LayoutSize> LayerSizeMap; | 41 typedef HashMap<const void*, LayoutSize> LayerSizeMap; |
| 47 | 42 |
| 48 struct ObjectResizeInfo { | 43 struct ObjectResizeInfo { |
| 49 LayerSizeMap layerSizeMap; | 44 LayerSizeMap layerSizeMap; |
| 50 bool isResizing; | 45 bool isResizing; |
| 51 }; | 46 }; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 80 // Only for use in testing. | 75 // Only for use in testing. |
| 81 void setTimer(Timer<ImageQualityController>*); | 76 void setTimer(Timer<ImageQualityController>*); |
| 82 | 77 |
| 83 ObjectLayerSizeMap m_objectLayerSizeMap; | 78 ObjectLayerSizeMap m_objectLayerSizeMap; |
| 84 OwnPtr<Timer<ImageQualityController>> m_timer; | 79 OwnPtr<Timer<ImageQualityController>> m_timer; |
| 85 | 80 |
| 86 // For calling set(). | 81 // For calling set(). |
| 87 FRIEND_TEST_ALL_PREFIXES(LayoutPartTest, DestroyUpdatesImageQualityControlle
r); | 82 FRIEND_TEST_ALL_PREFIXES(LayoutPartTest, DestroyUpdatesImageQualityControlle
r); |
| 88 | 83 |
| 89 // For calling setTimer(), | 84 // For calling setTimer(), |
| 90 FRIEND_TEST_ALL_PREFIXES(ImageQualityControllerTest, LowQualityFilterForLive
Resize); | |
| 91 FRIEND_TEST_ALL_PREFIXES(ImageQualityControllerTest, LowQualityFilterForResi
zingImage); | 85 FRIEND_TEST_ALL_PREFIXES(ImageQualityControllerTest, LowQualityFilterForResi
zingImage); |
| 92 FRIEND_TEST_ALL_PREFIXES(ImageQualityControllerTest, MediumQualityFilterForN
otAnimatedWhileAnotherAnimates); | 86 FRIEND_TEST_ALL_PREFIXES(ImageQualityControllerTest, MediumQualityFilterForN
otAnimatedWhileAnotherAnimates); |
| 93 FRIEND_TEST_ALL_PREFIXES(ImageQualityControllerTest, DontKickTheAnimationTim
erWhenPaintingAtTheSameSize); | 87 FRIEND_TEST_ALL_PREFIXES(ImageQualityControllerTest, DontKickTheAnimationTim
erWhenPaintingAtTheSameSize); |
| 94 }; | 88 }; |
| 95 | 89 |
| 96 } // namespace blink | 90 } // namespace blink |
| 97 | 91 |
| 98 #endif | 92 #endif |
| OLD | NEW |