| 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 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <queue> | 12 #include <queue> |
| 13 | 13 |
| 14 #include "base/callback_old.h" | 14 #include "base/callback_old.h" |
| 15 #include "base/memory/linked_ptr.h" | 15 #include "base/memory/linked_ptr.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "content/renderer/gpu/gpu_video_decode_accelerator_host.h" | 17 #include "content/renderer/gpu/gpu_video_decode_accelerator_host.h" |
| 18 #include "gpu/command_buffer/common/constants.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 namespace base { | 23 namespace base { |
| 23 class SharedMemory; | 24 class SharedMemory; |
| 24 } | 25 } |
| 25 | 26 |
| 26 namespace gfx { | 27 namespace gfx { |
| 27 class Size; | 28 class Size; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 57 virtual int32 RegisterTransferBuffer(base::SharedMemory* shared_memory, | 58 virtual int32 RegisterTransferBuffer(base::SharedMemory* shared_memory, |
| 58 size_t size, | 59 size_t size, |
| 59 int32 id_request); | 60 int32 id_request); |
| 60 virtual void DestroyTransferBuffer(int32 id); | 61 virtual void DestroyTransferBuffer(int32 id); |
| 61 virtual gpu::Buffer GetTransferBuffer(int32 handle); | 62 virtual gpu::Buffer GetTransferBuffer(int32 handle); |
| 62 virtual void SetToken(int32 token); | 63 virtual void SetToken(int32 token); |
| 63 virtual void SetParseError(gpu::error::Error error); | 64 virtual void SetParseError(gpu::error::Error error); |
| 64 virtual void SetContextLostReason(gpu::error::ContextLostReason reason); | 65 virtual void SetContextLostReason(gpu::error::ContextLostReason reason); |
| 65 virtual void OnSwapBuffers(); | 66 virtual void OnSwapBuffers(); |
| 66 | 67 |
| 68 bool MapExternalResource(gpu::resource_type::ResourceType resource_type, |
| 69 uint32 resource_source_id, |
| 70 CommandBufferProxy* source_command_buffer, |
| 71 uint32 resource_dest_id); |
| 72 |
| 67 // Reparent a command buffer. TODO(apatrick): going forward, the notion of | 73 // Reparent a command buffer. TODO(apatrick): going forward, the notion of |
| 68 // the parent / child relationship between command buffers is going away in | 74 // the parent / child relationship between command buffers is going away in |
| 69 // favor of the notion of surfaces that can be drawn to in one command buffer | 75 // favor of the notion of surfaces that can be drawn to in one command buffer |
| 70 // and bound as a texture in any other. | 76 // and bound as a texture in any other. |
| 71 virtual bool SetParent(CommandBufferProxy* parent_command_buffer, | 77 virtual bool SetParent(CommandBufferProxy* parent_command_buffer, |
| 72 uint32 parent_texture_id); | 78 uint32 parent_texture_id); |
| 73 | 79 |
| 74 // Set a callback that will be invoked when the SwapBuffers call has been | 80 // Set a callback that will be invoked when the SwapBuffers call has been |
| 75 // issued. | 81 // issued. |
| 76 void SetSwapBuffersCallback(Callback0::Type* callback); | 82 void SetSwapBuffersCallback(Callback0::Type* callback); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 138 |
| 133 scoped_ptr<Callback0::Type> swap_buffers_callback_; | 139 scoped_ptr<Callback0::Type> swap_buffers_callback_; |
| 134 scoped_ptr<Callback0::Type> channel_error_callback_; | 140 scoped_ptr<Callback0::Type> channel_error_callback_; |
| 135 | 141 |
| 136 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); | 142 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); |
| 137 }; | 143 }; |
| 138 | 144 |
| 139 #endif // ENABLE_GPU | 145 #endif // ENABLE_GPU |
| 140 | 146 |
| 141 #endif // CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ | 147 #endif // CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ |
| OLD | NEW |