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

Unified Diff: cc/test/fake_scrollbar.h

Issue 1458703010: Mac: Don't repaint scrollbars every frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master2
Patch Set: Rebase and resolve Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/fake_layer_tree_host.cc ('k') | cc/test/fake_scrollbar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_scrollbar.h
diff --git a/cc/test/fake_scrollbar.h b/cc/test/fake_scrollbar.h
index 2d14660e975bc712ad84e0e240448010c5d5f92d..8ae49e44116a1edc4d7bf3e2d9865ac8860228d2 100644
--- a/cc/test/fake_scrollbar.h
+++ b/cc/test/fake_scrollbar.h
@@ -26,6 +26,8 @@ class FakeScrollbar : public Scrollbar {
int ThumbThickness() const override;
int ThumbLength() const override;
gfx::Rect TrackRect() const override;
+ float ThumbOpacity() const override;
+ bool NeedsPaintPart(ScrollbarPart part) const override;
void PaintPart(SkCanvas* canvas,
ScrollbarPart part,
const gfx::Rect& content_rect) override;
@@ -39,12 +41,23 @@ class FakeScrollbar : public Scrollbar {
void set_has_thumb(bool has_thumb) { has_thumb_ = has_thumb; }
SkColor paint_fill_color() const { return SK_ColorBLACK | fill_color_; }
+ void set_thumb_opacity(float opacity) { thumb_opacity_ = opacity; }
+ void set_needs_paint_thumb(bool needs_paint) {
+ needs_paint_thumb_ = needs_paint;
+ }
+ void set_needs_paint_track(bool needs_paint) {
+ needs_paint_track_ = needs_paint;
+ }
+
private:
bool paint_;
bool has_thumb_;
bool is_overlay_;
int thumb_thickness_;
int thumb_length_;
+ float thumb_opacity_;
+ bool needs_paint_thumb_;
+ bool needs_paint_track_;
gfx::Point location_;
gfx::Rect track_rect_;
SkColor fill_color_;
« no previous file with comments | « cc/test/fake_layer_tree_host.cc ('k') | cc/test/fake_scrollbar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698