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

Unified Diff: ui/views/view.h

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/view.h
diff --git a/ui/views/view.h b/ui/views/view.h
index 147785c6a86b255dc5e279a35c33d7bb0b7aa76b..22718f35e597577bc62d4256449a1dc7695623ab 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -27,6 +27,7 @@
#include "ui/base/ui_base_types.h"
#include "ui/compositor/layer_delegate.h"
#include "ui/compositor/layer_owner.h"
+#include "ui/compositor/layer_type.h"
#include "ui/compositor/paint_cache.h"
#include "ui/events/event.h"
#include "ui/events/event_target.h"
@@ -334,10 +335,11 @@ 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);
+ // Removes this view's layer if |layer_type| sets to |LAYER_NOT_DRAWN|.
+ void SetPaintToLayer(ui::LayerType layer_type);
sky 2017/01/20 20:32:07 WDYT of a default of TEXTURED as that is typically
// Overridden from ui::LayerOwner:
std::unique_ptr<ui::Layer> RecreateLayer() override;
@@ -1369,7 +1371,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

Powered by Google App Engine
This is Rietveld 408576698