| 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 | 7 |
| 8 #if defined(ENABLE_GPU) | 8 #if defined(ENABLE_GPU) |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <queue> | 11 #include <queue> |
| 12 | 12 |
| 13 #include "base/linked_ptr.h" | 13 #include "base/linked_ptr.h" |
| 14 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
| 15 #include "base/scoped_ptr.h" | 15 #include "base/scoped_ptr.h" |
| 16 #include "base/shared_memory.h" | 16 #include "base/shared_memory.h" |
| 17 #include "base/task.h" | 17 #include "base/task.h" |
| 18 #include "gfx/size.h" |
| 18 #include "gpu/command_buffer/common/command_buffer.h" | 19 #include "gpu/command_buffer/common/command_buffer.h" |
| 19 #include "ipc/ipc_channel.h" | 20 #include "ipc/ipc_channel.h" |
| 20 #include "ipc/ipc_message.h" | 21 #include "ipc/ipc_message.h" |
| 21 | 22 |
| 22 class PluginChannelHost; | 23 class PluginChannelHost; |
| 23 | 24 |
| 24 // Client side proxy that forwards messages synchronously to a | 25 // Client side proxy that forwards messages synchronously to a |
| 25 // CommandBufferStub. | 26 // CommandBufferStub. |
| 26 class CommandBufferProxy : public gpu::CommandBuffer, | 27 class CommandBufferProxy : public gpu::CommandBuffer, |
| 27 public IPC::Channel::Listener, | 28 public IPC::Channel::Listener, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 44 virtual gpu::Buffer GetRingBuffer(); | 45 virtual gpu::Buffer GetRingBuffer(); |
| 45 virtual State GetState(); | 46 virtual State GetState(); |
| 46 virtual State Flush(int32 put_offset); | 47 virtual State Flush(int32 put_offset); |
| 47 virtual void SetGetOffset(int32 get_offset); | 48 virtual void SetGetOffset(int32 get_offset); |
| 48 virtual int32 CreateTransferBuffer(size_t size); | 49 virtual int32 CreateTransferBuffer(size_t size); |
| 49 virtual void DestroyTransferBuffer(int32 id); | 50 virtual void DestroyTransferBuffer(int32 id); |
| 50 virtual gpu::Buffer GetTransferBuffer(int32 handle); | 51 virtual gpu::Buffer GetTransferBuffer(int32 handle); |
| 51 virtual void SetToken(int32 token); | 52 virtual void SetToken(int32 token); |
| 52 virtual void SetParseError(gpu::error::Error error); | 53 virtual void SetParseError(gpu::error::Error error); |
| 53 | 54 |
| 55 // Asynchronously resizes an offscreen frame buffer. |
| 56 void ResizeOffscreenFrameBuffer(const gfx::Size& size); |
| 57 |
| 54 // Set a task that will be invoked the next time the window becomes invalid | 58 // Set a task that will be invoked the next time the window becomes invalid |
| 55 // and needs to be repainted. Takes ownership of task. | 59 // and needs to be repainted. Takes ownership of task. |
| 56 void SetNotifyRepaintTask(Task* task) { | 60 void SetNotifyRepaintTask(Task* task) { |
| 57 notify_repaint_task_.reset(task); | 61 notify_repaint_task_.reset(task); |
| 58 } | 62 } |
| 59 | 63 |
| 60 #if defined(OS_MACOSX) | 64 #if defined(OS_MACOSX) |
| 61 virtual void SetWindowSize(int32 width, int32 height); | 65 virtual void SetWindowSize(int32 width, int32 height); |
| 62 #endif | 66 #endif |
| 63 | 67 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 AsyncFlushTaskQueue pending_async_flush_tasks_; | 102 AsyncFlushTaskQueue pending_async_flush_tasks_; |
| 99 | 103 |
| 100 scoped_ptr<Task> notify_repaint_task_; | 104 scoped_ptr<Task> notify_repaint_task_; |
| 101 | 105 |
| 102 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); | 106 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); |
| 103 }; | 107 }; |
| 104 | 108 |
| 105 #endif // ENABLE_GPU | 109 #endif // ENABLE_GPU |
| 106 | 110 |
| 107 #endif // CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ | 111 #endif // CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ |
| OLD | NEW |