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

Unified Diff: cc/test/layer_tree_pixel_resource_test.cc

Issue 1273163004: Revert of cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/layer_tree_pixel_resource_test.h ('k') | cc/test/layer_tree_pixel_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « cc/test/layer_tree_pixel_resource_test.h ('k') | cc/test/layer_tree_pixel_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698