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

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: rebase 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
« no previous file with comments | « cc/layer_tree_impl.h ('k') | cc/picture_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_impl.cc
diff --git a/cc/layer_tree_impl.cc b/cc/layer_tree_impl.cc
index a113316c77b3dc79bac020ad0c65d8b3af0df422..0c68bb9a6c765779d90dcf30bf5fe0e5bb97b320 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::FindActiveTreeLayerById(int id) {
+ LayerTreeImpl* tree = layer_tree_host_impl_->activeTree();
+ if (!tree)
+ return NULL;
+ return tree->LayerById(id);
+}
+
+LayerImpl* LayerTreeImpl::FindPendingTreeLayerById(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();
}
« no previous file with comments | « cc/layer_tree_impl.h ('k') | cc/picture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698