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

Unified Diff: ui/views/controls/scrollbar/cocoa_scroll_bar.mm

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/scrollbar/cocoa_scroll_bar.mm
diff --git a/ui/views/controls/scrollbar/cocoa_scroll_bar.mm b/ui/views/controls/scrollbar/cocoa_scroll_bar.mm
index 9d54b673b7772dac0d8b2fdf12c75d8f286a4249..57580c34d54e3bbfd70fca911257b85e7afb8777 100644
--- a/ui/views/controls/scrollbar/cocoa_scroll_bar.mm
+++ b/ui/views/controls/scrollbar/cocoa_scroll_bar.mm
@@ -9,6 +9,7 @@
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animator.h"
+#include "ui/compositor/layer_type.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/gfx/canvas.h"
#include "ui/views/controls/scrollbar/base_scroll_bar_thumb.h"
@@ -95,7 +96,7 @@ CocoaScrollBarThumb::CocoaScrollBarThumb(CocoaScrollBar* scroll_bar)
// This is necessary, otherwise the thumb will be rendered below the views if
// those views paint to their own layers.
- SetPaintToLayer(true);
+ SetPaintToLayer(ui::LAYER_TEXTURED);
layer()->SetFillsBoundsOpaquely(false);
}
@@ -177,7 +178,7 @@ CocoaScrollBar::CocoaScrollBar(bool horizontal)
thickness_animation_.SetSlideDuration(kExpandDurationMs);
- SetPaintToLayer(true);
+ SetPaintToLayer(ui::LAYER_TEXTURED);
has_scrolltrack_ = scroller_style_ == NSScrollerStyleLegacy;
layer()->SetOpacity(scroller_style_ == NSScrollerStyleOverlay ? 0.0f : 1.0f);
}

Powered by Google App Engine
This is Rietveld 408576698