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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 18341009: Refactor cc scrollbar layers to separate solid-color vs desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows compile. Created 7 years, 4 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
« no previous file with comments | « cc/layers/solid_color_scrollbar_layer_impl.cc ('k') | cc/trees/tree_synchronizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 853a1133a6f8efac76c11271ca61f2a8d48b75a7..52a539b94f461e920800d4421991b37e3283012a 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -9,8 +9,8 @@
#include "cc/animation/scrollbar_animation_controller.h"
#include "cc/debug/traced_value.h"
#include "cc/layers/heads_up_display_layer_impl.h"
-#include "cc/layers/painted_scrollbar_layer_impl.h"
#include "cc/layers/render_surface_impl.h"
+#include "cc/layers/scrollbar_layer_impl_base.h"
#include "cc/trees/layer_tree_host_common.h"
#include "cc/trees/layer_tree_host_impl.h"
#include "ui/gfx/size_conversions.h"
@@ -257,6 +257,9 @@ void LayerTreeImpl::ApplyScrollDeltasSinceBeginFrame() {
root_layer(), base::Bind(&ApplyScrollDeltasSinceBeginFrameTo));
}
+// TODO(wjmaclean) This needs to go away, and be replaced with a single core
+// of login that works for both scrollbar layer types. This is already planned
+// as part of the larger pinch-zoom re-factoring viewport.
void LayerTreeImpl::UpdateSolidColorScrollbars() {
DCHECK(settings().solid_color_scrollbars);
@@ -271,13 +274,13 @@ void LayerTreeImpl::UpdateSolidColorScrollbars() {
if (RootContainerLayer())
vertical_adjust = layer_tree_host_impl_->VisibleViewportSize().height() -
RootContainerLayer()->bounds().height();
- if (PaintedScrollbarLayerImpl* horiz =
+ if (ScrollbarLayerImplBase* horiz =
root_scroll->horizontal_scrollbar_layer()) {
horiz->SetVerticalAdjust(vertical_adjust);
horiz->SetVisibleToTotalLengthRatio(
scrollable_viewport.width() / ScrollableSize().width());
}
- if (PaintedScrollbarLayerImpl* vertical =
+ if (ScrollbarLayerImplBase* vertical =
root_scroll->vertical_scrollbar_layer()) {
vertical->SetVerticalAdjust(vertical_adjust);
vertical->SetVisibleToTotalLengthRatio(
« no previous file with comments | « cc/layers/solid_color_scrollbar_layer_impl.cc ('k') | cc/trees/tree_synchronizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698