| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ | 5 #ifndef CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ |
| 6 #define CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ | 6 #define CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 // Client side proxy that forwards messages synchronously to a | 32 // Client side proxy that forwards messages synchronously to a |
| 33 // CommandBufferStub. | 33 // CommandBufferStub. |
| 34 class CommandBufferProxy : public gpu::CommandBuffer, | 34 class CommandBufferProxy : public gpu::CommandBuffer, |
| 35 public IPC::Channel::Listener { | 35 public IPC::Channel::Listener { |
| 36 public: | 36 public: |
| 37 CommandBufferProxy(IPC::Channel::Sender* channel, int route_id); | 37 CommandBufferProxy(IPC::Channel::Sender* channel, int route_id); |
| 38 virtual ~CommandBufferProxy(); | 38 virtual ~CommandBufferProxy(); |
| 39 | 39 |
| 40 // IPC::Channel::Listener implementation: | 40 // IPC::Channel::Listener implementation: |
| 41 virtual void OnMessageReceived(const IPC::Message& message); | 41 virtual bool OnMessageReceived(const IPC::Message& message); |
| 42 virtual void OnChannelError(); | 42 virtual void OnChannelError(); |
| 43 | 43 |
| 44 int route_id() const { return route_id_; } | 44 int route_id() const { return route_id_; } |
| 45 | 45 |
| 46 // CommandBuffer implementation: | 46 // CommandBuffer implementation: |
| 47 virtual bool Initialize(int32 size); | 47 virtual bool Initialize(int32 size); |
| 48 virtual gpu::Buffer GetRingBuffer(); | 48 virtual gpu::Buffer GetRingBuffer(); |
| 49 virtual State GetState(); | 49 virtual State GetState(); |
| 50 virtual State Flush(int32 put_offset); | 50 virtual State Flush(int32 put_offset); |
| 51 virtual void SetGetOffset(int32 get_offset); | 51 virtual void SetGetOffset(int32 get_offset); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 scoped_ptr<Task> notify_repaint_task_; | 116 scoped_ptr<Task> notify_repaint_task_; |
| 117 | 117 |
| 118 scoped_ptr<Callback0::Type> swap_buffers_callback_; | 118 scoped_ptr<Callback0::Type> swap_buffers_callback_; |
| 119 | 119 |
| 120 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); | 120 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 #endif // ENABLE_GPU | 123 #endif // ENABLE_GPU |
| 124 | 124 |
| 125 #endif // CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ | 125 #endif // CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ |
| OLD | NEW |