OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ |
6 #define CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ | 6 #define CONTENT_RENDERER_GPU_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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 virtual int32 CreateTransferBuffer(size_t size, int32 id_request); | 54 virtual int32 CreateTransferBuffer(size_t size, int32 id_request); |
55 virtual int32 RegisterTransferBuffer(base::SharedMemory* shared_memory, | 55 virtual int32 RegisterTransferBuffer(base::SharedMemory* shared_memory, |
56 size_t size, | 56 size_t size, |
57 int32 id_request); | 57 int32 id_request); |
58 virtual void DestroyTransferBuffer(int32 id); | 58 virtual void DestroyTransferBuffer(int32 id); |
59 virtual gpu::Buffer GetTransferBuffer(int32 handle); | 59 virtual gpu::Buffer GetTransferBuffer(int32 handle); |
60 virtual void SetToken(int32 token); | 60 virtual void SetToken(int32 token); |
61 virtual void SetParseError(gpu::error::Error error); | 61 virtual void SetParseError(gpu::error::Error error); |
62 virtual void OnSwapBuffers(); | 62 virtual void OnSwapBuffers(); |
63 | 63 |
| 64 // Reparent a command buffer. TODO(apatrick): going forward, the notion of |
| 65 // the parent / child relationship between command buffers is going away in |
| 66 // favor of the notion of surfaces that can be drawn to in one command buffer |
| 67 // and bound as a texture in any other. |
| 68 virtual bool SetParent(CommandBufferProxy* parent_command_buffer, |
| 69 uint32 parent_texture_id); |
| 70 |
64 // Set a callback that will be invoked when the SwapBuffers call has been | 71 // Set a callback that will be invoked when the SwapBuffers call has been |
65 // issued. | 72 // issued. |
66 void SetSwapBuffersCallback(Callback0::Type* callback); | 73 void SetSwapBuffersCallback(Callback0::Type* callback); |
67 void SetChannelErrorCallback(Callback0::Type* callback); | 74 void SetChannelErrorCallback(Callback0::Type* callback); |
68 | 75 |
69 // Asynchronously resizes an offscreen frame buffer. | 76 // Asynchronously resizes an offscreen frame buffer. |
70 void ResizeOffscreenFrameBuffer(const gfx::Size& size); | 77 void ResizeOffscreenFrameBuffer(const gfx::Size& size); |
71 | 78 |
72 // Set a task that will be invoked the next time the window becomes invalid | 79 // Set a task that will be invoked the next time the window becomes invalid |
73 // and needs to be repainted. Takes ownership of task. | 80 // and needs to be repainted. Takes ownership of task. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 120 |
114 scoped_ptr<Callback0::Type> swap_buffers_callback_; | 121 scoped_ptr<Callback0::Type> swap_buffers_callback_; |
115 scoped_ptr<Callback0::Type> channel_error_callback_; | 122 scoped_ptr<Callback0::Type> channel_error_callback_; |
116 | 123 |
117 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); | 124 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); |
118 }; | 125 }; |
119 | 126 |
120 #endif // ENABLE_GPU | 127 #endif // ENABLE_GPU |
121 | 128 |
122 #endif // CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ | 129 #endif // CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ |
OLD | NEW |