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

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

Issue 1248253003: Add better support for RGBA_4444 textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and forward flags 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
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/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
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
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
OLDNEW
« no previous file with comments | « cc/raster/tile_task_worker_pool.cc ('k') | chrome/browser/chromeos/login/chrome_restart_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698