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

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

Issue 24466004: PPAPI: Make GLES2 calls resilient to bad/dead resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppapi_command_buffer_proxy.cc ('k') | ppapi/proxy/ppb_graphics_3d_proxy.cc » ('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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; 42 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE;
43 virtual PP_Bool GetTransferBuffer(int32_t id, 43 virtual PP_Bool GetTransferBuffer(int32_t id,
44 int* shm_handle, 44 int* shm_handle,
45 uint32_t* shm_size) OVERRIDE; 45 uint32_t* shm_size) OVERRIDE;
46 virtual gpu::CommandBuffer::State FlushSyncFast( 46 virtual gpu::CommandBuffer::State FlushSyncFast(
47 int32_t put_offset, 47 int32_t put_offset,
48 int32_t last_known_get) OVERRIDE; 48 int32_t last_known_get) OVERRIDE;
49 virtual uint32_t InsertSyncPoint() OVERRIDE; 49 virtual uint32_t InsertSyncPoint() OVERRIDE;
50 50
51 private: 51 private:
52 class LockingCommandBuffer;
53
54 // PPB_Graphics3D_Shared overrides. 52 // PPB_Graphics3D_Shared overrides.
55 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; 53 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE;
56 virtual gpu::GpuControl* GetGpuControl() OVERRIDE; 54 virtual gpu::GpuControl* GetGpuControl() OVERRIDE;
57 virtual int32 DoSwapBuffers() OVERRIDE; 55 virtual int32 DoSwapBuffers() OVERRIDE;
58 virtual void PushAlreadyLocked() OVERRIDE;
59 virtual void PopAlreadyLocked() OVERRIDE;
60 56
61 int num_already_locked_calls_;
62 scoped_ptr<PpapiCommandBufferProxy> command_buffer_; 57 scoped_ptr<PpapiCommandBufferProxy> command_buffer_;
63 scoped_ptr<LockingCommandBuffer> locking_command_buffer_;
64 58
65 DISALLOW_COPY_AND_ASSIGN(Graphics3D); 59 DISALLOW_COPY_AND_ASSIGN(Graphics3D);
66 }; 60 };
67 61
68 class PPB_Graphics3D_Proxy : public InterfaceProxy { 62 class PPB_Graphics3D_Proxy : public InterfaceProxy {
69 public: 63 public:
70 PPB_Graphics3D_Proxy(Dispatcher* dispatcher); 64 PPB_Graphics3D_Proxy(Dispatcher* dispatcher);
71 virtual ~PPB_Graphics3D_Proxy(); 65 virtual ~PPB_Graphics3D_Proxy();
72 66
73 static PP_Resource CreateProxyResource( 67 static PP_Resource CreateProxyResource(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; 111 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_;
118 112
119 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); 113 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy);
120 }; 114 };
121 115
122 } // namespace proxy 116 } // namespace proxy
123 } // namespace ppapi 117 } // namespace ppapi
124 118
125 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ 119 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
126 120
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_command_buffer_proxy.cc ('k') | ppapi/proxy/ppb_graphics_3d_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698