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

Unified Diff: cc/layers/scrollbar_layer_impl_base.cc

Issue 571873003: [Android]Optimization of scrollbar animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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: cc/layers/scrollbar_layer_impl_base.cc
diff --git a/cc/layers/scrollbar_layer_impl_base.cc b/cc/layers/scrollbar_layer_impl_base.cc
index 62b7dee0ad9c297f99d22a4826cdaf498ac21d96..c1878b90df916c9348c739ac9118cb3214661d46 100644
--- a/cc/layers/scrollbar_layer_impl_base.cc
+++ b/cc/layers/scrollbar_layer_impl_base.cc
@@ -105,42 +105,47 @@ gfx::Rect ScrollbarLayerImplBase::ScrollbarLayerRectToContentRect(
return gfx::ToEnclosingRect(content_rect);
}
-void ScrollbarLayerImplBase::SetCurrentPos(float current_pos) {
+bool ScrollbarLayerImplBase::SetCurrentPos(float current_pos) {
if (current_pos_ == current_pos)
- return;
+ return false;
current_pos_ = current_pos;
NoteLayerPropertyChanged();
+ return true;
}
-void ScrollbarLayerImplBase::SetMaximum(int maximum) {
+bool ScrollbarLayerImplBase::SetMaximum(int maximum) {
if (maximum_ == maximum)
- return;
+ return false;
maximum_ = maximum;
NoteLayerPropertyChanged();
+ return true;
}
-void ScrollbarLayerImplBase::SetVerticalAdjust(float vertical_adjust) {
+bool ScrollbarLayerImplBase::SetVerticalAdjust(float vertical_adjust) {
if (vertical_adjust_ == vertical_adjust)
- return;
+ return false;
vertical_adjust_ = vertical_adjust;
NoteLayerPropertyChanged();
+ return true;
}
-void ScrollbarLayerImplBase::SetVisibleToTotalLengthRatio(float ratio) {
+bool ScrollbarLayerImplBase::SetVisibleToTotalLengthRatio(float ratio) {
if (!IsThumbResizable())
- return;
+ return false;
if (visible_to_total_length_ratio_ == ratio)
- return;
+ return false;
visible_to_total_length_ratio_ = ratio;
NoteLayerPropertyChanged();
+ return true;
}
-void ScrollbarLayerImplBase::SetThumbThicknessScaleFactor(float factor) {
+bool ScrollbarLayerImplBase::SetThumbThicknessScaleFactor(float factor) {
if (thumb_thickness_scale_factor_ == factor)
- return;
+ return false;
thumb_thickness_scale_factor_ = factor;
NoteLayerPropertyChanged();
+ return true;
}
gfx::Rect ScrollbarLayerImplBase::ComputeThumbQuadRect() const {

Powered by Google App Engine
This is Rietveld 408576698