summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_unittest_context.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/trees/layer_tree_host_unittest_context.cc')
-rw-r--r--cc/trees/layer_tree_host_unittest_context.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index f2785a6..0c0a8de 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -8,6 +8,8 @@
#include "cc/debug/test_context_provider.h"
#include "cc/debug/test_web_graphics_context_3d.h"
#include "cc/layers/content_layer.h"
+#include "cc/layers/delegated_frame_provider.h"
+#include "cc/layers/delegated_frame_resource_collection.h"
#include "cc/layers/heads_up_display_layer.h"
#include "cc/layers/io_surface_layer.h"
#include "cc/layers/layer_impl.h"
@@ -1113,8 +1115,20 @@ class LayerTreeHostContextTestDontUseLostResources
root->SetAnchorPoint(gfx::PointF());
root->SetIsDrawable(true);
+ scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+ frame_data->render_pass_list.push_back(RenderPass::Create());
+ frame_data->render_pass_list.back()->SetNew(RenderPass::Id(1, 0),
+ gfx::Rect(10, 10),
+ gfx::Rect(10, 10),
+ gfx::Transform());
+
+ delegated_resource_collection_ = new DelegatedFrameResourceCollection;
+ delegated_frame_provider_ = new DelegatedFrameProvider(
+ delegated_resource_collection_.get(), frame_data.Pass());
+
scoped_refptr<FakeDelegatedRendererLayer> delegated =
- FakeDelegatedRendererLayer::Create(NULL);
+ FakeDelegatedRendererLayer::Create(NULL,
+ delegated_frame_provider_.get());
delegated->SetBounds(gfx::Size(10, 10));
delegated->SetAnchorPoint(gfx::PointF());
delegated->SetIsDrawable(true);
@@ -1327,6 +1341,10 @@ class LayerTreeHostContextTestDontUseLostResources
FakeContentLayerClient client_;
bool lost_context_;
+ scoped_refptr<DelegatedFrameResourceCollection>
+ delegated_resource_collection_;
+ scoped_refptr<DelegatedFrameProvider> delegated_frame_provider_;
+
scoped_refptr<VideoFrame> color_video_frame_;
scoped_refptr<VideoFrame> hw_video_frame_;
scoped_refptr<VideoFrame> scaled_hw_video_frame_;