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 #ifndef PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ | 5 #ifndef PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ |
6 #define PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ | 6 #define PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "ppapi/c/pp_completion_callback.h" | 13 #include "ppapi/c/pp_completion_callback.h" |
13 #include "ppapi/shared_impl/ppapi_shared_export.h" | 14 #include "ppapi/shared_impl/ppapi_shared_export.h" |
14 #include "ppapi/shared_impl/resource.h" | 15 #include "ppapi/shared_impl/resource.h" |
15 #include "ppapi/shared_impl/tracked_callback.h" | 16 #include "ppapi/shared_impl/tracked_callback.h" |
16 #include "ppapi/thunk/ppb_graphics_3d_api.h" | 17 #include "ppapi/thunk/ppb_graphics_3d_api.h" |
17 | 18 |
18 namespace gpu { | 19 namespace gpu { |
19 class CommandBuffer; | 20 class CommandBuffer; |
20 class GpuControl; | 21 class GpuControl; |
21 class TransferBuffer; | 22 class TransferBuffer; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 virtual gpu::GpuControl* GetGpuControl() = 0; | 72 virtual gpu::GpuControl* GetGpuControl() = 0; |
72 virtual int32_t DoSwapBuffers(const gpu::SyncToken& sync_token) = 0; | 73 virtual int32_t DoSwapBuffers(const gpu::SyncToken& sync_token) = 0; |
73 | 74 |
74 bool HasPendingSwap() const; | 75 bool HasPendingSwap() const; |
75 bool CreateGLES2Impl(int32_t command_buffer_size, | 76 bool CreateGLES2Impl(int32_t command_buffer_size, |
76 int32_t transfer_buffer_size, | 77 int32_t transfer_buffer_size, |
77 gpu::gles2::GLES2Implementation* share_gles2); | 78 gpu::gles2::GLES2Implementation* share_gles2); |
78 void DestroyGLES2Impl(); | 79 void DestroyGLES2Impl(); |
79 | 80 |
80 private: | 81 private: |
81 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; | 82 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; |
82 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; | 83 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_; |
83 scoped_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; | 84 std::unique_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; |
84 | 85 |
85 // Callback that needs to be executed when swap-buffers is completed. | 86 // Callback that needs to be executed when swap-buffers is completed. |
86 scoped_refptr<TrackedCallback> swap_callback_; | 87 scoped_refptr<TrackedCallback> swap_callback_; |
87 | 88 |
88 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Shared); | 89 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Shared); |
89 }; | 90 }; |
90 | 91 |
91 } // namespace ppapi | 92 } // namespace ppapi |
92 | 93 |
93 #endif // PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ | 94 #endif // PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ |
OLD | NEW |