Index: cc/test/layer_tree_pixel_resource_test.cc |
diff --git a/cc/test/layer_tree_pixel_resource_test.cc b/cc/test/layer_tree_pixel_resource_test.cc |
index 1bd398921b3358d0a9e3cddb3ed4675bb7b63d88..bc323f138dc2b6368a502b8b7051956e47527bc4 100644 |
--- a/cc/test/layer_tree_pixel_resource_test.cc |
+++ b/cc/test/layer_tree_pixel_resource_test.cc |
@@ -127,7 +127,8 @@ |
void LayerTreeHostPixelResourceTest::CreateResourceAndTileTaskWorkerPool( |
LayerTreeHostImpl* host_impl, |
scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, |
- scoped_ptr<ResourcePool>* resource_pool) { |
+ scoped_ptr<ResourcePool>* resource_pool, |
+ scoped_ptr<ResourcePool>* staging_resource_pool) { |
base::SingleThreadTaskRunner* task_runner = |
proxy()->HasImplThread() ? proxy()->ImplThreadTaskRunner() |
: proxy()->MainThreadTaskRunner(); |
@@ -139,7 +140,6 @@ |
ResourceProvider* resource_provider = host_impl->resource_provider(); |
size_t max_transfer_buffer_usage_bytes = 1024u * 1024u * 60u; |
int max_bytes_per_copy_operation = 1024 * 1024; |
- int max_staging_buffers = 32; |
switch (resource_pool_option_) { |
case BITMAP_TILE_TASK_WORKER_POOL: |
@@ -177,13 +177,15 @@ |
EXPECT_TRUE(context_provider); |
EXPECT_EQ(PIXEL_TEST_GL, test_type_); |
EXPECT_TRUE(host_impl->GetRendererCapabilities().using_image); |
+ // We need to create a staging resource pool when using copy rasterizer. |
+ *staging_resource_pool = |
+ ResourcePool::Create(resource_provider, staging_texture_target_); |
*resource_pool = |
ResourcePool::Create(resource_provider, draw_texture_target_); |
*tile_task_worker_pool = OneCopyTileTaskWorkerPool::Create( |
task_runner, task_graph_runner(), context_provider, resource_provider, |
- max_bytes_per_copy_operation, false, staging_texture_target_, |
- max_staging_buffers); |
+ staging_resource_pool->get(), max_bytes_per_copy_operation, false); |
break; |
case PIXEL_BUFFER_TILE_TASK_WORKER_POOL: |
EXPECT_TRUE(context_provider); |