OLD | NEW |
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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 decoder_.reset(); | 284 decoder_.reset(); |
285 | 285 |
286 DLOG(ERROR) << "Failed to create context.\n"; | 286 DLOG(ERROR) << "Failed to create context.\n"; |
287 OnInitializeFailed(reply_message); | 287 OnInitializeFailed(reply_message); |
288 return; | 288 return; |
289 } | 289 } |
290 | 290 |
291 // Initialize the decoder with either the view or pbuffer GLContext. | 291 // Initialize the decoder with either the view or pbuffer GLContext. |
292 if (!decoder_->Initialize(surface_.get(), | 292 if (!decoder_->Initialize(surface_.get(), |
293 context_.get(), | 293 context_.get(), |
294 !surface_id(), | |
295 initial_size_, | 294 initial_size_, |
296 disallowed_features_, | 295 disallowed_features_, |
297 allowed_extensions_.c_str(), | 296 allowed_extensions_.c_str(), |
298 requested_attribs_)) { | 297 requested_attribs_)) { |
299 DLOG(ERROR) << "Failed to initialize decoder."; | 298 DLOG(ERROR) << "Failed to initialize decoder."; |
300 OnInitializeFailed(reply_message); | 299 OnInitializeFailed(reply_message); |
301 return; | 300 return; |
302 } | 301 } |
303 | 302 |
304 if (CommandLine::ForCurrentProcess()->HasSwitch( | 303 if (CommandLine::ForCurrentProcess()->HasSwitch( |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 } | 636 } |
638 | 637 |
639 void GpuCommandBufferStub::SetMemoryAllocation( | 638 void GpuCommandBufferStub::SetMemoryAllocation( |
640 const GpuMemoryAllocation& allocation) { | 639 const GpuMemoryAllocation& allocation) { |
641 allocation_ = allocation; | 640 allocation_ = allocation; |
642 | 641 |
643 SendMemoryAllocationToProxy(allocation); | 642 SendMemoryAllocationToProxy(allocation); |
644 } | 643 } |
645 | 644 |
646 #endif // defined(ENABLE_GPU) | 645 #endif // defined(ENABLE_GPU) |
OLD | NEW |