| 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 |
| 75 UIResourceBitmap RasterizeScrollbarPart(const gfx::Rect& layer_rect, | 78 UIResourceBitmap RasterizeScrollbarPart(const gfx::Rect& layer_rect, |
| 76 const gfx::Rect& content_rect, | 79 const gfx::Rect& content_rect, |
| 77 ScrollbarPart part); | 80 ScrollbarPart part); |
| 78 | 81 |
| 79 std::unique_ptr<Scrollbar> scrollbar_; | 82 std::unique_ptr<Scrollbar> scrollbar_; |
| 80 int scroll_layer_id_; | 83 int scroll_layer_id_; |
| 81 | 84 |
| 82 float internal_contents_scale_; | 85 float internal_contents_scale_; |
| 83 gfx::Size internal_content_bounds_; | 86 gfx::Size internal_content_bounds_; |
| 84 | 87 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 95 std::unique_ptr<ScopedUIResource> thumb_resource_; | 98 std::unique_ptr<ScopedUIResource> thumb_resource_; |
| 96 | 99 |
| 97 float thumb_opacity_; | 100 float thumb_opacity_; |
| 98 | 101 |
| 99 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayer); | 102 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayer); |
| 100 }; | 103 }; |
| 101 | 104 |
| 102 } // namespace cc | 105 } // namespace cc |
| 103 | 106 |
| 104 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ | 107 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ |
| OLD | NEW |