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

Unified Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 26023004: aura: Allow delegated frames to be used by more than one impl layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: frameprovider: are_layers_attached checks Created 7 years, 2 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
« no previous file with comments | « cc/test/fake_delegated_renderer_layer_impl.cc ('k') | cc/trees/layer_tree_host_unittest_delegated.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_context.cc
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index f2785a6fbd940075d9bca2346635703bbce42d47..0c0a8de6490078fc0c589f9194b10d36ad22545b 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_;
« no previous file with comments | « cc/test/fake_delegated_renderer_layer_impl.cc ('k') | cc/trees/layer_tree_host_unittest_delegated.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698