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

Unified Diff: cc/blink/scrollbar_impl.cc

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/blink/scrollbar_impl.h ('k') | cc/cc_tests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/blink/scrollbar_impl.cc
diff --git a/cc/blink/scrollbar_impl.cc b/cc/blink/scrollbar_impl.cc
index 7efd51375666187b9889a16bf0b9bf00a7ef565e..6f5fe31d12de71d09f44cd1c65eb37d5e1999fae 100644
--- a/cc/blink/scrollbar_impl.cc
+++ b/cc/blink/scrollbar_impl.cc
@@ -63,6 +63,16 @@ gfx::Rect ScrollbarImpl::TrackRect() const {
return geometry_->trackRect(scrollbar_.get());
}
+float ScrollbarImpl::ThumbOpacity() const {
+ return painter_.thumbOpacity();
+}
+
+bool ScrollbarImpl::NeedsPaintPart(cc::ScrollbarPart part) const {
+ if (part == cc::THUMB)
+ return painter_.thumbNeedsRepaint();
+ return painter_.trackNeedsRepaint();
+}
+
void ScrollbarImpl::PaintPart(SkCanvas* canvas,
cc::ScrollbarPart part,
const gfx::Rect& content_rect) {
« no previous file with comments | « cc/blink/scrollbar_impl.h ('k') | cc/cc_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698