| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/test/layer_tree_pixel_resource_test.h" | 5 #include "cc/test/layer_tree_pixel_resource_test.h" |
| 6 | 6 |
| 7 #include "cc/layers/layer.h" | 7 #include "cc/layers/layer.h" |
| 8 #include "cc/raster/bitmap_raster_buffer_provider.h" | 8 #include "cc/raster/bitmap_raster_buffer_provider.h" |
| 9 #include "cc/raster/gpu_raster_buffer_provider.h" | 9 #include "cc/raster/gpu_raster_buffer_provider.h" |
| 10 #include "cc/raster/one_copy_raster_buffer_provider.h" | 10 #include "cc/raster/one_copy_raster_buffer_provider.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 ContextProvider* compositor_context_provider = | 118 ContextProvider* compositor_context_provider = |
| 119 host_impl->output_surface()->context_provider(); | 119 host_impl->output_surface()->context_provider(); |
| 120 ContextProvider* worker_context_provider = | 120 ContextProvider* worker_context_provider = |
| 121 host_impl->output_surface()->worker_context_provider(); | 121 host_impl->output_surface()->worker_context_provider(); |
| 122 ResourceProvider* resource_provider = host_impl->resource_provider(); | 122 ResourceProvider* resource_provider = host_impl->resource_provider(); |
| 123 int max_bytes_per_copy_operation = 1024 * 1024; | 123 int max_bytes_per_copy_operation = 1024 * 1024; |
| 124 int max_staging_buffer_usage_in_bytes = 32 * 1024 * 1024; | 124 int max_staging_buffer_usage_in_bytes = 32 * 1024 * 1024; |
| 125 | 125 |
| 126 // Create resource pool. | 126 // Create resource pool. |
| 127 *resource_pool = ResourcePool::Create(resource_provider, task_runner); | 127 *resource_pool = ResourcePool::Create(resource_provider, task_runner, |
| 128 ResourcePool::kDefaultExpirationDelay); |
| 128 | 129 |
| 129 switch (raster_buffer_provider_type_) { | 130 switch (raster_buffer_provider_type_) { |
| 130 case RASTER_BUFFER_PROVIDER_TYPE_BITMAP: | 131 case RASTER_BUFFER_PROVIDER_TYPE_BITMAP: |
| 131 EXPECT_FALSE(compositor_context_provider); | 132 EXPECT_FALSE(compositor_context_provider); |
| 132 EXPECT_EQ(PIXEL_TEST_SOFTWARE, test_type_); | 133 EXPECT_EQ(PIXEL_TEST_SOFTWARE, test_type_); |
| 133 | 134 |
| 134 *raster_buffer_provider = | 135 *raster_buffer_provider = |
| 135 BitmapRasterBufferProvider::Create(resource_provider); | 136 BitmapRasterBufferProvider::Create(resource_provider); |
| 136 break; | 137 break; |
| 137 case RASTER_BUFFER_PROVIDER_TYPE_GPU: | 138 case RASTER_BUFFER_PROVIDER_TYPE_GPU: |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 if (!IsTestCaseSupported(test_case_)) | 173 if (!IsTestCaseSupported(test_case_)) |
| 173 return; | 174 return; |
| 174 RunPixelTest(test_type_, content_root, file_name); | 175 RunPixelTest(test_type_, content_root, file_name); |
| 175 } | 176 } |
| 176 | 177 |
| 177 ParameterizedPixelResourceTest::ParameterizedPixelResourceTest() | 178 ParameterizedPixelResourceTest::ParameterizedPixelResourceTest() |
| 178 : LayerTreeHostPixelResourceTest(GetParam()) { | 179 : LayerTreeHostPixelResourceTest(GetParam()) { |
| 179 } | 180 } |
| 180 | 181 |
| 181 } // namespace cc | 182 } // namespace cc |
| OLD | NEW |