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

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 106733005: Update overlay scrollbars (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add IsThumbResizable() method to allow PaintedScrollbarLayerImpl to avoid paint damage when ratio c… Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/animation/keyframed_animation_curve.h" 8 #include "cc/animation/keyframed_animation_curve.h"
9 #include "cc/animation/scrollbar_animation_controller.h" 9 #include "cc/animation/scrollbar_animation_controller.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 vertical->SetVerticalAdjust(vertical_adjust); 346 vertical->SetVerticalAdjust(vertical_adjust);
347 vertical->SetVisibleToTotalLengthRatio( 347 vertical->SetVisibleToTotalLengthRatio(
348 scrollable_viewport.height() / ScrollableSize().height()); 348 scrollable_viewport.height() / ScrollableSize().height());
349 } 349 }
350 } 350 }
351 351
352 void LayerTreeImpl::UpdateDrawProperties() { 352 void LayerTreeImpl::UpdateDrawProperties() {
353 if (IsActiveTree() && RootScrollLayer() && RootContainerLayer()) 353 if (IsActiveTree() && RootScrollLayer() && RootContainerLayer())
354 UpdateRootScrollLayerSizeDelta(); 354 UpdateRootScrollLayerSizeDelta();
355 355
356 if (IsActiveTree() && 356 if (IsActiveTree() && RootContainerLayer())
357 RootContainerLayer()
358 && !RootContainerLayer()->masks_to_bounds()) {
359 UpdateSolidColorScrollbars(); 357 UpdateSolidColorScrollbars();
360 }
361 358
362 needs_update_draw_properties_ = false; 359 needs_update_draw_properties_ = false;
363 render_surface_layer_list_.clear(); 360 render_surface_layer_list_.clear();
364 361
365 // For max_texture_size. 362 // For max_texture_size.
366 if (!layer_tree_host_impl_->renderer()) 363 if (!layer_tree_host_impl_->renderer())
367 return; 364 return;
368 365
369 if (!root_layer()) 366 if (!root_layer())
370 return; 367 return;
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 const std::vector<LayerImpl*>& LayerTreeImpl::LayersWithCopyOutputRequest() 790 const std::vector<LayerImpl*>& LayerTreeImpl::LayersWithCopyOutputRequest()
794 const { 791 const {
795 // Only the active tree needs to know about layers with copy requests, as 792 // Only the active tree needs to know about layers with copy requests, as
796 // they are aborted if not serviced during draw. 793 // they are aborted if not serviced during draw.
797 DCHECK(IsActiveTree()); 794 DCHECK(IsActiveTree());
798 795
799 return layers_with_copy_output_request_; 796 return layers_with_copy_output_request_;
800 } 797 }
801 798
802 } // namespace cc 799 } // namespace cc
OLDNEW
« cc/layers/scrollbar_layer_impl_base.h ('K') | « cc/layers/solid_color_scrollbar_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698