Lines Matching refs:layer
32 #include "ui/compositor/layer.h"
102 // Depth first search for the first Window with a layer to stack relative
105 ui::Layer* FindStackingTargetLayerDown(aura::Window* target,
110 if (target->layer())
111 return target->layer();
115 ui::Layer* layer = FindStackingTargetLayerDown<T>(*i, ignore);
116 if (layer)
117 return layer;
124 // template type) and ignoring |ignore|. Returns the Layer of the first Window
125 // encountered with a Layer.
127 ui::Layer* FindStackingLayerInSiblings(aura::Window* target,
133 ui::Layer* layer = FindStackingTargetLayerDown<T>(*i, ignore);
134 if (layer)
135 return layer;
140 // Returns the first Window that has a Layer. This does a depth first search
142 // first search through siblings of all ancestors until a Layer is found or an
143 // ancestor with a layer is found. This is intended to locate a layer to stack
146 ui::Layer* FindStackingTargetLayer(aura::Window* target, aura::Window* ignore) {
147 ui::Layer* result = FindStackingTargetLayerDown<T>(target, ignore);
151 ui::Layer* result = FindStackingLayerInSiblings<T>(target, ignore);
155 if (target->layer())
163 void GetLayersToStack(aura::Window* child, std::vector<ui::Layer*>* layers) {
164 if (child->layer()) {
165 layers->push_back(child->layer());
288 // If we have layer it will either be destroyed by |layer_owner_|'s dtor, or
289 // by whoever acquired it. We don't have a layer if Init() wasn't invoked or
303 layer_ = new ui::Layer(WindowLayerTypeToUILayerType(window_layer_type));
314 ui::Layer* Window::RecreateLayer() {
315 // Disconnect the old layer, but don't delete it.
316 ui::Layer* old_layer = AcquireLayer();
322 layer_ = new ui::Layer(old_layer->type());
334 // Install new layer as a sibling of the old layer, stacked below it.
339 // Migrate all the child layers over to the new layer. Copy the list because
341 std::vector<ui::Layer*> children_copy = old_layer->children();
342 for (std::vector<ui::Layer*>::const_iterator it = children_copy.begin();
345 ui::Layer* child = *it;
403 // Layer visibility can be inconsistent with window visibility, for example
406 // so the layer will be visible for some time after Hide() is called).
497 // We have a layer but our parent (who is valid) doesn't. This means the
498 // coordinates of the layer are relative to the first ancestor with a layer;
513 // Notification of paint scheduled happens for the window with a layer.
565 child->ReparentLayers(ancestor_with_layer->layer(), offset);
671 ui::Layer::ConvertPointToLayer(source->layer_, target->layer_, point);
673 ui::Layer::ConvertPointToLayer(source->layer_, target->layer_, point);
945 // Always need to set the layer's bounds -- even if it is to the same thing.
963 // If we are currently not the layer's delegate, we will not get bounds
964 // changed notification from the layer (this typically happens after animating
1112 // Only remove the layer if we still own it. Someone else may have acquired
1129 void Window::ReparentLayers(ui::Layer* parent_layer,
1269 ui::Layer* ancestor_layer =
1270 ancestor_with_layer ? ancestor_with_layer->layer() : NULL;
1281 typedef std::vector<ui::Layer*> Layers;
1287 ui::Layer* target_layer;