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

Side by Side Diff: cc/raster/tile_task_worker_pool_unittest.cc

Issue 1202843008: cc: Fix BytesPerPixel issue and refactor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Android build break. 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 unified diff | Download patch
« no previous file with comments | « cc/raster/pixel_buffer_tile_task_worker_pool.cc ('k') | cc/resources/resource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/raster/tile_task_worker_pool.h" 5 #include "cc/raster/tile_task_worker_pool.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 399
400 TEST_P(TileTaskWorkerPoolTest, LargeResources) { 400 TEST_P(TileTaskWorkerPoolTest, LargeResources) {
401 gfx::Size size(kLargeResourceDimension, kLargeResourceDimension); 401 gfx::Size size(kLargeResourceDimension, kLargeResourceDimension);
402 402
403 { 403 {
404 // Verify a resource of this size is larger than the transfer buffer. 404 // Verify a resource of this size is larger than the transfer buffer.
405 scoped_ptr<ScopedResource> resource( 405 scoped_ptr<ScopedResource> resource(
406 ScopedResource::Create(resource_provider_.get())); 406 ScopedResource::Create(resource_provider_.get()));
407 resource->Allocate(size, ResourceProvider::TEXTURE_HINT_IMMUTABLE, 407 resource->Allocate(size, ResourceProvider::TEXTURE_HINT_IMMUTABLE,
408 RGBA_8888); 408 RGBA_8888);
409 EXPECT_GE(Resource::UncheckedMemorySizeBytes(resource->size(), 409 EXPECT_GE(ResourceUtil::UncheckedSizeInBytes<size_t>(resource->size(),
410 resource->format()), 410 resource->format()),
411 kMaxTransferBufferUsageBytes); 411 kMaxTransferBufferUsageBytes);
412 } 412 }
413 413
414 AppendTask(0u, size); 414 AppendTask(0u, size);
415 AppendTask(1u, size); 415 AppendTask(1u, size);
416 AppendTask(2u, size); 416 AppendTask(2u, size);
417 ScheduleTasks(); 417 ScheduleTasks();
418 418
419 // This will time out if a resource that is larger than the throttle limit 419 // This will time out if a resource that is larger than the throttle limit
420 // never gets scheduled. 420 // never gets scheduled.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 TileTaskWorkerPoolTests, 455 TileTaskWorkerPoolTests,
456 TileTaskWorkerPoolTest, 456 TileTaskWorkerPoolTest,
457 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER, 457 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER,
458 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, 458 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY,
459 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, 459 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY,
460 TILE_TASK_WORKER_POOL_TYPE_GPU, 460 TILE_TASK_WORKER_POOL_TYPE_GPU,
461 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); 461 TILE_TASK_WORKER_POOL_TYPE_BITMAP));
462 462
463 } // namespace 463 } // namespace
464 } // namespace cc 464 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/pixel_buffer_tile_task_worker_pool.cc ('k') | cc/resources/resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698