OLD | NEW |
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/zero_copy_tile_task_worker_pool.h" | 5 #include "cc/raster/zero_copy_tile_task_worker_pool.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 task->WillComplete(); | 175 task->WillComplete(); |
176 task->CompleteOnOriginThread(this); | 176 task->CompleteOnOriginThread(this); |
177 task->DidComplete(); | 177 task->DidComplete(); |
178 | 178 |
179 task->RunReplyOnOriginThread(); | 179 task->RunReplyOnOriginThread(); |
180 } | 180 } |
181 completed_tasks_.clear(); | 181 completed_tasks_.clear(); |
182 } | 182 } |
183 | 183 |
184 ResourceFormat ZeroCopyTileTaskWorkerPool::GetResourceFormat() const { | 184 ResourceFormat ZeroCopyTileTaskWorkerPool::GetResourceFormat() const { |
185 return resource_provider_->best_texture_format(); | 185 return resource_provider_->memory_efficient_texture_format(); |
186 } | 186 } |
187 | 187 |
188 bool ZeroCopyTileTaskWorkerPool::GetResourceRequiresSwizzle() const { | 188 bool ZeroCopyTileTaskWorkerPool::GetResourceRequiresSwizzle() const { |
189 return !PlatformColor::SameComponentOrder(GetResourceFormat()); | 189 return !PlatformColor::SameComponentOrder(GetResourceFormat()); |
190 } | 190 } |
191 | 191 |
192 scoped_ptr<RasterBuffer> ZeroCopyTileTaskWorkerPool::AcquireBufferForRaster( | 192 scoped_ptr<RasterBuffer> ZeroCopyTileTaskWorkerPool::AcquireBufferForRaster( |
193 const Resource* resource, | 193 const Resource* resource, |
194 uint64_t resource_content_id, | 194 uint64_t resource_content_id, |
195 uint64_t previous_content_id) { | 195 uint64_t previous_content_id) { |
(...skipping 27 matching lines...) Expand all Loading... |
223 new base::trace_event::TracedValue(); | 223 new base::trace_event::TracedValue(); |
224 | 224 |
225 state->BeginArray("tasks_pending"); | 225 state->BeginArray("tasks_pending"); |
226 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) | 226 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) |
227 state->AppendBoolean(tasks_pending_[task_set]); | 227 state->AppendBoolean(tasks_pending_[task_set]); |
228 state->EndArray(); | 228 state->EndArray(); |
229 return state; | 229 return state; |
230 } | 230 } |
231 | 231 |
232 } // namespace cc | 232 } // namespace cc |
OLD | NEW |