| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // Sends an IPC message to create a GpuVideoDecodeAccelerator. Creates and | 84 // Sends an IPC message to create a GpuVideoDecodeAccelerator. Creates and |
| 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 |
| 95 // RendererGLContext::MakeCurrent prior to every GL call. It saves returning 6 |
| 96 // ints redundantly when only the error is needed for the CommandBufferProxy |
| 97 // implementation. |
| 98 virtual gpu::error::Error GetLastError() OVERRIDE; |
| 99 |
| 94 private: | 100 private: |
| 95 // 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 |
| 96 // encapsulate the channel; all callers of this function must explicitly | 102 // encapsulate the channel; all callers of this function must explicitly |
| 97 // verify that the context has not been lost. | 103 // verify that the context has not been lost. |
| 98 bool Send(IPC::Message* msg); | 104 bool Send(IPC::Message* msg); |
| 99 | 105 |
| 100 // Message handlers: | 106 // Message handlers: |
| 101 void OnUpdateState(const gpu::CommandBuffer::State& state); | 107 void OnUpdateState(const gpu::CommandBuffer::State& state); |
| 102 void OnNotifyRepaint(); | 108 void OnNotifyRepaint(); |
| 103 void OnDestroyed(gpu::error::ContextLostReason reason); | 109 void OnDestroyed(gpu::error::ContextLostReason reason); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 128 base::Closure notify_repaint_task_; | 134 base::Closure notify_repaint_task_; |
| 129 | 135 |
| 130 base::Closure channel_error_callback_; | 136 base::Closure channel_error_callback_; |
| 131 | 137 |
| 132 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); | 138 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); |
| 133 }; | 139 }; |
| 134 | 140 |
| 135 #endif // ENABLE_GPU | 141 #endif // ENABLE_GPU |
| 136 | 142 |
| 137 #endif // CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ | 143 #endif // CONTENT_RENDERER_GPU_COMMAND_BUFFER_PROXY_H_ |
| OLD | NEW |