Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: cc/layers/painted_scrollbar_layer.h

Issue 2280663002: Reland of Move scaling of ui resources for scrollbars to the time of upload (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scrollbarpixeltests
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/layers/painted_scrollbar_layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/painted_scrollbar_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698