Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3544)

Unified Diff: cc/layer_tree_impl.cc

Issue 11574026: cc: Add some more infrastructure for two trees (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 80 columns /o\ Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}

Powered by Google App Engine
This is Rietveld 408576698