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

Unified Diff: ui/views/controls/scroll_view.cc

Issue 2639203007: Update SetPaintToLayer to accept LayerType (Closed)
Patch Set: Refactor Created 3 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/scroll_view.cc
diff --git a/ui/views/controls/scroll_view.cc b/ui/views/controls/scroll_view.cc
index 35f7f1b651e64c9c64878a5786022c26bce96be5..4b6a975d7652a023a6b9fa83e5fb1806214b1717 100644
--- a/ui/views/controls/scroll_view.cc
+++ b/ui/views/controls/scroll_view.cc
@@ -7,6 +7,7 @@
#include "base/feature_list.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "ui/compositor/layer_type.h"
#include "ui/events/event.h"
#include "ui/gfx/canvas.h"
#include "ui/native_theme/native_theme.h"
@@ -207,7 +208,7 @@ void ScrollView::SetContents(View* a_view) {
a_view->set_background(
Background::CreateSolidBackground(background_color_));
}
- a_view->SetPaintToLayer(true);
+ a_view->SetPaintToLayer(ui::LAYER_TEXTURED);
a_view->layer()->SetScrollable(
contents_viewport_->layer(),
base::Bind(&ScrollView::OnLayerScrolled, base::Unretained(this)));
@@ -716,7 +717,7 @@ void ScrollView::EnableViewPortLayer() {
background_color_ = SK_ColorWHITE;
contents_viewport_->set_background(
Background::CreateSolidBackground(background_color_));
- contents_viewport_->SetPaintToLayer(true);
+ contents_viewport_->SetPaintToLayer(ui::LAYER_TEXTURED);
contents_viewport_->layer()->SetMasksToBounds(true);
}

Powered by Google App Engine
This is Rietveld 408576698