| 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 gpu { |
| 17 struct SyncToken; |
| 18 } |
| 19 |
| 16 namespace ppapi { | 20 namespace ppapi { |
| 17 | 21 |
| 18 class TrackedCallback; | 22 class TrackedCallback; |
| 19 | 23 |
| 20 namespace thunk { | 24 namespace thunk { |
| 21 | 25 |
| 22 class PPAPI_THUNK_EXPORT PPB_Graphics3D_API { | 26 class PPAPI_THUNK_EXPORT PPB_Graphics3D_API { |
| 23 public: | 27 public: |
| 24 virtual ~PPB_Graphics3D_API() {} | 28 virtual ~PPB_Graphics3D_API() {} |
| 25 | 29 |
| 26 // Graphics3D API. | 30 // Graphics3D API. |
| 27 virtual int32_t GetAttribs(int32_t attrib_list[]) = 0; | 31 virtual int32_t GetAttribs(int32_t attrib_list[]) = 0; |
| 28 virtual int32_t SetAttribs(const int32_t attrib_list[]) = 0; | 32 virtual int32_t SetAttribs(const int32_t attrib_list[]) = 0; |
| 29 virtual int32_t GetError() = 0; | 33 virtual int32_t GetError() = 0; |
| 30 virtual int32_t ResizeBuffers(int32_t width, int32_t height) = 0; | 34 virtual int32_t ResizeBuffers(int32_t width, int32_t height) = 0; |
| 31 virtual int32_t SwapBuffers(scoped_refptr<TrackedCallback> callback) = 0; | 35 virtual int32_t SwapBuffers(scoped_refptr<TrackedCallback> callback, |
| 36 const gpu::SyncToken& sync_token) = 0; |
| 32 virtual int32_t GetAttribMaxValue(int32_t attribute, int32_t* value) = 0; | 37 virtual int32_t GetAttribMaxValue(int32_t attribute, int32_t* value) = 0; |
| 33 | 38 |
| 34 // Graphics3DTrusted API. | 39 // Graphics3DTrusted API. |
| 35 virtual PP_Bool SetGetBuffer(int32_t shm_id) = 0; | 40 virtual PP_Bool SetGetBuffer(int32_t shm_id) = 0; |
| 36 virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size, | 41 virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size, |
| 37 int32_t* id) = 0; | 42 int32_t* id) = 0; |
| 38 virtual PP_Bool DestroyTransferBuffer(int32_t id) = 0; | 43 virtual PP_Bool DestroyTransferBuffer(int32_t id) = 0; |
| 39 virtual PP_Bool Flush(int32_t put_offset) = 0; | 44 virtual PP_Bool Flush(int32_t put_offset) = 0; |
| 40 virtual gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, | 45 virtual gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, |
| 41 int32_t end) = 0; | 46 int32_t end) = 0; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 57 virtual uint32_t InsertSyncPoint() = 0; | 62 virtual uint32_t InsertSyncPoint() = 0; |
| 58 virtual uint32_t InsertFutureSyncPoint() = 0; | 63 virtual uint32_t InsertFutureSyncPoint() = 0; |
| 59 virtual void RetireSyncPoint(uint32_t sync_point) = 0; | 64 virtual void RetireSyncPoint(uint32_t sync_point) = 0; |
| 60 virtual void EnsureWorkVisible() = 0; | 65 virtual void EnsureWorkVisible() = 0; |
| 61 }; | 66 }; |
| 62 | 67 |
| 63 } // namespace thunk | 68 } // namespace thunk |
| 64 } // namespace ppapi | 69 } // namespace ppapi |
| 65 | 70 |
| 66 #endif // PPAPI_THUNK_PPB_GRAPHICS_3D_API_H_ | 71 #endif // PPAPI_THUNK_PPB_GRAPHICS_3D_API_H_ |
| OLD | NEW |