This source file includes following definitions.
- DeepDeleteLayers
#include "ui/compositor/layer_tree_owner.h"
#include "ui/compositor/layer.h"
namespace ui {
namespace {
void DeepDeleteLayers(Layer* layer) {
std::vector<Layer*> children = layer->children();
for (std::vector<Layer*>::const_iterator it = children.begin();
it != children.end();
++it) {
Layer* child = *it;
DeepDeleteLayers(child);
}
delete layer;
}
}
LayerTreeOwner::LayerTreeOwner(Layer* root) : root_(root) {}
LayerTreeOwner::~LayerTreeOwner() {
if (root_)
DeepDeleteLayers(root_);
}
}