Index: cc/layers/painted_scrollbar_layer.cc |
diff --git a/cc/layers/painted_scrollbar_layer.cc b/cc/layers/painted_scrollbar_layer.cc |
index c0b2a728e3c9077c46a7f194dce94174d0780fd0..84624d6a04801d4e06e4a83c6ec1e0871fbd6595 100644 |
--- a/cc/layers/painted_scrollbar_layer.cc |
+++ b/cc/layers/painted_scrollbar_layer.cc |
@@ -41,7 +41,8 @@ PaintedScrollbarLayer::PaintedScrollbarLayer(scoped_ptr<Scrollbar> scrollbar, |
thumb_thickness_(scrollbar_->ThumbThickness()), |
thumb_length_(scrollbar_->ThumbLength()), |
is_overlay_(scrollbar_->IsOverlay()), |
- has_thumb_(scrollbar_->HasThumb()) { |
+ has_thumb_(scrollbar_->HasThumb()), |
+ cache_has_thumb_(false) { |
if (!scrollbar_->IsOverlay()) |
SetShouldScrollOnMainThread(true); |
} |
@@ -189,9 +190,10 @@ void PaintedScrollbarLayer::UpdateThumbAndTrackGeometry() { |
UpdateProperty(scrollbar_->Location(), &location_); |
UpdateProperty(scrollbar_->IsOverlay(), &is_overlay_); |
UpdateProperty(scrollbar_->HasThumb(), &has_thumb_); |
- if (has_thumb_) { |
+ if ((cache_has_thumb_ != has_thumb_) || has_thumb_) { |
danakj
2014/09/03 15:38:27
I mean you don't need to add this cache_has_thumb_
|
UpdateProperty(scrollbar_->ThumbThickness(), &thumb_thickness_); |
UpdateProperty(scrollbar_->ThumbLength(), &thumb_length_); |
+ cache_has_thumb_ = has_thumb_; |
} |
} |