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 | |
144 #if defined(OS_MACOSX) | 132 #if defined(OS_MACOSX) |
145 namespace { | 133 namespace { |
146 const unsigned int kMaxOutstandingSwapBuffersCallsPerOnscreenContext = 1; | 134 const unsigned int kMaxOutstandingSwapBuffersCallsPerOnscreenContext = 1; |
147 } | 135 } |
148 #endif | 136 #endif |
149 | 137 |
150 void GpuScheduler::PutChanged() { | 138 void GpuScheduler::PutChanged() { |
151 TRACE_EVENT1("gpu", "GpuScheduler:PutChanged", "this", this); | 139 TRACE_EVENT1("gpu", "GpuScheduler:PutChanged", "this", this); |
152 | 140 |
153 DCHECK(IsScheduled()); | 141 DCHECK(IsScheduled()); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 parser_(parser), | 257 parser_(parser), |
270 unscheduled_count_(0), | 258 unscheduled_count_(0), |
271 #if defined(OS_MACOSX) | 259 #if defined(OS_MACOSX) |
272 swap_buffers_count_(0), | 260 swap_buffers_count_(0), |
273 acknowledged_swap_buffers_count_(0), | 261 acknowledged_swap_buffers_count_(0), |
274 #endif | 262 #endif |
275 method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 263 method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
276 } | 264 } |
277 | 265 |
278 } // namespace gpu | 266 } // namespace gpu |
OLD | NEW |