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

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

Issue 228183002: cc: Move ResourcePool ownership to LTHI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/direct_raster_worker_pool.h ('k') | cc/resources/image_raster_worker_pool.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/direct_raster_worker_pool.h" 5 #include "cc/resources/direct_raster_worker_pool.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/output/context_provider.h" 8 #include "cc/output/context_provider.h"
9 #include "cc/resources/resource.h" 9 #include "cc/resources/resource.h"
10 #include "cc/resources/resource_provider.h" 10 #include "cc/resources/resource_provider.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 ScheduleRunTasksOnOriginThread(); 96 ScheduleRunTasksOnOriginThread();
97 97
98 raster_tasks_.Swap(queue); 98 raster_tasks_.Swap(queue);
99 99
100 raster_finished_task_ = new_raster_finished_task; 100 raster_finished_task_ = new_raster_finished_task;
101 raster_required_for_activation_finished_task_ = 101 raster_required_for_activation_finished_task_ =
102 new_raster_required_for_activation_finished_task; 102 new_raster_required_for_activation_finished_task;
103 } 103 }
104 104
105 unsigned DirectRasterWorkerPool::GetResourceTarget() const {
106 return GL_TEXTURE_2D;
107 }
108
109 ResourceFormat DirectRasterWorkerPool::GetResourceFormat() const {
110 return resource_provider_->best_texture_format();
111 }
112
113 void DirectRasterWorkerPool::CheckForCompletedTasks() { 105 void DirectRasterWorkerPool::CheckForCompletedTasks() {
114 TRACE_EVENT0("cc", "DirectRasterWorkerPool::CheckForCompletedTasks"); 106 TRACE_EVENT0("cc", "DirectRasterWorkerPool::CheckForCompletedTasks");
115 107
116 for (internal::RasterizerTask::Vector::const_iterator it = 108 for (internal::RasterizerTask::Vector::const_iterator it =
117 completed_tasks_.begin(); 109 completed_tasks_.begin();
118 it != completed_tasks_.end(); 110 it != completed_tasks_.end();
119 ++it) { 111 ++it) {
120 internal::RasterizerTask* task = it->get(); 112 internal::RasterizerTask* task = it->get();
121 113
122 task->RunReplyOnOriginThread(); 114 task->RunReplyOnOriginThread();
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 task->WillRun(); 218 task->WillRun();
227 task->RunOnOriginThread(); 219 task->RunOnOriginThread();
228 task->DidRun(); 220 task->DidRun();
229 221
230 task->WillComplete(); 222 task->WillComplete();
231 task->CompleteOnOriginThread(this); 223 task->CompleteOnOriginThread(this);
232 task->DidComplete(); 224 task->DidComplete();
233 } 225 }
234 226
235 } // namespace cc 227 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/direct_raster_worker_pool.h ('k') | cc/resources/image_raster_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698