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 |