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

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: Fix tyop 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..f9a99006e8abe3505bfd37cdd845e094ca1837a0 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_trackBackgroudNeedsRepaint(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_trackBackgroudNeedsRepaint = true;
+ m_thumbNeedsRepaint = true;
+ }
if (m_scrollableArea)
m_scrollableArea->setScrollbarNeedsPaintInvalidation(this);
}

Powered by Google App Engine
This is Rietveld 408576698