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

Side by Side Diff: cc/resources/pixel_buffer_tile_task_worker_pool.cc

Issue 860813002: Remove the default format from ResourcePool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ResourceFormat from TileManager and call TileTaskRunner::GetResourceFormat() directly instea… Created 5 years, 11 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/resources/pixel_buffer_tile_task_worker_pool.h ('k') | cc/resources/rasterizer.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/resources/pixel_buffer_tile_task_worker_pool.h" 5 #include "cc/resources/pixel_buffer_tile_task_worker_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/containers/stack_container.h" 9 #include "base/containers/stack_container.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 DCHECK_EQ(RasterTaskState::COMPLETED, state_it->type); 300 DCHECK_EQ(RasterTaskState::COMPLETED, state_it->type);
301 301
302 std::swap(*state_it, raster_task_states_.back()); 302 std::swap(*state_it, raster_task_states_.back());
303 raster_task_states_.pop_back(); 303 raster_task_states_.pop_back();
304 304
305 task->RunReplyOnOriginThread(); 305 task->RunReplyOnOriginThread();
306 } 306 }
307 completed_raster_tasks_.clear(); 307 completed_raster_tasks_.clear();
308 } 308 }
309 309
310 ResourceFormat PixelBufferTileTaskWorkerPool::GetResourceFormat() {
311 return resource_provider_->memory_efficient_texture_format();
312 }
313
310 scoped_ptr<RasterBuffer> PixelBufferTileTaskWorkerPool::AcquireBufferForRaster( 314 scoped_ptr<RasterBuffer> PixelBufferTileTaskWorkerPool::AcquireBufferForRaster(
311 const Resource* resource) { 315 const Resource* resource) {
312 return make_scoped_ptr<RasterBuffer>( 316 return make_scoped_ptr<RasterBuffer>(
313 new RasterBufferImpl(resource_provider_, resource)); 317 new RasterBufferImpl(resource_provider_, resource));
314 } 318 }
315 319
316 void PixelBufferTileTaskWorkerPool::ReleaseBufferForRaster( 320 void PixelBufferTileTaskWorkerPool::ReleaseBufferForRaster(
317 scoped_ptr<RasterBuffer> buffer) { 321 scoped_ptr<RasterBuffer> buffer) {
318 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. 322 // Nothing to do here. RasterBufferImpl destructor cleans up after itself.
319 } 323 }
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 void PixelBufferTileTaskWorkerPool::ThrottleStateAsValueInto( 721 void PixelBufferTileTaskWorkerPool::ThrottleStateAsValueInto(
718 base::debug::TracedValue* throttle_state) const { 722 base::debug::TracedValue* throttle_state) const {
719 throttle_state->SetInteger("bytes_available_for_upload", 723 throttle_state->SetInteger("bytes_available_for_upload",
720 max_bytes_pending_upload_ - bytes_pending_upload_); 724 max_bytes_pending_upload_ - bytes_pending_upload_);
721 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); 725 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_);
722 throttle_state->SetInteger("scheduled_raster_task_count", 726 throttle_state->SetInteger("scheduled_raster_task_count",
723 scheduled_raster_task_count_); 727 scheduled_raster_task_count_);
724 } 728 }
725 729
726 } // namespace cc 730 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/pixel_buffer_tile_task_worker_pool.h ('k') | cc/resources/rasterizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698