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

Unified Diff: cc/single_thread_proxy.cc

Issue 11731002: Implement a method to access the non-composited content root layer picture pile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resubmitting, empty files in the review. Created 7 years, 12 months 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/single_thread_proxy.cc
diff --git a/cc/single_thread_proxy.cc b/cc/single_thread_proxy.cc
index 91ac9520dd780d09804535fc3962a793fd1a3fce..f1ba4a4cd520aa732180043f6fe32394eefabc80 100644
--- a/cc/single_thread_proxy.cc
+++ b/cc/single_thread_proxy.cc
@@ -7,7 +7,11 @@
#include "base/debug/trace_event.h"
#include "cc/draw_quad.h"
#include "cc/layer_tree_host.h"
+#include "cc/layer_tree_impl.h"
#include "cc/output_surface.h"
+#include "cc/picture_layer.h"
+#include "cc/picture_layer_impl.h"
+#include "cc/picture_pile_impl.h"
#include "cc/resource_update_controller.h"
#include "cc/thread.h"
@@ -404,4 +408,15 @@ bool SingleThreadProxy::commitPendingForTesting()
return false;
}
+scoped_refptr<PicturePileImpl> SingleThreadProxy::capturePicturePile(const PictureLayer* layer)
enne (OOO) 2013/01/02 19:35:22 Please just make this a NOTREACHED(). Impl-side p
Leandro GraciĆ” Gil 2013/01/03 20:32:10 Done.
+{
+ LayerTreeImpl* tree = m_layerTreeHostImpl->pendingTree() ? m_layerTreeHostImpl->pendingTree() : m_layerTreeHostImpl->activeTree();
+ LayerImpl* layer_impl = tree->LayerById(layer->id());
+ if (!layer_impl)
+ return scoped_refptr<PicturePileImpl>();
+
+ const PictureLayerImpl* picture_layer_impl = static_cast<PictureLayerImpl*>(layer_impl);
+ return picture_layer_impl->pile()->CloneForDrawing();
+}
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698