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

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

Issue 20017005: gpu: Refactor GpuMemoryBuffer framework for multi-process support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include proper internalformat support.[D Created 7 years, 4 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 virtual State FlushSync(int32 put_offset, int32 last_known_get); 44 virtual State FlushSync(int32 put_offset, int32 last_known_get);
45 virtual void SetGetBuffer(int32 transfer_buffer_id); 45 virtual void SetGetBuffer(int32 transfer_buffer_id);
46 virtual void SetGetOffset(int32 get_offset); 46 virtual void SetGetOffset(int32 get_offset);
47 virtual gpu::Buffer CreateTransferBuffer(size_t size, int32* id); 47 virtual gpu::Buffer CreateTransferBuffer(size_t size, int32* id);
48 virtual void DestroyTransferBuffer(int32 id); 48 virtual void DestroyTransferBuffer(int32 id);
49 virtual gpu::Buffer GetTransferBuffer(int32 id); 49 virtual gpu::Buffer GetTransferBuffer(int32 id);
50 virtual void SetToken(int32 token); 50 virtual void SetToken(int32 token);
51 virtual void SetParseError(gpu::error::Error error); 51 virtual void SetParseError(gpu::error::Error error);
52 virtual void SetContextLostReason(gpu::error::ContextLostReason reason); 52 virtual void SetContextLostReason(gpu::error::ContextLostReason reason);
53 virtual uint32 InsertSyncPoint(); 53 virtual uint32 InsertSyncPoint();
54 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(
55 size_t width,
56 size_t height,
57 unsigned internalformat,
58 int32* id);
59 virtual void DestroyGpuMemoryBuffer(int32 id);
60 virtual gfx::GLImage* GetImage(int32 id);
54 61
55 private: 62 private:
56 bool Send(IPC::Message* msg); 63 bool Send(IPC::Message* msg);
57 void UpdateState(const gpu::CommandBuffer::State& state, bool success); 64 void UpdateState(const gpu::CommandBuffer::State& state, bool success);
58 65
59 typedef base::hash_map<int32, gpu::Buffer> TransferBufferMap; 66 typedef base::hash_map<int32, gpu::Buffer> TransferBufferMap;
60 TransferBufferMap transfer_buffers_; 67 TransferBufferMap transfer_buffers_;
61 68
62 State last_state_; 69 State last_state_;
63 70
64 HostResource resource_; 71 HostResource resource_;
65 ProxyChannel* channel_; 72 ProxyChannel* channel_;
66 73
67 base::Closure channel_error_callback_; 74 base::Closure channel_error_callback_;
68 75
69 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy); 76 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy);
70 }; 77 };
71 78
72 } // namespace proxy 79 } // namespace proxy
73 } // namespace ppapi 80 } // namespace ppapi
74 81
75 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ 82 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698