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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacOverlayAPI.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 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
OLDNEW
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 21 matching lines...) Expand all
32 #define ScrollbarThemeMacOverlayAPI_h 32 #define ScrollbarThemeMacOverlayAPI_h
33 33
34 #include "platform/scroll/ScrollbarThemeMacCommon.h" 34 #include "platform/scroll/ScrollbarThemeMacCommon.h"
35 35
36 typedef id ScrollbarPainter; 36 typedef id ScrollbarPainter;
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class PLATFORM_EXPORT ScrollbarThemeMacOverlayAPI : public ScrollbarThemeMacComm on { 40 class PLATFORM_EXPORT ScrollbarThemeMacOverlayAPI : public ScrollbarThemeMacComm on {
41 public: 41 public:
42 bool shouldRepaintAllPartsOnInvalidation() const override { return false; }
42 void updateEnabledState(const ScrollbarThemeClient*) override; 43 void updateEnabledState(const ScrollbarThemeClient*) override;
43 int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) override; 44 int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) override;
44 bool usesOverlayScrollbars() const override; 45 bool usesOverlayScrollbars() const override;
45 void updateScrollbarOverlayStyle(const ScrollbarThemeClient*) override; 46 void updateScrollbarOverlayStyle(const ScrollbarThemeClient*) override;
46 ScrollbarButtonsPlacement buttonsPlacement() const override; 47 ScrollbarButtonsPlacement buttonsPlacement() const override;
47 48
48 void registerScrollbar(ScrollbarThemeClient*) override; 49 void registerScrollbar(ScrollbarThemeClient*) override;
49 void unregisterScrollbar(ScrollbarThemeClient*) override; 50 void unregisterScrollbar(ScrollbarThemeClient*) override;
50 51
51 void setNewPainterForScrollbar(ScrollbarThemeClient*, ScrollbarPainter); 52 void setNewPainterForScrollbar(ScrollbarThemeClient*, ScrollbarPainter);
52 ScrollbarPainter painterForScrollbar(const ScrollbarThemeClient*); 53 ScrollbarPainter painterForScrollbar(const ScrollbarThemeClient*) const;
53 54
54 void paintTrackBackground(GraphicsContext*, const ScrollbarThemeClient*, con st IntRect&) override; 55 void paintTrackBackground(GraphicsContext*, const ScrollbarThemeClient*, con st IntRect&) override;
55 void paintThumb(GraphicsContext*, const ScrollbarThemeClient*, const IntRect &) override; 56 void paintThumb(GraphicsContext*, const ScrollbarThemeClient*, const IntRect &) override;
56 57
58 float thumbOpacity(const ScrollbarThemeClient*) const override;
59
57 protected: 60 protected:
58 IntRect trackRect(const ScrollbarThemeClient*, bool painting = false) overri de; 61 IntRect trackRect(const ScrollbarThemeClient*, bool painting = false) overri de;
59 IntRect backButtonRect(const ScrollbarThemeClient*, ScrollbarPart, bool pain ting = false) override; 62 IntRect backButtonRect(const ScrollbarThemeClient*, ScrollbarPart, bool pain ting = false) override;
60 IntRect forwardButtonRect(const ScrollbarThemeClient*, ScrollbarPart, bool p ainting = false) override; 63 IntRect forwardButtonRect(const ScrollbarThemeClient*, ScrollbarPart, bool p ainting = false) override;
61 64
62 bool hasButtons(const ScrollbarThemeClient*) override { return false; } 65 bool hasButtons(const ScrollbarThemeClient*) override { return false; }
63 bool hasThumb(const ScrollbarThemeClient*) override; 66 bool hasThumb(const ScrollbarThemeClient*) override;
64 67
65 int minimumThumbLength(const ScrollbarThemeClient*) override; 68 int minimumThumbLength(const ScrollbarThemeClient*) override;
66 }; 69 };
67 70
68 } 71 }
69 72
70 #endif 73 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698