This source file includes following definitions.
- layer_tree_host_impl_
#include "base/logging.h"
#include "cc/base/swap_promise_monitor.h"
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_host_impl.h"
namespace cc {
SwapPromiseMonitor::SwapPromiseMonitor(LayerTreeHost* layer_tree_host,
LayerTreeHostImpl* layer_tree_host_impl)
: layer_tree_host_(layer_tree_host),
layer_tree_host_impl_(layer_tree_host_impl) {
DCHECK((layer_tree_host && !layer_tree_host_impl) ||
(!layer_tree_host && layer_tree_host_impl));
if (layer_tree_host_)
layer_tree_host_->InsertSwapPromiseMonitor(this);
if (layer_tree_host_impl_)
layer_tree_host_impl_->InsertSwapPromiseMonitor(this);
}
SwapPromiseMonitor::~SwapPromiseMonitor() {
if (layer_tree_host_)
layer_tree_host_->RemoveSwapPromiseMonitor(this);
if (layer_tree_host_impl_)
layer_tree_host_impl_->RemoveSwapPromiseMonitor(this);
}
}