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

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

Issue 1097393007: Update {virtual,override} to follow C++11 style in ppapi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split off one file into separate review. Created 5 years, 8 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
« no previous file with comments | « ppapi/proxy/ppb_flash_message_loop_proxy.cc ('k') | ppapi/proxy/ppb_image_data_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <vector> 8 #include <vector>
9 9
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 16 matching lines...) Expand all
27 class HostResource; 27 class HostResource;
28 28
29 namespace proxy { 29 namespace proxy {
30 30
31 class SerializedHandle; 31 class SerializedHandle;
32 class PpapiCommandBufferProxy; 32 class PpapiCommandBufferProxy;
33 33
34 class PPAPI_PROXY_EXPORT Graphics3D : public PPB_Graphics3D_Shared { 34 class PPAPI_PROXY_EXPORT Graphics3D : public PPB_Graphics3D_Shared {
35 public: 35 public:
36 explicit Graphics3D(const HostResource& resource); 36 explicit Graphics3D(const HostResource& resource);
37 virtual ~Graphics3D(); 37 ~Graphics3D() override;
38 38
39 bool Init(gpu::gles2::GLES2Implementation* share_gles2, 39 bool Init(gpu::gles2::GLES2Implementation* share_gles2,
40 const gpu::Capabilities& capabilities, 40 const gpu::Capabilities& capabilities,
41 const SerializedHandle& shared_state); 41 const SerializedHandle& shared_state);
42 42
43 // Graphics3DTrusted API. These are not implemented in the proxy. 43 // Graphics3DTrusted API. These are not implemented in the proxy.
44 virtual PP_Bool SetGetBuffer(int32_t shm_id) override; 44 PP_Bool SetGetBuffer(int32_t shm_id) override;
45 virtual PP_Bool Flush(int32_t put_offset) override; 45 PP_Bool Flush(int32_t put_offset) override;
46 virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size, 46 scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size,
47 int32* id) override; 47 int32* id) override;
48 virtual PP_Bool DestroyTransferBuffer(int32_t id) override; 48 PP_Bool DestroyTransferBuffer(int32_t id) override;
49 virtual gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, 49 gpu::CommandBuffer::State WaitForTokenInRange(int32_t start,
50 int32_t end) override; 50 int32_t end) override;
51 virtual gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start, 51 gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start,
52 int32_t end) 52 int32_t end) override;
53 override; 53 uint32_t InsertSyncPoint() override;
54 virtual uint32_t InsertSyncPoint() override; 54 uint32_t InsertFutureSyncPoint() override;
55 virtual uint32_t InsertFutureSyncPoint() override; 55 void RetireSyncPoint(uint32_t sync_point) override;
56 virtual void RetireSyncPoint(uint32_t sync_point) override;
57 56
58 private: 57 private:
59 // PPB_Graphics3D_Shared overrides. 58 // PPB_Graphics3D_Shared overrides.
60 virtual gpu::CommandBuffer* GetCommandBuffer() override; 59 gpu::CommandBuffer* GetCommandBuffer() override;
61 virtual gpu::GpuControl* GetGpuControl() override; 60 gpu::GpuControl* GetGpuControl() override;
62 virtual int32 DoSwapBuffers() override; 61 int32 DoSwapBuffers() override;
63 62
64 scoped_ptr<PpapiCommandBufferProxy> command_buffer_; 63 scoped_ptr<PpapiCommandBufferProxy> command_buffer_;
65 64
66 DISALLOW_COPY_AND_ASSIGN(Graphics3D); 65 DISALLOW_COPY_AND_ASSIGN(Graphics3D);
67 }; 66 };
68 67
69 class PPB_Graphics3D_Proxy : public InterfaceProxy { 68 class PPB_Graphics3D_Proxy : public InterfaceProxy {
70 public: 69 public:
71 PPB_Graphics3D_Proxy(Dispatcher* dispatcher); 70 PPB_Graphics3D_Proxy(Dispatcher* dispatcher);
72 virtual ~PPB_Graphics3D_Proxy(); 71 ~PPB_Graphics3D_Proxy();
73 72
74 static PP_Resource CreateProxyResource( 73 static PP_Resource CreateProxyResource(
75 PP_Instance instance, 74 PP_Instance instance,
76 PP_Resource share_context, 75 PP_Resource share_context,
77 const int32_t* attrib_list); 76 const int32_t* attrib_list);
78 77
79 // InterfaceProxy implementation. 78 // InterfaceProxy implementation.
80 virtual bool OnMessageReceived(const IPC::Message& msg); 79 bool OnMessageReceived(const IPC::Message& msg) override;
81 80
82 static const ApiID kApiID = API_ID_PPB_GRAPHICS_3D; 81 static const ApiID kApiID = API_ID_PPB_GRAPHICS_3D;
83 82
84 private: 83 private:
85 void OnMsgCreate(PP_Instance instance, 84 void OnMsgCreate(PP_Instance instance,
86 HostResource share_context, 85 HostResource share_context,
87 const std::vector<int32_t>& attribs, 86 const std::vector<int32_t>& attribs,
88 HostResource* result, 87 HostResource* result,
89 gpu::Capabilities* capabilities, 88 gpu::Capabilities* capabilities,
90 SerializedHandle* handle); 89 SerializedHandle* handle);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; 122 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_;
124 123
125 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); 124 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy);
126 }; 125 };
127 126
128 } // namespace proxy 127 } // namespace proxy
129 } // namespace ppapi 128 } // namespace ppapi
130 129
131 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ 130 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
132 131
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_flash_message_loop_proxy.cc ('k') | ppapi/proxy/ppb_image_data_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698