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

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

Issue 24925002: Move Insert/SignalSyncPoint() to GpuControl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_COMMAND_BUFFER_PROXY_H_ 5 #ifndef PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_
6 #define PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ 6 #define PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "gpu/command_buffer/common/command_buffer.h" 10 #include "gpu/command_buffer/common/command_buffer.h"
(...skipping 27 matching lines...) Expand all
38 virtual State FlushSync(int32 put_offset, int32 last_known_get) OVERRIDE; 38 virtual State FlushSync(int32 put_offset, int32 last_known_get) OVERRIDE;
39 virtual void SetGetBuffer(int32 transfer_buffer_id) OVERRIDE; 39 virtual void SetGetBuffer(int32 transfer_buffer_id) OVERRIDE;
40 virtual void SetGetOffset(int32 get_offset) OVERRIDE; 40 virtual void SetGetOffset(int32 get_offset) OVERRIDE;
41 virtual gpu::Buffer CreateTransferBuffer(size_t size, int32* id) OVERRIDE; 41 virtual gpu::Buffer CreateTransferBuffer(size_t size, int32* id) OVERRIDE;
42 virtual void DestroyTransferBuffer(int32 id) OVERRIDE; 42 virtual void DestroyTransferBuffer(int32 id) OVERRIDE;
43 virtual gpu::Buffer GetTransferBuffer(int32 id) OVERRIDE; 43 virtual gpu::Buffer GetTransferBuffer(int32 id) OVERRIDE;
44 virtual void SetToken(int32 token) OVERRIDE; 44 virtual void SetToken(int32 token) OVERRIDE;
45 virtual void SetParseError(gpu::error::Error error) OVERRIDE; 45 virtual void SetParseError(gpu::error::Error error) OVERRIDE;
46 virtual void SetContextLostReason(gpu::error::ContextLostReason reason) 46 virtual void SetContextLostReason(gpu::error::ContextLostReason reason)
47 OVERRIDE; 47 OVERRIDE;
48 virtual uint32 InsertSyncPoint() OVERRIDE;
49 48
50 // gpu::GpuControl implementation: 49 // gpu::GpuControl implementation:
51 virtual bool SupportsGpuMemoryBuffer() OVERRIDE; 50 virtual bool SupportsGpuMemoryBuffer() OVERRIDE;
52 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer( 51 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(
53 size_t width, 52 size_t width,
54 size_t height, 53 size_t height,
55 unsigned internalformat, 54 unsigned internalformat,
56 int32* id) OVERRIDE; 55 int32* id) OVERRIDE;
57 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; 56 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE;
57 virtual uint32 InsertSyncPoint() OVERRIDE;
58 virtual void SignalSyncPoint(uint32 sync_point,
59 const base::Closure& callback) OVERRIDE;
58 60
59 private: 61 private:
60 bool Send(IPC::Message* msg); 62 bool Send(IPC::Message* msg);
61 void UpdateState(const gpu::CommandBuffer::State& state, bool success); 63 void UpdateState(const gpu::CommandBuffer::State& state, bool success);
62 64
63 typedef base::hash_map<int32, gpu::Buffer> TransferBufferMap; 65 typedef base::hash_map<int32, gpu::Buffer> TransferBufferMap;
64 TransferBufferMap transfer_buffers_; 66 TransferBufferMap transfer_buffers_;
65 67
66 State last_state_; 68 State last_state_;
67 69
68 HostResource resource_; 70 HostResource resource_;
69 ProxyChannel* channel_; 71 ProxyChannel* channel_;
70 72
71 base::Closure channel_error_callback_; 73 base::Closure channel_error_callback_;
72 74
73 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy); 75 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy);
74 }; 76 };
75 77
76 } // namespace proxy 78 } // namespace proxy
77 } // namespace ppapi 79 } // namespace ppapi
78 80
79 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ 81 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698