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

Side by Side Diff: cc/resources/zero_copy_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
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/zero_copy_tile_task_worker_pool.h" 5 #include "cc/resources/zero_copy_tile_task_worker_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/debug/trace_event_argument.h" 10 #include "base/debug/trace_event_argument.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 task->WillComplete(); 159 task->WillComplete();
160 task->CompleteOnOriginThread(this); 160 task->CompleteOnOriginThread(this);
161 task->DidComplete(); 161 task->DidComplete();
162 162
163 task->RunReplyOnOriginThread(); 163 task->RunReplyOnOriginThread();
164 } 164 }
165 completed_tasks_.clear(); 165 completed_tasks_.clear();
166 } 166 }
167 167
168 ResourceFormat ZeroCopyTileTaskWorkerPool::GetResourceFormat() {
169 return resource_provider_->best_texture_format();
170 }
171
168 scoped_ptr<RasterBuffer> ZeroCopyTileTaskWorkerPool::AcquireBufferForRaster( 172 scoped_ptr<RasterBuffer> ZeroCopyTileTaskWorkerPool::AcquireBufferForRaster(
169 const Resource* resource) { 173 const Resource* resource) {
170 return make_scoped_ptr<RasterBuffer>( 174 return make_scoped_ptr<RasterBuffer>(
171 new RasterBufferImpl(resource_provider_, resource)); 175 new RasterBufferImpl(resource_provider_, resource));
172 } 176 }
173 177
174 void ZeroCopyTileTaskWorkerPool::ReleaseBufferForRaster( 178 void ZeroCopyTileTaskWorkerPool::ReleaseBufferForRaster(
175 scoped_ptr<RasterBuffer> buffer) { 179 scoped_ptr<RasterBuffer> buffer) {
176 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. 180 // Nothing to do here. RasterBufferImpl destructor cleans up after itself.
177 } 181 }
(...skipping 19 matching lines...) Expand all
197 new base::debug::TracedValue(); 201 new base::debug::TracedValue();
198 202
199 state->BeginArray("tasks_pending"); 203 state->BeginArray("tasks_pending");
200 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) 204 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set)
201 state->AppendBoolean(tasks_pending_[task_set]); 205 state->AppendBoolean(tasks_pending_[task_set]);
202 state->EndArray(); 206 state->EndArray();
203 return state; 207 return state;
204 } 208 }
205 209
206 } // namespace cc 210 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/zero_copy_tile_task_worker_pool.h ('k') | cc/test/fake_picture_layer_tiling_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698