OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ | 5 #ifndef CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ |
6 #define CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ | 6 #define CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
10 #include "cc/input/scrollbar.h" | 10 #include "cc/input/scrollbar.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 template <typename T> | 66 template <typename T> |
67 bool UpdateProperty(T value, T* prop) { | 67 bool UpdateProperty(T value, T* prop) { |
68 if (*prop == value) | 68 if (*prop == value) |
69 return false; | 69 return false; |
70 *prop = value; | 70 *prop = value; |
71 SetNeedsPushProperties(); | 71 SetNeedsPushProperties(); |
72 return true; | 72 return true; |
73 } | 73 } |
74 | 74 |
75 int MaxTextureSize(); | |
76 float ClampScaleToMaxTextureSize(float scale); | |
77 | |
78 UIResourceBitmap RasterizeScrollbarPart(const gfx::Rect& layer_rect, | 75 UIResourceBitmap RasterizeScrollbarPart(const gfx::Rect& layer_rect, |
79 const gfx::Rect& content_rect, | 76 const gfx::Rect& content_rect, |
80 ScrollbarPart part); | 77 ScrollbarPart part); |
81 | 78 |
82 std::unique_ptr<Scrollbar> scrollbar_; | 79 std::unique_ptr<Scrollbar> scrollbar_; |
83 int scroll_layer_id_; | 80 int scroll_layer_id_; |
84 | 81 |
85 float internal_contents_scale_; | 82 float internal_contents_scale_; |
86 gfx::Size internal_content_bounds_; | 83 gfx::Size internal_content_bounds_; |
87 | 84 |
(...skipping 10 matching lines...) Expand all Loading... |
98 std::unique_ptr<ScopedUIResource> thumb_resource_; | 95 std::unique_ptr<ScopedUIResource> thumb_resource_; |
99 | 96 |
100 float thumb_opacity_; | 97 float thumb_opacity_; |
101 | 98 |
102 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayer); | 99 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayer); |
103 }; | 100 }; |
104 | 101 |
105 } // namespace cc | 102 } // namespace cc |
106 | 103 |
107 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ | 104 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ |
OLD | NEW |