| OLD | NEW |
| 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 CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_H_ |
| 6 #define CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_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.h" | 14 #include "base/callback.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 "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "content/renderer/gpu/gpu_video_decode_accelerator_host.h" | 18 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h" |
| 19 #include "gpu/command_buffer/common/command_buffer.h" | 19 #include "gpu/command_buffer/common/command_buffer.h" |
| 20 #include "ipc/ipc_channel.h" | 20 #include "ipc/ipc_channel.h" |
| 21 #include "ipc/ipc_message.h" | 21 #include "ipc/ipc_message.h" |
| 22 | 22 |
| 23 class GpuChannelHost; | 23 class GpuChannelHost; |
| 24 struct GPUCommandBufferConsoleMessage; | 24 struct GPUCommandBufferConsoleMessage; |
| 25 | 25 |
| 26 namespace base { | 26 namespace base { |
| 27 class SharedMemory; | 27 class SharedMemory; |
| 28 } | 28 } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // returns a pointer to a GpuVideoDecodeAcceleratorHost. | 85 // returns a pointer to a GpuVideoDecodeAcceleratorHost. |
| 86 // Returns NULL on failure to create the GpuVideoDecodeAcceleratorHost. | 86 // Returns NULL on failure to create the GpuVideoDecodeAcceleratorHost. |
| 87 // Note that the GpuVideoDecodeAccelerator may still fail to be created in | 87 // Note that the GpuVideoDecodeAccelerator may still fail to be created in |
| 88 // the GPU process, even if this returns non-NULL. In this case the client is | 88 // the GPU process, even if this returns non-NULL. In this case the client is |
| 89 // notified of an error later. | 89 // notified of an error later. |
| 90 scoped_refptr<GpuVideoDecodeAcceleratorHost> CreateVideoDecoder( | 90 scoped_refptr<GpuVideoDecodeAcceleratorHost> CreateVideoDecoder( |
| 91 media::VideoDecodeAccelerator::Profile profile, | 91 media::VideoDecodeAccelerator::Profile profile, |
| 92 media::VideoDecodeAccelerator::Client* client); | 92 media::VideoDecodeAccelerator::Client* client); |
| 93 | 93 |
| 94 // TODO(apatrick): this is a temporary optimization while skia is calling | 94 // TODO(apatrick): this is a temporary optimization while skia is calling |
| 95 // RendererGLContext::MakeCurrent prior to every GL call. It saves returning 6 | 95 // ContentGLContext::MakeCurrent prior to every GL call. It saves returning 6 |
| 96 // ints redundantly when only the error is needed for the CommandBufferProxy | 96 // ints redundantly when only the error is needed for the CommandBufferProxy |
| 97 // implementation. | 97 // implementation. |
| 98 virtual gpu::error::Error GetLastError() OVERRIDE; | 98 virtual gpu::error::Error GetLastError() OVERRIDE; |
| 99 | 99 |
| 100 private: | 100 private: |
| 101 // Send an IPC message over the GPU channel. This is private to fully | 101 // Send an IPC message over the GPU channel. This is private to fully |
| 102 // encapsulate the channel; all callers of this function must explicitly | 102 // encapsulate the channel; all callers of this function must explicitly |
| 103 // verify that the context has not been lost. | 103 // verify that the context has not been lost. |
| 104 bool Send(IPC::Message* msg); | 104 bool Send(IPC::Message* msg); |
| 105 | 105 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 133 | 133 |
| 134 base::Closure notify_repaint_task_; | 134 base::Closure notify_repaint_task_; |
| 135 | 135 |
| 136 base::Closure channel_error_callback_; | 136 base::Closure channel_error_callback_; |
| 137 | 137 |
| 138 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); | 138 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 #endif // ENABLE_GPU | 141 #endif // ENABLE_GPU |
| 142 | 142 |
| 143 #endif // CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ | 143 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_H_ |
| OLD | NEW |