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

Side by Side Diff: gpu/command_buffer/service/gpu_scheduler.cc

Issue 20017005: gpu: Refactor GpuMemoryBuffer framework for multi-process support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include proper internalformat support.[D Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "gpu/command_buffer/service/gpu_scheduler.h" 5 #include "gpu/command_buffer/service/gpu_scheduler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 command_buffer_->SetGetOffset(static_cast<int32>(parser_->get())); 210 command_buffer_->SetGetOffset(static_cast<int32>(parser_->get()));
211 return true; 211 return true;
212 } 212 }
213 return false; 213 return false;
214 } 214 }
215 215
216 int32 GpuScheduler::GetGetOffset() { 216 int32 GpuScheduler::GetGetOffset() {
217 return parser_->get(); 217 return parser_->get();
218 } 218 }
219 219
220 gfx::GLImage* GpuScheduler::GetImage(int32 image_id) {
221 return command_buffer_->GetImage(image_id);
222 }
223
220 void GpuScheduler::SetCommandProcessedCallback( 224 void GpuScheduler::SetCommandProcessedCallback(
221 const base::Closure& callback) { 225 const base::Closure& callback) {
222 command_processed_callback_ = callback; 226 command_processed_callback_ = callback;
223 } 227 }
224 228
225 void GpuScheduler::DeferToFence(base::Closure task) { 229 void GpuScheduler::DeferToFence(base::Closure task) {
226 unschedule_fences_.push(make_linked_ptr( 230 unschedule_fences_.push(make_linked_ptr(
227 new UnscheduleFence(gfx::GLFence::Create(), task))); 231 new UnscheduleFence(gfx::GLFence::Create(), task)));
228 SetScheduled(false); 232 SetScheduled(false);
229 } 233 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 base::Closure task_) 305 base::Closure task_)
302 : fence(fence_), 306 : fence(fence_),
303 issue_time(base::Time::Now()), 307 issue_time(base::Time::Now()),
304 task(task_) { 308 task(task_) {
305 } 309 }
306 310
307 GpuScheduler::UnscheduleFence::~UnscheduleFence() { 311 GpuScheduler::UnscheduleFence::~UnscheduleFence() {
308 } 312 }
309 313
310 } // namespace gpu 314 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698