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

Unified Diff: ui/views/animation/ink_drop_host_view.cc

Issue 2709283002: Avoid to change layer type in InkDropHostView::AddInkDropLayer (Closed)
Patch Set: add comments Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/ink_drop_host_view.cc
diff --git a/ui/views/animation/ink_drop_host_view.cc b/ui/views/animation/ink_drop_host_view.cc
index 4d56b362811719b2946030e148d45c7edd21af21..160351773c2f35f9a1b40d52799d20d9f8726ee9 100644
--- a/ui/views/animation/ink_drop_host_view.cc
+++ b/ui/views/animation/ink_drop_host_view.cc
@@ -126,6 +126,8 @@ InkDropHostView::~InkDropHostView() {
}
void InkDropHostView::AddInkDropLayer(ui::Layer* ink_drop_layer) {
+ // Prevent its subclass from created a non textured layer on this view.
+ DCHECK(!layer() || layer()->type() == ui::LAYER_TEXTURED);
old_paint_to_layer_ = layer() != nullptr;
SetPaintToLayer();
sky 2017/02/23 00:58:35 Is this the problematic line? If we only do this t
sky 2017/02/24 00:58:44 What goes wrong if a solid color layer was created
layer()->SetFillsBoundsOpaquely(false);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698