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

Unified Diff: third_party/WebKit/Source/platform/scroll/Scrollbar.cpp

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
Index: third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
index 19538b25345adfea775bd2084f30f5c464d38b67..469b6394d93039316d13b0c77627a23340e1f873 100644
--- a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
+++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
@@ -61,6 +61,8 @@ Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orient
, m_overlapsResizer(false)
, m_isAlphaLocked(false)
, m_elasticOverscroll(0)
+ , m_trackNeedsRepaint(true)
+ , m_thumbNeedsRepaint(true)
{
if (!m_theme)
m_theme = ScrollbarTheme::theme();
@@ -541,6 +543,10 @@ float Scrollbar::scrollableAreaCurrentPos() const
void Scrollbar::setNeedsPaintInvalidation()
{
+ if (m_theme->shouldRepaintAllPartsOnInvalidation()) {
+ m_trackNeedsRepaint = true;
+ m_thumbNeedsRepaint = true;
+ }
if (m_scrollableArea)
m_scrollableArea->setScrollbarNeedsPaintInvalidation(this);
}
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/Scrollbar.h ('k') | third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698