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

Unified Diff: cc/raster/pixel_buffer_tile_task_worker_pool.cc

Issue 1202843008: cc: Fix BytesPerPixel issue and refactor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving few functions to their own files. Created 5 years, 6 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
Index: cc/raster/pixel_buffer_tile_task_worker_pool.cc
diff --git a/cc/raster/pixel_buffer_tile_task_worker_pool.cc b/cc/raster/pixel_buffer_tile_task_worker_pool.cc
index df79519485d8d3ee1b1301e24b699c235467c81b..bdd9bbf76ce7f015d9eef39e4c75d0f32bae7bee 100644
--- a/cc/raster/pixel_buffer_tile_task_worker_pool.cc
+++ b/cc/raster/pixel_buffer_tile_task_worker_pool.cc
@@ -438,7 +438,7 @@ void PixelBufferTileTaskWorkerPool::CheckForCompletedUploads() {
// We can use UncheckedMemorySizeBytes here, since these tasks come from
// tiles, the size of which is controlled by the compositor.
- bytes_pending_upload_ -= Resource::UncheckedMemorySizeBytes(
+ bytes_pending_upload_ -= ResourceUtil::UncheckedMemorySizeBytes(
task->resource()->size(), task->resource()->format());
task->WillComplete();
@@ -547,7 +547,7 @@ void PixelBufferTileTaskWorkerPool::ScheduleMoreTasks() {
size_t new_bytes_pending_upload = bytes_pending_upload;
// We can use UncheckedMemorySizeBytes here, since these tasks come from
// tiles, the size of which is controlled by the compositor.
- new_bytes_pending_upload += Resource::UncheckedMemorySizeBytes(
+ new_bytes_pending_upload += ResourceUtil::UncheckedMemorySizeBytes(
task->resource()->size(), task->resource()->format());
if (new_bytes_pending_upload > max_bytes_pending_upload_ &&
bytes_pending_upload) {
@@ -714,7 +714,7 @@ void PixelBufferTileTaskWorkerPool::CheckForCompletedRasterizerTasks() {
// We can use UncheckedMemorySizeBytes here, since these tasks come from
// tiles, the size of which is controlled by the compositor.
- bytes_pending_upload_ += Resource::UncheckedMemorySizeBytes(
+ bytes_pending_upload_ += ResourceUtil::UncheckedMemorySizeBytes(
raster_task->resource()->size(), raster_task->resource()->format());
raster_tasks_with_pending_upload_.push_back(raster_task);
state.type = RasterTaskState::UPLOADING;

Powered by Google App Engine
This is Rietveld 408576698