| 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" |
| 11 #include "ppapi/c/pp_errors.h" | 11 #include "ppapi/c/pp_errors.h" |
| 12 | 12 |
| 13 namespace ppapi { | 13 namespace ppapi { |
| 14 | 14 |
| 15 PPB_Graphics3D_Shared::PPB_Graphics3D_Shared(PP_Instance instance) | 15 PPB_Graphics3D_Shared::PPB_Graphics3D_Shared(PP_Instance instance) |
| 16 : Resource(instance) { | 16 : Resource(OBJECT_IS_IMPL, instance) { |
| 17 } | 17 } |
| 18 | 18 |
| 19 PPB_Graphics3D_Shared::PPB_Graphics3D_Shared(const HostResource& host_resource) | 19 PPB_Graphics3D_Shared::PPB_Graphics3D_Shared(const HostResource& host_resource) |
| 20 : Resource(host_resource) { | 20 : Resource(OBJECT_IS_PROXY, host_resource) { |
| 21 } | 21 } |
| 22 | 22 |
| 23 PPB_Graphics3D_Shared::~PPB_Graphics3D_Shared() { | 23 PPB_Graphics3D_Shared::~PPB_Graphics3D_Shared() { |
| 24 // Make sure that GLES2 implementation has already been destroyed. | 24 // Make sure that GLES2 implementation has already been destroyed. |
| 25 DCHECK(!gles2_helper_.get()); | 25 DCHECK(!gles2_helper_.get()); |
| 26 DCHECK(!transfer_buffer_.get()); | 26 DCHECK(!transfer_buffer_.get()); |
| 27 DCHECK(!gles2_impl_.get()); | 27 DCHECK(!gles2_impl_.get()); |
| 28 } | 28 } |
| 29 | 29 |
| 30 thunk::PPB_Graphics3D_API* PPB_Graphics3D_Shared::AsPPB_Graphics3D_API() { | 30 thunk::PPB_Graphics3D_API* PPB_Graphics3D_Shared::AsPPB_Graphics3D_API() { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 } | 131 } |
| 132 | 132 |
| 133 void PPB_Graphics3D_Shared::DestroyGLES2Impl() { | 133 void PPB_Graphics3D_Shared::DestroyGLES2Impl() { |
| 134 gles2_impl_.reset(); | 134 gles2_impl_.reset(); |
| 135 transfer_buffer_.reset(); | 135 transfer_buffer_.reset(); |
| 136 gles2_helper_.reset(); | 136 gles2_helper_.reset(); |
| 137 } | 137 } |
| 138 | 138 |
| 139 } // namespace ppapi | 139 } // namespace ppapi |
| 140 | 140 |
| OLD | NEW |