| 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/demos/framework/window.h" | 5 #include "gpu/demos/framework/window.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "gpu/command_buffer/client/gles2_implementation.h" | 10 #include "gpu/command_buffer/client/gles2_implementation.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 return false; | 74 return false; |
| 75 | 75 |
| 76 context_ = gfx::GLContext::CreateGLContext(NULL, surface_.get()); | 76 context_ = gfx::GLContext::CreateGLContext(NULL, surface_.get()); |
| 77 if (!context_.get()) | 77 if (!context_.get()) |
| 78 return false; | 78 return false; |
| 79 | 79 |
| 80 std::vector<int32> attribs; | 80 std::vector<int32> attribs; |
| 81 if (!decoder_->Initialize(surface_.get(), | 81 if (!decoder_->Initialize(surface_.get(), |
| 82 context_.get(), | 82 context_.get(), |
| 83 gfx::Size(), | 83 gfx::Size(), |
| 84 gpu::gles2::DisallowedExtensions(), | 84 gpu::gles2::DisallowedFeatures(), |
| 85 NULL, | 85 NULL, |
| 86 attribs)) { | 86 attribs)) { |
| 87 return false; | 87 return false; |
| 88 } | 88 } |
| 89 | 89 |
| 90 command_buffer_->SetPutOffsetChangeCallback( | 90 command_buffer_->SetPutOffsetChangeCallback( |
| 91 NewCallback(gpu_scheduler_.get(), &GpuScheduler::PutChanged)); | 91 NewCallback(gpu_scheduler_.get(), &GpuScheduler::PutChanged)); |
| 92 | 92 |
| 93 gles2_cmd_helper_.reset(new GLES2CmdHelper(command_buffer_.get())); | 93 gles2_cmd_helper_.reset(new GLES2CmdHelper(command_buffer_.get())); |
| 94 if (!gles2_cmd_helper_->Initialize(kCommandBufferSize)) | 94 if (!gles2_cmd_helper_->Initialize(kCommandBufferSize)) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 105 transfer_buffer.size, | 105 transfer_buffer.size, |
| 106 transfer_buffer.ptr, | 106 transfer_buffer.ptr, |
| 107 transfer_buffer_id, | 107 transfer_buffer_id, |
| 108 false, | 108 false, |
| 109 true)); | 109 true)); |
| 110 return true; | 110 return true; |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace demos | 113 } // namespace demos |
| 114 } // namespace gpu | 114 } // namespace gpu |
| OLD | NEW |