Home | History | Annotate | Download | only in views

Lines Matching refs:Layer

23 #include "ui/compositor/layer.h"
371 return layer()->GetTargetBounds();
452 // TODO(beng): not sure we should be doing this if we have a layer.
490 return layer() ? layer()->transform() : gfx::Transform();
495 if (layer()) {
496 layer()->SetTransform(transform);
503 if (!layer())
505 layer()->SetTransform(transform);
506 layer()->ScheduleDraw();
512 if (paint_to_layer_ && !layer()) {
514 } else if (!paint_to_layer_ && layer()) {
519 ui::Layer* View::RecreateLayer() {
520 ui::Layer* layer = AcquireLayer();
521 if (!layer)
525 layer_->set_scale_content(layer->scale_content());
526 return layer;
767 if (layer()) {
768 layer()->SchedulePaint(rect);
1408 if (!child_at(i)->layer())
1439 // This method should not have the side-effect of creating the layer.
1440 if (layer())
1441 layer()->SetFillsBoundsOpaquely(fills_bounds_opaquely);
1445 ui::Layer** layer_parent) {
1446 if (layer()) {
1448 *layer_parent = layer();
1459 if (!layer())
1462 ui::Layer* parent_layer = NULL;
1471 void View::MoveLayerToParent(ui::Layer* parent_layer,
1474 if (parent_layer != layer())
1476 if (layer() && parent_layer != layer()) {
1477 parent_layer->Add(layer());
1490 for (const View* v = parent_; visible && v && !v->layer(); v = v->parent_)
1497 if (layer()) {
1498 layer()->SetVisible(ancestor_visible && visible_);
1506 if (layer()) {
1518 if (!layer() || !layer()->fills_bounds_opaquely())
1533 while (v && !v->layer())
1539 ui::Layer* layer = widget->GetLayer();
1540 if (layer)
1541 widget->GetRootView()->ReorderChildLayers(layer);
1544 v->ReorderChildLayers(v->layer());
1550 // reordering because the associated NativeView's layer (if it has one)
1551 // is parented to the widget's layer regardless of whether the host view has
1552 // an ancestor with a layer.
1557 void View::ReorderChildLayers(ui::Layer* parent_layer) {
1558 if (layer() && layer() != parent_layer) {
1559 DCHECK_EQ(parent_layer, layer()->parent());
1560 parent_layer->StackAtBottom(layer());
1562 // Iterate backwards through the children so that a child with a layer
1724 if (layer()) {
1725 if (layer()->texture())
1730 if (layer()->fills_bounds_opaquely())
1777 // If we have a layer and the View's size did not change, we do not need to
1778 // schedule any paints since the layer will be redrawn at its new location
1780 if (!layer() || type == SCHEDULE_PAINT_SIZE_CHANGED) {
1781 // Otherwise, if the size changes or we don't have a layer then we need to
1787 // tell the compositor to redraw the scene. We know layer() exists due to
1789 layer()->ScheduleDraw();
1892 if (details.is_add && layer() && !layer()->parent()) {
1939 if (layer()) {
1950 !layer()->layer_updated_externally()) {
1953 layer()->SchedulePaint(GetLocalBounds());
1956 // If our bounds have changed, then any descendant layer bounds may
2034 layer()->SetBounds(bounds);
2099 // A new layer is being created for the view. So all the layers of the
2104 layer_ = new ui::Layer();
2114 // The new layer needs to be ordered in the layer tree according
2115 // to the view tree. Children of this layer were added in order
2127 if (layer() && !layer()->parent()) {
2136 if (layer()) {
2137 if (layer()->parent())
2138 layer()->parent()->Remove(layer());
2140 // The layer belonging to this View has already been orphaned. It is not
2148 void View::ReparentLayer(const gfx::Vector2d& offset, ui::Layer* parent_layer) {
2150 DCHECK_NE(layer(), parent_layer);
2152 parent_layer->Add(layer());
2154 MoveLayerToParent(layer(), gfx::Point());
2158 ui::Layer* new_parent = layer()->parent();
2159 std::vector<ui::Layer*> children = layer()->children();
2161 layer()->Remove(children[i]);