Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: ppapi/proxy/ppb_graphics_3d_proxy.h

Issue 1586883002: Converted Ppapi post swap buffer sync point to use sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_PROXY_PPB_GRAPHICS_3D_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
6 #define PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ 6 #define PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 int32_t end) override; 55 int32_t end) override;
56 uint32_t InsertSyncPoint() override; 56 uint32_t InsertSyncPoint() override;
57 uint32_t InsertFutureSyncPoint() override; 57 uint32_t InsertFutureSyncPoint() override;
58 void RetireSyncPoint(uint32_t sync_point) override; 58 void RetireSyncPoint(uint32_t sync_point) override;
59 void EnsureWorkVisible() override; 59 void EnsureWorkVisible() override;
60 60
61 private: 61 private:
62 // PPB_Graphics3D_Shared overrides. 62 // PPB_Graphics3D_Shared overrides.
63 gpu::CommandBuffer* GetCommandBuffer() override; 63 gpu::CommandBuffer* GetCommandBuffer() override;
64 gpu::GpuControl* GetGpuControl() override; 64 gpu::GpuControl* GetGpuControl() override;
65 int32_t DoSwapBuffers() override; 65 int32_t DoSwapBuffers(const gpu::SyncToken& sync_token) override;
66 66
67 scoped_ptr<PpapiCommandBufferProxy> command_buffer_; 67 scoped_ptr<PpapiCommandBufferProxy> command_buffer_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(Graphics3D); 69 DISALLOW_COPY_AND_ASSIGN(Graphics3D);
70 }; 70 };
71 71
72 class PPB_Graphics3D_Proxy : public InterfaceProxy { 72 class PPB_Graphics3D_Proxy : public InterfaceProxy {
73 public: 73 public:
74 explicit PPB_Graphics3D_Proxy(Dispatcher* dispatcher); 74 explicit PPB_Graphics3D_Proxy(Dispatcher* dispatcher);
75 ~PPB_Graphics3D_Proxy(); 75 ~PPB_Graphics3D_Proxy();
(...skipping 27 matching lines...) Expand all
103 int32_t end, 103 int32_t end,
104 gpu::CommandBuffer::State* state, 104 gpu::CommandBuffer::State* state,
105 bool* success); 105 bool* success);
106 void OnMsgAsyncFlush(const HostResource& context, int32_t put_offset); 106 void OnMsgAsyncFlush(const HostResource& context, int32_t put_offset);
107 void OnMsgCreateTransferBuffer( 107 void OnMsgCreateTransferBuffer(
108 const HostResource& context, 108 const HostResource& context,
109 uint32_t size, 109 uint32_t size,
110 int32_t* id, 110 int32_t* id,
111 ppapi::proxy::SerializedHandle* transfer_buffer); 111 ppapi::proxy::SerializedHandle* transfer_buffer);
112 void OnMsgDestroyTransferBuffer(const HostResource& context, int32_t id); 112 void OnMsgDestroyTransferBuffer(const HostResource& context, int32_t id);
113 void OnMsgSwapBuffers(const HostResource& context); 113 void OnMsgSwapBuffers(const HostResource& context,
114 const gpu::SyncToken& sync_token);
114 void OnMsgInsertSyncPoint(const HostResource& context, uint32_t* sync_point); 115 void OnMsgInsertSyncPoint(const HostResource& context, uint32_t* sync_point);
115 void OnMsgInsertFutureSyncPoint(const HostResource& context, 116 void OnMsgInsertFutureSyncPoint(const HostResource& context,
116 uint32_t* sync_point); 117 uint32_t* sync_point);
117 void OnMsgRetireSyncPoint(const HostResource& context, uint32_t sync_point); 118 void OnMsgRetireSyncPoint(const HostResource& context, uint32_t sync_point);
118 void OnMsgEnsureWorkVisible(const HostResource& context); 119 void OnMsgEnsureWorkVisible(const HostResource& context);
119 // Renderer->plugin message handlers. 120 // Renderer->plugin message handlers.
120 void OnMsgSwapBuffersACK(const HostResource& context, 121 void OnMsgSwapBuffersACK(const HostResource& context,
121 int32_t pp_error); 122 int32_t pp_error);
122 123
123 void SendSwapBuffersACKToPlugin(int32_t result, 124 void SendSwapBuffersACKToPlugin(int32_t result,
124 const HostResource& context); 125 const HostResource& context);
125 126
126 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; 127 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_;
127 128
128 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); 129 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy);
129 }; 130 };
130 131
131 } // namespace proxy 132 } // namespace proxy
132 } // namespace ppapi 133 } // namespace ppapi
133 134
134 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ 135 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
135 136
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698