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_THUNK_PPB_GRAPHICS_3D_API_H_ | 5 #ifndef PPAPI_THUNK_PPB_GRAPHICS_3D_API_H_ |
6 #define PPAPI_THUNK_PPB_GRAPHICS_3D_API_H_ | 6 #define PPAPI_THUNK_PPB_GRAPHICS_3D_API_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "gpu/command_buffer/common/command_buffer.h" | 11 #include "gpu/command_buffer/common/command_buffer.h" |
12 #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" | 12 #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" |
13 #include "ppapi/c/ppb_graphics_3d.h" | 13 #include "ppapi/c/ppb_graphics_3d.h" |
14 #include "ppapi/thunk/ppapi_thunk_export.h" | 14 #include "ppapi/thunk/ppapi_thunk_export.h" |
15 | 15 |
| 16 namespace gfx { |
| 17 class Size; |
| 18 } |
| 19 |
16 namespace gpu { | 20 namespace gpu { |
17 struct SyncToken; | 21 struct SyncToken; |
18 } | 22 } |
19 | 23 |
20 namespace ppapi { | 24 namespace ppapi { |
21 | 25 |
22 class TrackedCallback; | 26 class TrackedCallback; |
23 | 27 |
24 namespace thunk { | 28 namespace thunk { |
25 | 29 |
26 class PPAPI_THUNK_EXPORT PPB_Graphics3D_API { | 30 class PPAPI_THUNK_EXPORT PPB_Graphics3D_API { |
27 public: | 31 public: |
28 virtual ~PPB_Graphics3D_API() {} | 32 virtual ~PPB_Graphics3D_API() {} |
29 | 33 |
30 // Graphics3D API. | 34 // Graphics3D API. |
31 virtual int32_t GetAttribs(int32_t attrib_list[]) = 0; | 35 virtual int32_t GetAttribs(int32_t attrib_list[]) = 0; |
32 virtual int32_t SetAttribs(const int32_t attrib_list[]) = 0; | 36 virtual int32_t SetAttribs(const int32_t attrib_list[]) = 0; |
33 virtual int32_t GetError() = 0; | 37 virtual int32_t GetError() = 0; |
34 virtual int32_t ResizeBuffers(int32_t width, int32_t height) = 0; | 38 virtual int32_t ResizeBuffers(int32_t width, int32_t height) = 0; |
35 virtual int32_t SwapBuffers(scoped_refptr<TrackedCallback> callback) = 0; | 39 virtual int32_t SwapBuffers(scoped_refptr<TrackedCallback> callback) = 0; |
36 virtual int32_t SwapBuffersWithSyncToken( | 40 virtual int32_t SwapBuffersWithSyncToken( |
37 scoped_refptr<TrackedCallback> callback, | 41 scoped_refptr<TrackedCallback> callback, |
38 const gpu::SyncToken& sync_token, | 42 const gpu::SyncToken& sync_token, |
39 int32_t width, | 43 const gfx::Size& size) = 0; |
40 int32_t height) = 0; | |
41 virtual int32_t GetAttribMaxValue(int32_t attribute, int32_t* value) = 0; | 44 virtual int32_t GetAttribMaxValue(int32_t attribute, int32_t* value) = 0; |
42 | 45 |
43 // Graphics3DTrusted API. | 46 // Graphics3DTrusted API. |
44 virtual PP_Bool SetGetBuffer(int32_t shm_id) = 0; | 47 virtual PP_Bool SetGetBuffer(int32_t shm_id) = 0; |
45 virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size, | 48 virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size, |
46 int32_t* id) = 0; | 49 int32_t* id) = 0; |
47 virtual PP_Bool DestroyTransferBuffer(int32_t id) = 0; | 50 virtual PP_Bool DestroyTransferBuffer(int32_t id) = 0; |
48 virtual PP_Bool Flush(int32_t put_offset) = 0; | 51 virtual PP_Bool Flush(int32_t put_offset) = 0; |
49 virtual gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, | 52 virtual gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, |
50 int32_t end) = 0; | 53 int32_t end) = 0; |
(...skipping 13 matching lines...) Expand all Loading... |
64 virtual void UnmapTexSubImage2DCHROMIUM(const void* mem) = 0; | 67 virtual void UnmapTexSubImage2DCHROMIUM(const void* mem) = 0; |
65 | 68 |
66 virtual void EnsureWorkVisible() = 0; | 69 virtual void EnsureWorkVisible() = 0; |
67 virtual void TakeFrontBuffer() = 0; | 70 virtual void TakeFrontBuffer() = 0; |
68 }; | 71 }; |
69 | 72 |
70 } // namespace thunk | 73 } // namespace thunk |
71 } // namespace ppapi | 74 } // namespace ppapi |
72 | 75 |
73 #endif // PPAPI_THUNK_PPB_GRAPHICS_3D_API_H_ | 76 #endif // PPAPI_THUNK_PPB_GRAPHICS_3D_API_H_ |
OLD | NEW |