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

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

Issue 9904005: PpapiCommandBufferProxy implements CommandBufferProxy. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed Windows Build. Thanks girard@! Created 8 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 | Annotate | Revision Log
« no previous file with comments | « gpu/ipc/command_buffer_proxy.cc ('k') | ppapi/proxy/ppapi_command_buffer_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_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 #pragma once 7 #pragma once
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
11 #include "gpu/command_buffer/common/command_buffer.h" 11 #include "gpu/command_buffer/common/command_buffer.h"
12 #include "ppapi/proxy/ppapi_proxy_export.h" 12 #include "ppapi/proxy/ppapi_proxy_export.h"
13 #include "ppapi/shared_impl/host_resource.h" 13 #include "ppapi/shared_impl/host_resource.h"
14 #include "gpu/ipc/command_buffer_proxy.h"
14 15
15 namespace IPC { 16 namespace IPC {
16 class Message; 17 class Message;
17 } 18 }
18 19
19 namespace ppapi { 20 namespace ppapi {
20 namespace proxy { 21 namespace proxy {
21 22
22 class ProxyChannel; 23 class ProxyChannel;
23 24
24 class PPAPI_PROXY_EXPORT PpapiCommandBufferProxy : public gpu::CommandBuffer { 25 class PPAPI_PROXY_EXPORT PpapiCommandBufferProxy : public CommandBufferProxy {
25 public: 26 public:
26 PpapiCommandBufferProxy(const HostResource& resource, 27 PpapiCommandBufferProxy(const HostResource& resource,
27 ProxyChannel* channel); 28 ProxyChannel* channel);
28 virtual ~PpapiCommandBufferProxy(); 29 virtual ~PpapiCommandBufferProxy();
29 30
30 void SetChannelErrorCallback(const base::Closure& callback);
31 void ReportChannelError(); 31 void ReportChannelError();
32 32
33 // CommandBufferProxy implementation:
34 virtual int GetRouteID() const OVERRIDE;
35 virtual bool Echo(const base::Closure& callback) OVERRIDE;
36 virtual bool SetSurfaceVisible(bool visible) OVERRIDE;
37 virtual bool DiscardBackbuffer() OVERRIDE;
38 virtual bool EnsureBackbuffer() OVERRIDE;
39 virtual void SetMemoryAllocationChangedCallback(
40 const base::Callback<void(const GpuMemoryAllocationForRenderer&)>&
41 callback) OVERRIDE;
42 virtual bool SetParent(CommandBufferProxy* parent_command_buffer,
43 uint32 parent_texture_id) OVERRIDE;
44 virtual void SetChannelErrorCallback(const base::Closure& callback) OVERRIDE;
45 virtual void SetNotifyRepaintTask(const base::Closure& callback) OVERRIDE;
46 virtual void SetOnConsoleMessageCallback(
47 const GpuConsoleMessageCallback& callback) OVERRIDE;
48
33 // gpu::CommandBuffer implementation: 49 // gpu::CommandBuffer implementation:
34 virtual bool Initialize(); 50 virtual bool Initialize();
35 virtual State GetState(); 51 virtual State GetState();
36 virtual State GetLastState(); 52 virtual State GetLastState();
37 virtual void Flush(int32 put_offset); 53 virtual void Flush(int32 put_offset);
38 virtual State FlushSync(int32 put_offset, int32 last_known_get); 54 virtual State FlushSync(int32 put_offset, int32 last_known_get);
39 virtual void SetGetBuffer(int32 transfer_buffer_id); 55 virtual void SetGetBuffer(int32 transfer_buffer_id);
40 virtual void SetGetOffset(int32 get_offset); 56 virtual void SetGetOffset(int32 get_offset);
41 virtual int32 CreateTransferBuffer(size_t size, int32 id_request); 57 virtual int32 CreateTransferBuffer(size_t size, int32 id_request);
42 virtual int32 RegisterTransferBuffer(base::SharedMemory* shared_memory, 58 virtual int32 RegisterTransferBuffer(base::SharedMemory* shared_memory,
(...skipping 19 matching lines...) Expand all
62 78
63 base::Closure channel_error_callback_; 79 base::Closure channel_error_callback_;
64 80
65 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy); 81 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy);
66 }; 82 };
67 83
68 } // namespace proxy 84 } // namespace proxy
69 } // namespace ppapi 85 } // namespace ppapi
70 86
71 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ 87 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_
OLDNEW
« no previous file with comments | « gpu/ipc/command_buffer_proxy.cc ('k') | ppapi/proxy/ppapi_command_buffer_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698