| 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 #include "ppapi/shared_impl/ppb_graphics_3d_shared.h" | 5 #include "ppapi/shared_impl/ppb_graphics_3d_shared.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "gpu/command_buffer/client/gles2_cmd_helper.h" | 8 #include "gpu/command_buffer/client/gles2_cmd_helper.h" |
| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 gles2_helper_.get(), | 128 gles2_helper_.get(), |
| 129 share_gles2 ? share_gles2->share_group() : NULL, | 129 share_gles2 ? share_gles2->share_group() : NULL, |
| 130 transfer_buffer_.get(), | 130 transfer_buffer_.get(), |
| 131 true, | 131 true, |
| 132 NULL // Do not use GpuMemoryBuffers. | 132 NULL // Do not use GpuMemoryBuffers. |
| 133 )); | 133 )); |
| 134 | 134 |
| 135 if (!gles2_impl_->Initialize( | 135 if (!gles2_impl_->Initialize( |
| 136 transfer_buffer_size, | 136 transfer_buffer_size, |
| 137 kMinTransferBufferSize, | 137 kMinTransferBufferSize, |
| 138 std::max(kMaxTransferBufferSize, transfer_buffer_size))) { | 138 std::max(kMaxTransferBufferSize, transfer_buffer_size), |
| 139 gpu::gles2::GLES2Implementation::kNoLimit)) { |
| 139 return false; | 140 return false; |
| 140 } | 141 } |
| 141 | 142 |
| 142 gles2_impl_->PushGroupMarkerEXT(0, "PPAPIContext"); | 143 gles2_impl_->PushGroupMarkerEXT(0, "PPAPIContext"); |
| 143 | 144 |
| 144 return true; | 145 return true; |
| 145 } | 146 } |
| 146 | 147 |
| 147 void PPB_Graphics3D_Shared::DestroyGLES2Impl() { | 148 void PPB_Graphics3D_Shared::DestroyGLES2Impl() { |
| 148 ScopedNoLocking already_locked(this); | 149 ScopedNoLocking already_locked(this); |
| 149 gles2_impl_.reset(); | 150 gles2_impl_.reset(); |
| 150 transfer_buffer_.reset(); | 151 transfer_buffer_.reset(); |
| 151 gles2_helper_.reset(); | 152 gles2_helper_.reset(); |
| 152 } | 153 } |
| 153 | 154 |
| 154 void PPB_Graphics3D_Shared::PushAlreadyLocked() { | 155 void PPB_Graphics3D_Shared::PushAlreadyLocked() { |
| 155 // Do nothing. This should be overridden in the plugin side. | 156 // Do nothing. This should be overridden in the plugin side. |
| 156 } | 157 } |
| 157 | 158 |
| 158 void PPB_Graphics3D_Shared::PopAlreadyLocked() { | 159 void PPB_Graphics3D_Shared::PopAlreadyLocked() { |
| 159 // Do nothing. This should be overridden in the plugin side. | 160 // Do nothing. This should be overridden in the plugin side. |
| 160 } | 161 } |
| 161 | 162 |
| 162 } // namespace ppapi | 163 } // namespace ppapi |
| 163 | 164 |
| OLD | NEW |