Chromium Code Reviews| Index: ui/views/view.h |
| diff --git a/ui/views/view.h b/ui/views/view.h |
| index 147785c6a86b255dc5e279a35c33d7bb0b7aa76b..152ad5a41971cb0c696bcc0672fa95153cd03c20 100644 |
| --- a/ui/views/view.h |
| +++ b/ui/views/view.h |
| @@ -334,10 +334,13 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, |
| // Sets whether this view paints to a layer. A view paints to a layer if |
| // either of the following are true: |
| // . the view has a non-identity transform. |
| - // . SetPaintToLayer(true) has been invoked. |
| + // . SetPaintToLayer(ui::LayerType) has been invoked. |
| // View creates the Layer only when it exists in a Widget with a non-NULL |
| // Compositor. |
| - void SetPaintToLayer(bool paint_to_layer); |
| + void SetPaintToLayer(ui::LayerType layer_type = ui::LAYER_TEXTURED); |
| + |
| + // Removes |view|'s layer if it has its own. |
| + void DetachLayer(); |
|
sky
2017/01/23 17:10:08
DetachLayer doesn't convey this destroys the layer
|
| // Overridden from ui::LayerOwner: |
| std::unique_ptr<ui::Layer> RecreateLayer() override; |
| @@ -1369,7 +1372,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, |
| // Accelerated painting ------------------------------------------------------ |
| // Creates the layer and related fields for this view. |
| - void CreateLayer(); |
| + void CreateLayer(ui::LayerType layer_type); |
| // Recursively calls UpdateParentLayers() on all descendants, stopping at any |
| // Views that have layers. Calls UpdateParentLayer() for any Views that have |