Index: cc/layer_tree_impl.cc |
diff --git a/cc/layer_tree_impl.cc b/cc/layer_tree_impl.cc |
index a113316c77b3dc79bac020ad0c65d8b3af0df422..8cc941eaee04870d1fa54839737e6c70415ff30f 100644 |
--- a/cc/layer_tree_impl.cc |
+++ b/cc/layer_tree_impl.cc |
@@ -106,6 +106,28 @@ FrameRateCounter* LayerTreeImpl::frame_rate_counter() const { |
return layer_tree_host_impl_->fpsCounter(); |
} |
+bool LayerTreeImpl::IsActiveTree() const { |
+ return layer_tree_host_impl_->activeTree() == this; |
+} |
+ |
+bool LayerTreeImpl::IsPendingTree() const { |
+ return layer_tree_host_impl_->pendingTree() == this; |
+} |
+ |
+LayerImpl* LayerTreeImpl::ActiveTreeLayerById(int id) { |
+ LayerTreeImpl* tree = layer_tree_host_impl_->activeTree(); |
+ if (!tree) |
+ return NULL; |
+ return tree->LayerById(id); |
+} |
+ |
+LayerImpl* LayerTreeImpl::PendingTreeLayerById(int id) { |
+ LayerTreeImpl* tree = layer_tree_host_impl_->pendingTree(); |
+ if (!tree) |
+ return NULL; |
+ return tree->LayerById(id); |
+} |
+ |
void LayerTreeImpl::SetNeedsRedraw() { |
layer_tree_host_impl_->setNeedsRedraw(); |
} |