diff options
-rw-r--r-- | content/common/gpu/client/command_buffer_proxy_impl.h | 15 | ||||
-rw-r--r-- | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc | 1 | ||||
-rw-r--r-- | content/renderer/media/renderer_gpu_video_accelerator_factories.cc | 1 | ||||
-rw-r--r-- | content/renderer/pepper/pepper_platform_context_3d.cc | 1 | ||||
-rw-r--r-- | gpu/gpu_ipc.gypi | 8 | ||||
-rw-r--r-- | gpu/ipc/command_buffer_proxy.cc | 5 | ||||
-rw-r--r-- | gpu/ipc/command_buffer_proxy.h | 42 | ||||
-rw-r--r-- | ppapi/proxy/ppapi_command_buffer_proxy.cc | 26 | ||||
-rw-r--r-- | ppapi/proxy/ppapi_command_buffer_proxy.h | 11 |
9 files changed, 7 insertions, 103 deletions
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.h b/content/common/gpu/client/command_buffer_proxy_impl.h index a3f6260..05a7ac6 100644 --- a/content/common/gpu/client/command_buffer_proxy_impl.h +++ b/content/common/gpu/client/command_buffer_proxy_impl.h @@ -9,8 +9,6 @@ #include <queue> #include <string> -#include "gpu/ipc/command_buffer_proxy.h" - #include "base/callback.h" #include "base/compiler_specific.h" #include "base/containers/hash_tables.h" @@ -42,7 +40,7 @@ class GpuChannelHost; // Client side proxy that forwards messages synchronously to a // CommandBufferStub. class CommandBufferProxyImpl - : public CommandBufferProxy, + : public gpu::CommandBuffer, public IPC::Listener, public base::SupportsWeakPtr<CommandBufferProxyImpl> { public: @@ -80,12 +78,6 @@ class CommandBufferProxyImpl virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; virtual void OnChannelError() OVERRIDE; - // CommandBufferProxy implementation: - virtual int GetRouteID() const OVERRIDE; - virtual bool Echo(const base::Closure& callback) OVERRIDE; - virtual bool ProduceFrontBuffer(const gpu::Mailbox& mailbox) OVERRIDE; - virtual void SetChannelErrorCallback(const base::Closure& callback) OVERRIDE; - // CommandBuffer implementation: virtual bool Initialize() OVERRIDE; virtual State GetState() OVERRIDE; @@ -105,6 +97,11 @@ class CommandBufferProxyImpl gpu::error::ContextLostReason reason) OVERRIDE; virtual uint32 InsertSyncPoint() OVERRIDE; + int GetRouteID() const; + bool Echo(const base::Closure& callback); + bool ProduceFrontBuffer(const gpu::Mailbox& mailbox); + void SetChannelErrorCallback(const base::Closure& callback); + void SetMemoryAllocationChangedCallback( const base::Callback<void(const GpuMemoryAllocationForRenderer&)>& callback); diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc index c925c89e..00bc642 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc @@ -36,7 +36,6 @@ #include "gpu/command_buffer/client/transfer_buffer.h" #include "gpu/command_buffer/common/constants.h" #include "gpu/command_buffer/common/mailbox.h" -#include "gpu/ipc/command_buffer_proxy.h" #include "third_party/skia/include/core/SkTypes.h" #include "webkit/common/gpu/gl_bindings_skia_cmd_buffer.h" diff --git a/content/renderer/media/renderer_gpu_video_accelerator_factories.cc b/content/renderer/media/renderer_gpu_video_accelerator_factories.cc index eeb3d84..eeaae13 100644 --- a/content/renderer/media/renderer_gpu_video_accelerator_factories.cc +++ b/content/renderer/media/renderer_gpu_video_accelerator_factories.cc @@ -13,7 +13,6 @@ #include "content/common/gpu/client/gpu_channel_host.h" #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" #include "gpu/command_buffer/client/gles2_implementation.h" -#include "gpu/ipc/command_buffer_proxy.h" #include "third_party/skia/include/core/SkPixelRef.h" namespace content { diff --git a/content/renderer/pepper/pepper_platform_context_3d.cc b/content/renderer/pepper/pepper_platform_context_3d.cc index e080e16..33d908b 100644 --- a/content/renderer/pepper/pepper_platform_context_3d.cc +++ b/content/renderer/pepper/pepper_platform_context_3d.cc @@ -11,7 +11,6 @@ #include "content/renderer/render_thread_impl.h" #include "gpu/command_buffer/client/gles2_cmd_helper.h" #include "gpu/command_buffer/client/gles2_implementation.h" -#include "gpu/ipc/command_buffer_proxy.h" #include "ppapi/c/pp_graphics_3d.h" #include "ui/gl/gpu_preference.h" #include "url/gurl.h" diff --git a/gpu/gpu_ipc.gypi b/gpu/gpu_ipc.gypi index 2777e96..d1cb292 100644 --- a/gpu/gpu_ipc.gypi +++ b/gpu/gpu_ipc.gypi @@ -11,8 +11,6 @@ '..', ], 'sources': [ - 'ipc/command_buffer_proxy.h', - 'ipc/command_buffer_proxy.cc', 'ipc/gpu_command_buffer_traits.cc', 'ipc/gpu_command_buffer_traits.h', ], @@ -24,12 +22,6 @@ 'dependencies!': [ '../ipc/ipc.gyp:ipc', ], - # The NaCl Win64 build only needs the ParamTraits, so we exclude - # command_buffer_proxy.*. - 'sources!': [ - 'ipc/command_buffer_proxy.h', - 'ipc/command_buffer_proxy.cc', - ], }], ], } diff --git a/gpu/ipc/command_buffer_proxy.cc b/gpu/ipc/command_buffer_proxy.cc deleted file mode 100644 index 7ed6b0b..0000000 --- a/gpu/ipc/command_buffer_proxy.cc +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "gpu/ipc/command_buffer_proxy.h" diff --git a/gpu/ipc/command_buffer_proxy.h b/gpu/ipc/command_buffer_proxy.h deleted file mode 100644 index d33eae4..0000000 --- a/gpu/ipc/command_buffer_proxy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef GPU_IPC_COMMAND_BUFFER_PROXY_H_ -#define GPU_IPC_COMMAND_BUFFER_PROXY_H_ - -#include <string> - -#include "base/callback.h" -#include "gpu/command_buffer/common/command_buffer.h" -#include "gpu/command_buffer/common/command_buffer_shared.h" -#include "gpu/command_buffer/common/mailbox.h" - -// Client side proxy that forwards messages synchronously to a -// CommandBufferStub. -class GPU_EXPORT CommandBufferProxy : public gpu::CommandBuffer { - public: - typedef base::Callback<void( - const std::string& msg, int id)> GpuConsoleMessageCallback; - - CommandBufferProxy() { } - - virtual ~CommandBufferProxy() { } - - virtual int GetRouteID() const = 0; - - // Invoke the task when the channel has been flushed. Takes care of deleting - // the task whether the echo succeeds or not. - virtual bool Echo(const base::Closure& callback) = 0; - - // For offscreen contexts, produces the front buffer into a newly created - // mailbox. - virtual bool ProduceFrontBuffer(const gpu::Mailbox& mailbox) = 0; - - virtual void SetChannelErrorCallback(const base::Closure& callback) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); -}; - -#endif // GPU_IPC_COMMAND_BUFFER_PROXY_H_ diff --git a/ppapi/proxy/ppapi_command_buffer_proxy.cc b/ppapi/proxy/ppapi_command_buffer_proxy.cc index 8ca17e4..88528f2 100644 --- a/ppapi/proxy/ppapi_command_buffer_proxy.cc +++ b/ppapi/proxy/ppapi_command_buffer_proxy.cc @@ -29,32 +29,6 @@ PpapiCommandBufferProxy::~PpapiCommandBufferProxy() { } } -void PpapiCommandBufferProxy::ReportChannelError() { - if (!channel_error_callback_.is_null()) { - channel_error_callback_.Run(); - channel_error_callback_.Reset(); - } -} - -int PpapiCommandBufferProxy::GetRouteID() const { - NOTIMPLEMENTED(); - return 0; -} - -bool PpapiCommandBufferProxy::Echo(const base::Closure& callback) { - return false; -} - -bool PpapiCommandBufferProxy::ProduceFrontBuffer(const gpu::Mailbox& mailbox) { - NOTIMPLEMENTED(); - return false; -} - -void PpapiCommandBufferProxy::SetChannelErrorCallback( - const base::Closure& callback) { - channel_error_callback_ = callback; -} - bool PpapiCommandBufferProxy::Initialize() { return true; } diff --git a/ppapi/proxy/ppapi_command_buffer_proxy.h b/ppapi/proxy/ppapi_command_buffer_proxy.h index b5c2c93..6ea6f65 100644 --- a/ppapi/proxy/ppapi_command_buffer_proxy.h +++ b/ppapi/proxy/ppapi_command_buffer_proxy.h @@ -8,7 +8,6 @@ #include "base/callback.h" #include "base/containers/hash_tables.h" #include "gpu/command_buffer/common/command_buffer.h" -#include "gpu/ipc/command_buffer_proxy.h" #include "ppapi/proxy/ppapi_proxy_export.h" #include "ppapi/shared_impl/host_resource.h" @@ -21,20 +20,12 @@ namespace proxy { class ProxyChannel; -class PPAPI_PROXY_EXPORT PpapiCommandBufferProxy : public CommandBufferProxy { +class PPAPI_PROXY_EXPORT PpapiCommandBufferProxy : public gpu::CommandBuffer { public: PpapiCommandBufferProxy(const HostResource& resource, ProxyChannel* channel); virtual ~PpapiCommandBufferProxy(); - void ReportChannelError(); - - // CommandBufferProxy implementation: - virtual int GetRouteID() const OVERRIDE; - virtual bool Echo(const base::Closure& callback) OVERRIDE; - virtual bool ProduceFrontBuffer(const gpu::Mailbox& mailbox) OVERRIDE; - virtual void SetChannelErrorCallback(const base::Closure& callback) OVERRIDE; - // gpu::CommandBuffer implementation: virtual bool Initialize(); virtual State GetState(); |