| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 decoder_.reset(); | 288 decoder_.reset(); |
| 289 | 289 |
| 290 DLOG(ERROR) << "Failed to create context.\n"; | 290 DLOG(ERROR) << "Failed to create context.\n"; |
| 291 OnInitializeFailed(reply_message); | 291 OnInitializeFailed(reply_message); |
| 292 return; | 292 return; |
| 293 } | 293 } |
| 294 | 294 |
| 295 // Initialize the decoder with either the view or pbuffer GLContext. | 295 // Initialize the decoder with either the view or pbuffer GLContext. |
| 296 if (!decoder_->Initialize(surface_.get(), | 296 if (!decoder_->Initialize(surface_.get(), |
| 297 context_.get(), | 297 context_.get(), |
| 298 !surface_id(), |
| 298 initial_size_, | 299 initial_size_, |
| 299 disallowed_features_, | 300 disallowed_features_, |
| 300 allowed_extensions_.c_str(), | 301 allowed_extensions_.c_str(), |
| 301 requested_attribs_)) { | 302 requested_attribs_)) { |
| 302 DLOG(ERROR) << "Failed to initialize decoder."; | 303 DLOG(ERROR) << "Failed to initialize decoder."; |
| 303 OnInitializeFailed(reply_message); | 304 OnInitializeFailed(reply_message); |
| 304 return; | 305 return; |
| 305 } | 306 } |
| 306 | 307 |
| 307 if (CommandLine::ForCurrentProcess()->HasSwitch( | 308 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 } | 632 } |
| 632 | 633 |
| 633 void GpuCommandBufferStub::SetMemoryAllocation( | 634 void GpuCommandBufferStub::SetMemoryAllocation( |
| 634 const GpuMemoryAllocation& allocation) { | 635 const GpuMemoryAllocation& allocation) { |
| 635 allocation_ = allocation; | 636 allocation_ = allocation; |
| 636 | 637 |
| 637 SendMemoryAllocationToProxy(allocation); | 638 SendMemoryAllocationToProxy(allocation); |
| 638 } | 639 } |
| 639 | 640 |
| 640 #endif // defined(ENABLE_GPU) | 641 #endif // defined(ENABLE_GPU) |
| OLD | NEW |