| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/callback.h" | 7 #include "base/callback.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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 bool GpuScheduler::SetParent(GpuScheduler* parent_scheduler, | 123 bool GpuScheduler::SetParent(GpuScheduler* parent_scheduler, |
| 124 uint32 parent_texture_id) { | 124 uint32 parent_texture_id) { |
| 125 if (parent_scheduler) | 125 if (parent_scheduler) |
| 126 return decoder_->SetParent(parent_scheduler->decoder_.get(), | 126 return decoder_->SetParent(parent_scheduler->decoder_.get(), |
| 127 parent_texture_id); | 127 parent_texture_id); |
| 128 else | 128 else |
| 129 return decoder_->SetParent(NULL, 0); | 129 return decoder_->SetParent(NULL, 0); |
| 130 } | 130 } |
| 131 | 131 |
| 132 bool GpuScheduler::MapExternalResource( |
| 133 resource_type::ResourceType resource_type, |
| 134 uint32 resource_source_id, |
| 135 GpuScheduler* source_scheduler, |
| 136 uint32 resource_dest_id) { |
| 137 return decoder_->MapExternalResource( |
| 138 resource_type, |
| 139 resource_source_id, |
| 140 source_scheduler ? source_scheduler->decoder_.get() : NULL, |
| 141 resource_dest_id); |
| 142 } |
| 143 |
| 132 #if defined(OS_MACOSX) | 144 #if defined(OS_MACOSX) |
| 133 namespace { | 145 namespace { |
| 134 const unsigned int kMaxOutstandingSwapBuffersCallsPerOnscreenContext = 1; | 146 const unsigned int kMaxOutstandingSwapBuffersCallsPerOnscreenContext = 1; |
| 135 } | 147 } |
| 136 #endif | 148 #endif |
| 137 | 149 |
| 138 void GpuScheduler::PutChanged() { | 150 void GpuScheduler::PutChanged() { |
| 139 TRACE_EVENT1("gpu", "GpuScheduler:PutChanged", "this", this); | 151 TRACE_EVENT1("gpu", "GpuScheduler:PutChanged", "this", this); |
| 140 | 152 |
| 141 DCHECK(IsScheduled()); | 153 DCHECK(IsScheduled()); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 parser_(parser), | 269 parser_(parser), |
| 258 unscheduled_count_(0), | 270 unscheduled_count_(0), |
| 259 #if defined(OS_MACOSX) | 271 #if defined(OS_MACOSX) |
| 260 swap_buffers_count_(0), | 272 swap_buffers_count_(0), |
| 261 acknowledged_swap_buffers_count_(0), | 273 acknowledged_swap_buffers_count_(0), |
| 262 #endif | 274 #endif |
| 263 method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 275 method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
| 264 } | 276 } |
| 265 | 277 |
| 266 } // namespace gpu | 278 } // namespace gpu |
| OLD | NEW |