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

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: Add AssertAcquiredDebugOnly 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
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 30 matching lines...) Expand all
41 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; 41 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE;
42 virtual PP_Bool GetTransferBuffer(int32_t id, 42 virtual PP_Bool GetTransferBuffer(int32_t id,
43 int* shm_handle, 43 int* shm_handle,
44 uint32_t* shm_size) OVERRIDE; 44 uint32_t* shm_size) OVERRIDE;
45 virtual gpu::CommandBuffer::State FlushSyncFast( 45 virtual gpu::CommandBuffer::State FlushSyncFast(
46 int32_t put_offset, 46 int32_t put_offset,
47 int32_t last_known_get) OVERRIDE; 47 int32_t last_known_get) OVERRIDE;
48 virtual uint32_t InsertSyncPoint() OVERRIDE; 48 virtual uint32_t InsertSyncPoint() OVERRIDE;
49 49
50 private: 50 private:
51 class LockingCommandBuffer;
52
53 // PPB_Graphics3D_Shared overrides. 51 // PPB_Graphics3D_Shared overrides.
54 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; 52 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE;
55 virtual int32 DoSwapBuffers() OVERRIDE; 53 virtual int32 DoSwapBuffers() OVERRIDE;
56 virtual void PushAlreadyLocked() OVERRIDE;
57 virtual void PopAlreadyLocked() OVERRIDE;
58 54
59 int num_already_locked_calls_;
60 scoped_ptr<gpu::CommandBuffer> command_buffer_; 55 scoped_ptr<gpu::CommandBuffer> command_buffer_;
61 scoped_ptr<LockingCommandBuffer> locking_command_buffer_;
62 56
63 DISALLOW_COPY_AND_ASSIGN(Graphics3D); 57 DISALLOW_COPY_AND_ASSIGN(Graphics3D);
64 }; 58 };
65 59
66 class PPB_Graphics3D_Proxy : public InterfaceProxy { 60 class PPB_Graphics3D_Proxy : public InterfaceProxy {
67 public: 61 public:
68 PPB_Graphics3D_Proxy(Dispatcher* dispatcher); 62 PPB_Graphics3D_Proxy(Dispatcher* dispatcher);
69 virtual ~PPB_Graphics3D_Proxy(); 63 virtual ~PPB_Graphics3D_Proxy();
70 64
71 static PP_Resource CreateProxyResource( 65 static PP_Resource CreateProxyResource(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; 109 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_;
116 110
117 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); 111 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy);
118 }; 112 };
119 113
120 } // namespace proxy 114 } // namespace proxy
121 } // namespace ppapi 115 } // namespace ppapi
122 116
123 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ 117 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
124 118
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698