| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h" | 7 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h" |
| 8 | 8 |
| 9 #include "gpu/command_buffer/client/gles2_implementation.h" | 9 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 10 #include "gpu/command_buffer/client/transfer_buffer.h" | 10 #include "gpu/command_buffer/client/transfer_buffer.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 "resource=%"NACL_PRId32"\n", res); | 213 "resource=%"NACL_PRId32"\n", res); |
| 214 | 214 |
| 215 // Create and initialize the objects required to issue GLES2 calls. | 215 // Create and initialize the objects required to issue GLES2 calls. |
| 216 command_buffer_.reset(new CommandBufferNacl(res, PluginCore::GetInterface())); | 216 command_buffer_.reset(new CommandBufferNacl(res, PluginCore::GetInterface())); |
| 217 if (command_buffer_->Initialize()) { | 217 if (command_buffer_->Initialize()) { |
| 218 gles2_helper_.reset(new gpu::gles2::GLES2CmdHelper(command_buffer_.get())); | 218 gles2_helper_.reset(new gpu::gles2::GLES2CmdHelper(command_buffer_.get())); |
| 219 if (gles2_helper_->Initialize(kRingBufferSize)) { | 219 if (gles2_helper_->Initialize(kRingBufferSize)) { |
| 220 transfer_buffer_.reset(new gpu::TransferBuffer(gles2_helper_.get())); | 220 transfer_buffer_.reset(new gpu::TransferBuffer(gles2_helper_.get())); |
| 221 gles2_implementation_.reset(new gpu::gles2::GLES2Implementation( | 221 gles2_implementation_.reset(new gpu::gles2::GLES2Implementation( |
| 222 gles2_helper_.get(), | 222 gles2_helper_.get(), |
| 223 NULL, |
| 223 transfer_buffer_.get(), | 224 transfer_buffer_.get(), |
| 224 false, | 225 false, |
| 225 true)); | 226 true)); |
| 226 if (gles2_implementation_->Initialize( | 227 if (gles2_implementation_->Initialize( |
| 227 kStartTransferBufferSize, | 228 kStartTransferBufferSize, |
| 228 kMinTransferBufferSize, | 229 kMinTransferBufferSize, |
| 229 kMaxTransferBufferSize)) { | 230 kMaxTransferBufferSize)) { |
| 230 return true; | 231 return true; |
| 231 } | 232 } |
| 232 } | 233 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 &GetAttribs, | 268 &GetAttribs, |
| 268 &SetAttribs, | 269 &SetAttribs, |
| 269 &GetError, | 270 &GetError, |
| 270 &ResizeBuffers, | 271 &ResizeBuffers, |
| 271 &SwapBuffs, | 272 &SwapBuffs, |
| 272 }; | 273 }; |
| 273 return &intf; | 274 return &intf; |
| 274 } | 275 } |
| 275 | 276 |
| 276 } // namespace ppapi_proxy | 277 } // namespace ppapi_proxy |
| OLD | NEW |