summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/common/gpu/gpu_channel.cc45
-rw-r--r--content/common/gpu/gpu_channel.h13
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.cc1
-rw-r--r--content/common/gpu/gpu_messages.h9
-rw-r--r--content/common/gpu/gpu_surface_stub.cc37
-rw-r--r--content/common/gpu/gpu_surface_stub.h49
-rw-r--r--content/content_common.gypi2
-rw-r--r--content/content_renderer.gypi2
-rw-r--r--content/renderer/gpu/gpu_channel_host.cc26
-rw-r--r--content/renderer/gpu/gpu_channel_host.h6
-rw-r--r--content/renderer/gpu/gpu_surface_proxy.cc30
-rw-r--r--content/renderer/gpu/gpu_surface_proxy.h47
-rwxr-xr-xgpu/command_buffer/build_gles2_cmd_buffer.py13
-rw-r--r--gpu/command_buffer/client/gles2_c_lib_autogen.h3
-rw-r--r--gpu/command_buffer/client/gles2_cmd_helper_autogen.h5
-rw-r--r--gpu/command_buffer/client/gles2_demo.cc1
-rw-r--r--gpu/command_buffer/client/gles2_implementation_autogen.h5
-rw-r--r--gpu/command_buffer/common/gles2_cmd_format_autogen.h64
-rw-r--r--gpu/command_buffer/common/gles2_cmd_format_test_autogen.h24
-rw-r--r--gpu/command_buffer/common/gles2_cmd_id_test_autogen.h2
-rw-r--r--gpu/command_buffer/common/gles2_cmd_ids_autogen.h2
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h4
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc25
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.h3
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_autogen.h11
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc39
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h3
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h2
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc3
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h2
-rw-r--r--gpu/command_buffer/service/gpu_scheduler.cc4
-rw-r--r--gpu/command_buffer/service/gpu_scheduler.h1
-rw-r--r--gpu/command_buffer/service/surface_manager.cc15
-rw-r--r--gpu/command_buffer/service/surface_manager.h31
-rw-r--r--gpu/command_buffer/service/surface_manager_mock.cc15
-rw-r--r--gpu/command_buffer/service/surface_manager_mock.h26
-rw-r--r--gpu/demos/framework/window.cc4
-rw-r--r--gpu/gles2_conform_support/egl/display.cc4
-rw-r--r--gpu/gpu.gyp4
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc1
40 files changed, 64 insertions, 519 deletions
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index 287f345..0ad31501 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -172,14 +172,6 @@ void GpuChannel::OnDestroy() {
gpu_channel_manager_->RemoveChannel(renderer_id_);
}
-gfx::GLSurface* GpuChannel::LookupSurface(int surface_id) {
- GpuSurfaceStub *surface_stub = surfaces_.Lookup(surface_id);
- if (!surface_stub)
- return NULL;
-
- return surface_stub->surface();
-}
-
void GpuChannel::CreateViewCommandBuffer(
gfx::PluginWindowHandle window,
int32 render_view_id,
@@ -255,9 +247,6 @@ bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) {
OnCreateOffscreenCommandBuffer)
IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuChannelMsg_DestroyCommandBuffer,
OnDestroyCommandBuffer)
- IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuChannelMsg_CreateOffscreenSurface,
- OnCreateOffscreenSurface)
- IPC_MESSAGE_HANDLER(GpuChannelMsg_DestroySurface, OnDestroySurface)
IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateTransportTexture,
OnCreateTransportTexture)
IPC_MESSAGE_HANDLER(GpuChannelMsg_Echo, OnEcho);
@@ -360,40 +349,6 @@ void GpuChannel::OnDestroyCommandBuffer(int32 route_id,
Send(reply_message);
}
-void GpuChannel::OnCreateOffscreenSurface(const gfx::Size& size,
- IPC::Message* reply_message) {
- int route_id = MSG_ROUTING_NONE;
-
-#if defined(ENABLE_GPU)
- scoped_refptr<gfx::GLSurface> surface(
- gfx::GLSurface::CreateOffscreenGLSurface(software_, size));
- if (!surface.get())
- return;
-
- route_id = GenerateRouteID();
-
- scoped_ptr<GpuSurfaceStub> stub (new GpuSurfaceStub(this,
- route_id,
- surface.release()));
-
- router_.AddRoute(route_id, stub.get());
- surfaces_.AddWithID(stub.release(), route_id);
-#endif
-
- GpuChannelMsg_CreateOffscreenSurface::WriteReplyParams(reply_message,
- route_id);
- Send(reply_message);
-}
-
-void GpuChannel::OnDestroySurface(int route_id) {
-#if defined(ENABLE_GPU)
- if (router_.ResolveRoute(route_id)) {
- router_.RemoveRoute(route_id);
- surfaces_.Remove(route_id);
- }
-#endif
-}
-
void GpuChannel::OnCreateTransportTexture(int32 context_route_id,
int32 host_id) {
#if defined(ENABLE_GPU)
diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h
index 4b8deb7..b6a510f 100644
--- a/content/common/gpu/gpu_channel.h
+++ b/content/common/gpu/gpu_channel.h
@@ -16,9 +16,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/process.h"
#include "build/build_config.h"
-#include "gpu/command_buffer/service/surface_manager.h"
#include "content/common/gpu/gpu_command_buffer_stub.h"
-#include "content/common/gpu/gpu_surface_stub.h"
#include "content/common/message_router.h"
#include "ipc/ipc_sync_channel.h"
#include "ui/gfx/gl/gl_share_group.h"
@@ -43,7 +41,6 @@ class GLSurface;
// process. On the renderer side there's a corresponding GpuChannelHost.
class GpuChannel : public IPC::Channel::Listener,
public IPC::Message::Sender,
- public gpu::SurfaceManager,
public base::RefCountedThreadSafe<GpuChannel> {
public:
// Takes ownership of the renderer process handle.
@@ -112,9 +109,6 @@ class GpuChannel : public IPC::Channel::Listener,
// Destroy channel and all contained contexts.
void DestroySoon();
- // Look up a GLSurface by ID. In this case the ID is the IPC routing ID.
- virtual gfx::GLSurface* LookupSurface(int surface_id);
-
// Get the TransportTexture by ID.
TransportTexture* GetTransportTexture(int32 route_id);
@@ -144,10 +138,6 @@ class GpuChannel : public IPC::Channel::Listener,
IPC::Message* reply_message);
void OnDestroyCommandBuffer(int32 route_id, IPC::Message* reply_message);
- void OnCreateOffscreenSurface(const gfx::Size& size,
- IPC::Message* reply_message);
- void OnDestroySurface(int route_id);
-
void OnCreateTransportTexture(int32 context_route_id, int32 host_id);
void OnEcho(const IPC::Message& message);
@@ -180,9 +170,6 @@ class GpuChannel : public IPC::Channel::Listener,
#if defined(ENABLE_GPU)
typedef IDMap<GpuCommandBufferStub, IDMapOwnPointer> StubMap;
StubMap stubs_;
-
- typedef IDMap<GpuSurfaceStub, IDMapOwnPointer> SurfaceMap;
- SurfaceMap surfaces_;
#endif // defined (ENABLE_GPU)
// A collection of transport textures created.
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index bebce90..645b95a 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -144,7 +144,6 @@ void GpuCommandBufferStub::OnInitialize(
// Initialize the CommandBufferService and GpuScheduler.
if (command_buffer_->Initialize(&shared_memory, size)) {
scheduler_.reset(gpu::GpuScheduler::Create(command_buffer_.get(),
- channel_,
context_group_.get()));
#if defined(TOUCH_UI)
if (software_) {
diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h
index ded6b37..f96a632 100644
--- a/content/common/gpu/gpu_messages.h
+++ b/content/common/gpu/gpu_messages.h
@@ -296,15 +296,6 @@ IPC_SYNC_MESSAGE_CONTROL2_1(GpuChannelMsg_CreateOffscreenCommandBuffer,
IPC_SYNC_MESSAGE_CONTROL1_0(GpuChannelMsg_DestroyCommandBuffer,
int32 /* instance_id */)
-// Create a surface for offscreen rendering.
-IPC_SYNC_MESSAGE_CONTROL1_1(GpuChannelMsg_CreateOffscreenSurface,
- gfx::Size, /* size */
- int /* route_id */)
-
-// Destroy a surface by routing id.
-IPC_MESSAGE_CONTROL1(GpuChannelMsg_DestroySurface,
- int /* route_id */)
-
// Create a TransportTexture corresponding to |host_id|.
IPC_MESSAGE_CONTROL2(GpuChannelMsg_CreateTransportTexture,
int32, /* context_route_id */
diff --git a/content/common/gpu/gpu_surface_stub.cc b/content/common/gpu/gpu_surface_stub.cc
deleted file mode 100644
index 389c624..0000000
--- a/content/common/gpu/gpu_surface_stub.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2011 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.
-
-#if defined(ENABLE_GPU)
-
-#include "content/common/gpu/gpu_surface_stub.h"
-
-#include "content/common/gpu/gpu_channel.h"
-#include "ipc/ipc_message_macros.h"
-
-GpuSurfaceStub::GpuSurfaceStub(GpuChannel* channel,
- int route_id,
- gfx::GLSurface* surface)
- : channel_(channel),
- route_id_(route_id),
- surface_(surface) {
-}
-
-GpuSurfaceStub::~GpuSurfaceStub() {
-}
-
-bool GpuSurfaceStub::OnMessageReceived(const IPC::Message& message) {
- bool handled = true;
- //IPC_BEGIN_MESSAGE_MAP(GpuSurfaceStub, message)
- // IPC_MESSAGE_UNHANDLED(handled = false)
- //IPC_END_MESSAGE_MAP()
- DCHECK(handled);
- return handled;
-}
-
-bool GpuSurfaceStub::Send(IPC::Message* message) {
- return channel_->Send(message);
-}
-
-
-#endif // defined(ENABLE_GPU)
diff --git a/content/common/gpu/gpu_surface_stub.h b/content/common/gpu/gpu_surface_stub.h
deleted file mode 100644
index 8776ee0..0000000
--- a/content/common/gpu/gpu_surface_stub.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2011 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 CONTENT_COMMON_GPU_GPU_SURFACE_STUB_H_
-#define CONTENT_COMMON_GPU_GPU_SURFACE_STUB_H_
-#pragma once
-
-#if defined(ENABLE_GPU)
-
-#include "base/memory/ref_counted.h"
-#include "ipc/ipc_channel.h"
-#include "ipc/ipc_message.h"
-#include "ui/gfx/gl/gl_surface.h"
-
-class GpuChannel;
-
-class GpuSurfaceStub
- : public IPC::Channel::Listener,
- public IPC::Message::Sender {
- public:
- // Takes ownership of surface.
- GpuSurfaceStub(GpuChannel* channel, int route_id, gfx::GLSurface* surface);
- virtual ~GpuSurfaceStub();
-
- gfx::GLSurface* surface() const { return surface_.get(); }
-
- // IPC::Channel::Listener implementation:
- virtual bool OnMessageReceived(const IPC::Message& message);
-
- // IPC::Message::Sender implementation:
- virtual bool Send(IPC::Message* msg);
-
- private:
- // Message handlers.
- // None yet.
-
- // This is a weak pointer. The GpuChannel controls the lifetime of the
- // GpuSurfaceStub and always outlives it.
- GpuChannel* channel_;
-
- int route_id_;
- scoped_refptr<gfx::GLSurface> surface_;
- DISALLOW_COPY_AND_ASSIGN(GpuSurfaceStub);
-};
-
-#endif // defined(ENABLE_GPU)
-
-#endif // CONTENT_COMMON_GPU_GPU_SURFACE_STUB_H_
diff --git a/content/content_common.gypi b/content/content_common.gypi
index 9590b72..1124ea2 100644
--- a/content/content_common.gypi
+++ b/content/content_common.gypi
@@ -126,8 +126,6 @@
'common/gpu/gpu_info.h',
'common/gpu/gpu_messages.h',
'common/gpu/gpu_process_launch_causes.h',
- 'common/gpu/gpu_surface_stub.cc',
- 'common/gpu/gpu_surface_stub.h',
'common/gpu/gpu_watchdog.h',
'common/gpu/media/gpu_video_decode_accelerator.cc',
'common/gpu/media/gpu_video_decode_accelerator.h',
diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi
index d14243a..c1ad628 100644
--- a/content/content_renderer.gypi
+++ b/content/content_renderer.gypi
@@ -49,8 +49,6 @@
'renderer/geolocation_dispatcher.h',
'renderer/gpu/gpu_channel_host.cc',
'renderer/gpu/gpu_channel_host.h',
- 'renderer/gpu/gpu_surface_proxy.cc',
- 'renderer/gpu/gpu_surface_proxy.h',
'renderer/gpu/gpu_video_decode_accelerator_host.cc',
'renderer/gpu/gpu_video_decode_accelerator_host.h',
'renderer/gpu/renderer_gl_context.cc',
diff --git a/content/renderer/gpu/gpu_channel_host.cc b/content/renderer/gpu/gpu_channel_host.cc
index 73bf14f..343f777 100644
--- a/content/renderer/gpu/gpu_channel_host.cc
+++ b/content/renderer/gpu/gpu_channel_host.cc
@@ -8,7 +8,6 @@
#include "content/common/child_process.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/renderer/gpu/command_buffer_proxy.h"
-#include "content/renderer/gpu/gpu_surface_proxy.h"
#include "content/renderer/gpu/transport_texture_service.h"
#include "content/renderer/render_process.h"
#include "content/renderer/render_thread.h"
@@ -298,31 +297,6 @@ void GpuChannelHost::DestroyCommandBuffer(CommandBufferProxy* command_buffer) {
#endif
}
-GpuSurfaceProxy* GpuChannelHost::CreateOffscreenSurface(
- const gfx::Size& size) {
-#if defined(ENABLE_GPU)
- AutoLock lock(context_lock_);
- int route_id;
- if (!Send(new GpuChannelMsg_CreateOffscreenSurface(size, &route_id)))
- return NULL;
-
- scoped_ptr<GpuSurfaceProxy> surface(new GpuSurfaceProxy(this, route_id));
- AddRoute(route_id, surface->AsWeakPtr());
-
- return surface.release();
-#endif
-}
-
-void GpuChannelHost::DestroySurface(GpuSurfaceProxy* surface) {
-#if defined(ENABLE_GPU)
- AutoLock lock(context_lock_);
- Send(new GpuChannelMsg_DestroySurface(surface->route_id()));
-
- RemoveRoute(surface->route_id());
- delete surface;
-#endif
-}
-
void GpuChannelHost::AddRoute(
int route_id, base::WeakPtr<IPC::Channel::Listener> listener) {
DCHECK(MessageLoopProxy::current());
diff --git a/content/renderer/gpu/gpu_channel_host.h b/content/renderer/gpu/gpu_channel_host.h
index 4bd9fbb..96c6ae4 100644
--- a/content/renderer/gpu/gpu_channel_host.h
+++ b/content/renderer/gpu/gpu_channel_host.h
@@ -101,12 +101,6 @@ class GpuChannelHost : public IPC::Message::Sender,
// Destroy a command buffer created by this channel.
void DestroyCommandBuffer(CommandBufferProxy* command_buffer);
- // Create a surface in the GPU process. Returns null on failure.
- GpuSurfaceProxy* CreateOffscreenSurface(const gfx::Size& size);
-
- // Destroy a surface in the GPU process.
- void DestroySurface(GpuSurfaceProxy* surface);
-
TransportTextureService* transport_texture_service() {
return transport_texture_service_.get();
}
diff --git a/content/renderer/gpu/gpu_surface_proxy.cc b/content/renderer/gpu/gpu_surface_proxy.cc
deleted file mode 100644
index d023b0e..0000000
--- a/content/renderer/gpu/gpu_surface_proxy.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2011 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 "content/renderer/gpu/gpu_surface_proxy.h"
-#include "ui/gfx/size.h"
-
-GpuSurfaceProxy::GpuSurfaceProxy(
- IPC::Channel::Sender* channel,
- int route_id)
- : channel_(channel),
- route_id_(route_id) {
-}
-
-GpuSurfaceProxy::~GpuSurfaceProxy() {
-}
-
-bool GpuSurfaceProxy::OnMessageReceived(const IPC::Message& message) {
- bool handled = true;
- //IPC_BEGIN_MESSAGE_MAP(GpuSurfaceProxy, message)
- // IPC_MESSAGE_UNHANDLED(handled = false)
- //IPC_END_MESSAGE_MAP()
- DCHECK(handled);
- return handled;
-}
-
-void GpuSurfaceProxy::OnChannelError() {
- // Prevent any further messages from being sent.
- channel_ = NULL;
-}
diff --git a/content/renderer/gpu/gpu_surface_proxy.h b/content/renderer/gpu/gpu_surface_proxy.h
deleted file mode 100644
index f4f8879..0000000
--- a/content/renderer/gpu/gpu_surface_proxy.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2011 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 CONTENT_RENDERER_GPU_GPU_SURFACE_PROXY_H_
-#define CONTENT_RENDERER_GPU_GPU_SURFACE_PROXY_H_
-#pragma once
-
-#if defined(ENABLE_GPU)
-
-#include "base/memory/weak_ptr.h"
-#include "ipc/ipc_channel.h"
-#include "ipc/ipc_message.h"
-
-namespace gfx {
-class Size;
-}
-
-// Client side proxy that forwards messages to a GpuSurfaceStub.
-class GpuSurfaceProxy : public IPC::Channel::Listener,
- public base::SupportsWeakPtr<GpuSurfaceProxy> {
- public:
- GpuSurfaceProxy(IPC::Channel::Sender* channel, int route_id);
- virtual ~GpuSurfaceProxy();
-
- // IPC::Channel::Listener implementation:
- virtual bool OnMessageReceived(const IPC::Message& message);
- virtual void OnChannelError();
-
- int route_id() const { return route_id_; }
-
- private:
-
- // Send an IPC message over the GPU channel. This is private to fully
- // encapsulate the channel; all callers of this function must explicitly
- // verify that the channel is still available.
- bool Send(IPC::Message* msg);
-
- IPC::Channel::Sender* channel_;
- int route_id_;
-
- DISALLOW_COPY_AND_ASSIGN(GpuSurfaceProxy);
-};
-
-#endif // ENABLE_GPU
-
-#endif // CONTENT_RENDERER_GPU_GPU_SURFACE_PROXY_H_
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 7268091..90ff54a 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -217,12 +217,12 @@ GL_APICALL void GL_APIENTRY glResizeCHROMIUM (GLuint width, GLuint heigh
GL_APICALL const GLchar* GL_APIENTRY glGetRequestableExtensionsCHROMIUM (void);
GL_APICALL void GL_APIENTRY glRequestExtensionCHROMIUM (const char* extension);
GL_APICALL void GL_APIENTRY glRateLimitOffscreenContextCHROMIUM (void);
-GL_APICALL void GL_APIENTRY glSetSurfaceCHROMIUM (GLint surface_id);
GL_APICALL void GL_APIENTRY glGetMultipleIntegervCHROMIUM (const GLenum* pnames, GLuint count, GLint* results, GLsizeiptr size);
GL_APICALL void GL_APIENTRY glGetProgramInfoCHROMIUM (GLidProgram program, GLsizeiNotNegative bufsize, GLsizei* size, void* info);
GL_APICALL void GL_APIENTRY glPlaceholder447CHROMIUM (void);
GL_APICALL void GL_APIENTRY glPlaceholder451CHROMIUM (void);
GL_APICALL void GL_APIENTRY glPlaceholder452CHROMIUM (void);
+GL_APICALL void GL_APIENTRY glPlaceholder453CHROMIUM (void);
"""
# This is the list of all commmands that will be generated and their Id.
@@ -428,7 +428,7 @@ _CMD_ID_TABLE = {
'RequestExtensionCHROMIUM': 450,
'Placeholder451CHROMIUM': 451,
'Placeholder452CHROMIUM': 452,
- 'SetSurfaceCHROMIUM': 453,
+ 'Placeholder453CHROMIUM': 453,
'GetMultipleIntegervCHROMIUM': 454,
'GetProgramInfoCHROMIUM': 455,
}
@@ -1547,12 +1547,6 @@ _FUNCTION_INFO = {
'decoder_func': 'DoReleaseShaderCompiler',
'unit_test': False,
},
- 'SetSurfaceCHROMIUM': {
- 'decoder_func': 'DoSetSurfaceCHROMIUM',
- 'extension': True,
- 'chromium': True,
- 'unit_test': False,
- },
'ShaderBinary': {'type': 'Custom'},
'ShaderSource': {
'type': 'Manual',
@@ -1763,6 +1757,9 @@ _FUNCTION_INFO = {
'Placeholder452CHROMIUM': {
'type': 'UnknownCommand',
},
+ 'Placeholder453CHROMIUM': {
+ 'type': 'UnknownCommand',
+ },
}
diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h
index 6e2dd2b..4ba96ac 100644
--- a/gpu/command_buffer/client/gles2_c_lib_autogen.h
+++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h
@@ -566,9 +566,6 @@ void GLES2RequestExtensionCHROMIUM(const char* extension) {
void GLES2RateLimitOffscreenContextCHROMIUM() {
gles2::GetGLContext()->RateLimitOffscreenContextCHROMIUM();
}
-void GLES2SetSurfaceCHROMIUM(GLint surface_id) {
- gles2::GetGLContext()->SetSurfaceCHROMIUM(surface_id);
-}
void GLES2GetMultipleIntegervCHROMIUM(
const GLenum* pnames, GLuint count, GLint* results, GLsizeiptr size) {
gles2::GetGLContext()->GetMultipleIntegervCHROMIUM(
diff --git a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
index d6d1654..384f4ac 100644
--- a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
+++ b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
@@ -1212,11 +1212,6 @@
c.Init(bucket_id);
}
- void SetSurfaceCHROMIUM(GLint surface_id) {
- gles2::SetSurfaceCHROMIUM& c = GetCmdSpace<gles2::SetSurfaceCHROMIUM>();
- c.Init(surface_id);
- }
-
void GetMultipleIntegervCHROMIUM(
uint32 pnames_shm_id, uint32 pnames_shm_offset, GLuint count,
uint32 results_shm_id, uint32 results_shm_offset, GLsizeiptr size) {
diff --git a/gpu/command_buffer/client/gles2_demo.cc b/gpu/command_buffer/client/gles2_demo.cc
index 66e9026..72937d5 100644
--- a/gpu/command_buffer/client/gles2_demo.cc
+++ b/gpu/command_buffer/client/gles2_demo.cc
@@ -66,7 +66,6 @@ bool GLES2Demo::Setup(void* hwnd, int32 size) {
gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(true));
GpuScheduler* gpu_scheduler = GpuScheduler::Create(command_buffer.get(),
- NULL,
group.get());
if (!gpu_scheduler->Initialize(reinterpret_cast<HWND>(hwnd),
gfx::Size(),
diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h
index 021e3e9..b6d2278 100644
--- a/gpu/command_buffer/client/gles2_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_autogen.h
@@ -1262,11 +1262,6 @@ void RequestExtensionCHROMIUM(const char* extension);
void RateLimitOffscreenContextCHROMIUM();
-void SetSurfaceCHROMIUM(GLint surface_id) {
- GPU_CLIENT_LOG("[" << this << "] glSetSurfaceCHROMIUM(" << surface_id << ")");
- helper_->SetSurfaceCHROMIUM(surface_id);
-}
-
void GetMultipleIntegervCHROMIUM(
const GLenum* pnames, GLuint count, GLint* results, GLsizeiptr size);
diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
index 59df77d..0c29aa7 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -8873,40 +8873,6 @@ COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM, header) == 0,
COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM, bucket_id) == 4,
OffsetOf_RequestExtensionCHROMIUM_bucket_id_not_4);
-struct SetSurfaceCHROMIUM {
- typedef SetSurfaceCHROMIUM ValueType;
- static const CommandId kCmdId = kSetSurfaceCHROMIUM;
- static const cmd::ArgFlags kArgFlags = cmd::kFixed;
-
- static uint32 ComputeSize() {
- return static_cast<uint32>(sizeof(ValueType)); // NOLINT
- }
-
- void SetHeader() {
- header.SetCmd<ValueType>();
- }
-
- void Init(GLint _surface_id) {
- SetHeader();
- surface_id = _surface_id;
- }
-
- void* Set(void* cmd, GLint _surface_id) {
- static_cast<ValueType*>(cmd)->Init(_surface_id);
- return NextCmdAddress<ValueType>(cmd);
- }
-
- gpu::CommandHeader header;
- int32 surface_id;
-};
-
-COMPILE_ASSERT(sizeof(SetSurfaceCHROMIUM) == 8,
- Sizeof_SetSurfaceCHROMIUM_is_not_8);
-COMPILE_ASSERT(offsetof(SetSurfaceCHROMIUM, header) == 0,
- OffsetOf_SetSurfaceCHROMIUM_header_not_0);
-COMPILE_ASSERT(offsetof(SetSurfaceCHROMIUM, surface_id) == 4,
- OffsetOf_SetSurfaceCHROMIUM_surface_id_not_4);
-
struct GetMultipleIntegervCHROMIUM {
typedef GetMultipleIntegervCHROMIUM ValueType;
static const CommandId kCmdId = kGetMultipleIntegervCHROMIUM;
@@ -9109,6 +9075,36 @@ COMPILE_ASSERT(sizeof(Placeholder452CHROMIUM) == 4,
COMPILE_ASSERT(offsetof(Placeholder452CHROMIUM, header) == 0,
OffsetOf_Placeholder452CHROMIUM_header_not_0);
+struct Placeholder453CHROMIUM {
+ typedef Placeholder453CHROMIUM ValueType;
+ static const CommandId kCmdId = kPlaceholder453CHROMIUM;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+
+ static uint32 ComputeSize() {
+ return static_cast<uint32>(sizeof(ValueType)); // NOLINT
+ }
+
+ void SetHeader() {
+ header.SetCmd<ValueType>();
+ }
+
+ void Init() {
+ SetHeader();
+ }
+
+ void* Set(void* cmd) {
+ static_cast<ValueType*>(cmd)->Init();
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+};
+
+COMPILE_ASSERT(sizeof(Placeholder453CHROMIUM) == 4,
+ Sizeof_Placeholder453CHROMIUM_is_not_4);
+COMPILE_ASSERT(offsetof(Placeholder453CHROMIUM, header) == 0,
+ OffsetOf_Placeholder453CHROMIUM_header_not_0);
+
#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
diff --git a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
index 66e45ae..e10a7fe 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -3495,19 +3495,6 @@ TEST(GLES2FormatTest, RequestExtensionCHROMIUM) {
EXPECT_EQ(static_cast<uint32>(11), cmd.bucket_id);
}
-TEST(GLES2FormatTest, SetSurfaceCHROMIUM) {
- SetSurfaceCHROMIUM cmd = { { 0 } };
- void* next_cmd = cmd.Set(
- &cmd,
- static_cast<GLint>(11));
- EXPECT_EQ(static_cast<uint32>(SetSurfaceCHROMIUM::kCmdId),
- cmd.header.command);
- EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
- EXPECT_EQ(static_cast<char*>(next_cmd),
- reinterpret_cast<char*>(&cmd) + sizeof(cmd));
- EXPECT_EQ(static_cast<GLint>(11), cmd.surface_id);
-}
-
TEST(GLES2FormatTest, GetMultipleIntegervCHROMIUM) {
GetMultipleIntegervCHROMIUM cmd = { { 0 } };
void* next_cmd = cmd.Set(
@@ -3579,5 +3566,16 @@ TEST(GLES2FormatTest, Placeholder452CHROMIUM) {
reinterpret_cast<char*>(&cmd) + sizeof(cmd));
}
+TEST(GLES2FormatTest, Placeholder453CHROMIUM) {
+ Placeholder453CHROMIUM cmd = { { 0 } };
+ void* next_cmd = cmd.Set(
+ &cmd);
+ EXPECT_EQ(static_cast<uint32>(Placeholder453CHROMIUM::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<char*>(next_cmd),
+ reinterpret_cast<char*>(&cmd) + sizeof(cmd));
+}
+
#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_
diff --git a/gpu/command_buffer/common/gles2_cmd_id_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_id_test_autogen.h
index 5d3ceb4..cae5339 100644
--- a/gpu/command_buffer/common/gles2_cmd_id_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_id_test_autogen.h
@@ -401,8 +401,6 @@ TEST(GLES2CommandIdTest, CommandIdsMatch) {
GLES2_GetRequestableExtensionsCHROMIUM_kCmdId_mismatch);
COMPILE_ASSERT(RequestExtensionCHROMIUM::kCmdId == 450,
GLES2_RequestExtensionCHROMIUM_kCmdId_mismatch);
- COMPILE_ASSERT(SetSurfaceCHROMIUM::kCmdId == 453,
- GLES2_SetSurfaceCHROMIUM_kCmdId_mismatch);
COMPILE_ASSERT(GetMultipleIntegervCHROMIUM::kCmdId == 454,
GLES2_GetMultipleIntegervCHROMIUM_kCmdId_mismatch);
COMPILE_ASSERT(GetProgramInfoCHROMIUM::kCmdId == 455,
diff --git a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
index 910302b..1063edf 100644
--- a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
@@ -207,7 +207,7 @@
OP(RequestExtensionCHROMIUM) /* 450 */ \
OP(Placeholder451CHROMIUM) /* 451 */ \
OP(Placeholder452CHROMIUM) /* 452 */ \
- OP(SetSurfaceCHROMIUM) /* 453 */ \
+ OP(Placeholder453CHROMIUM) /* 453 */ \
OP(GetMultipleIntegervCHROMIUM) /* 454 */ \
OP(GetProgramInfoCHROMIUM) /* 455 */ \
diff --git a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
index b74a318..559fe88 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
@@ -179,7 +179,7 @@ static GLES2Util::EnumToString enum_to_string_table[] = {
{ 0x00000400, "GL_STENCIL_BUFFER_BIT", },
{ 0x800A, "GL_FUNC_SUBTRACT", },
{ 0x8E2C, "GL_DEPTH_COMPONENT16_NONLINEAR_NV", },
- { 0x889F, "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", },
+ { 0x8508, "GL_DECR_WRAP", },
{ 0x8006, "GL_FUNC_ADD", },
{ 0x8007, "GL_MIN_EXT", },
{ 0x8004, "GL_ONE_MINUS_CONSTANT_ALPHA", },
@@ -408,7 +408,7 @@ static GLES2Util::EnumToString enum_to_string_table[] = {
{ 0x80CA, "GL_BLEND_DST_ALPHA", },
{ 0x8CD6, "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT", },
{ 0x8872, "GL_MAX_TEXTURE_IMAGE_UNITS", },
- { 0x8508, "GL_DECR_WRAP", },
+ { 0x889F, "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", },
{ 0x8507, "GL_INCR_WRAP", },
{ 0x8895, "GL_ELEMENT_ARRAY_BUFFER_BINDING", },
{ 0x8894, "GL_ARRAY_BUFFER_BINDING", },
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 923cfae..d6e8cfd 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -34,7 +34,6 @@
#include "gpu/command_buffer/service/renderbuffer_manager.h"
#include "gpu/command_buffer/service/shader_manager.h"
#include "gpu/command_buffer/service/shader_translator.h"
-#include "gpu/command_buffer/service/surface_manager.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "gpu/command_buffer/service/vertex_attrib_manager.h"
#include "ui/gfx/gl/gl_context.h"
@@ -448,7 +447,7 @@ GLES2Decoder::~GLES2Decoder() {
class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>,
public GLES2Decoder {
public:
- GLES2DecoderImpl(SurfaceManager* surface_manager, ContextGroup* group);
+ explicit GLES2DecoderImpl(ContextGroup* group);
// Overridden from AsyncAPIInterface.
virtual Error DoCommand(unsigned int command,
@@ -1038,8 +1037,6 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>,
// Wrapper for glValidateProgram.
void DoValidateProgram(GLuint program_client_id);
- void DoSetSurfaceCHROMIUM(GLint surface_id);
-
// Gets the number of values that will be returned by glGetXXX. Returns
// false if pname is unknown.
bool GetNumValuesReturnedForGLGet(GLenum pname, GLsizei* num_values);
@@ -1168,9 +1165,6 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>,
#undef GLES2_CMD_OP
- // Maps surface IDs to GLSurface.
- gpu::SurfaceManager* surface_manager_;
-
// The GL context this decoder renders to on behalf of the client.
scoped_refptr<gfx::GLSurface> surface_;
scoped_refptr<gfx::GLContext> context_;
@@ -1636,15 +1630,12 @@ GLenum FrameBuffer::CheckStatus() {
return glCheckFramebufferStatusEXT(GL_FRAMEBUFFER);
}
-GLES2Decoder* GLES2Decoder::Create(SurfaceManager* surface_manager,
- ContextGroup* group) {
- return new GLES2DecoderImpl(surface_manager, group);
+GLES2Decoder* GLES2Decoder::Create(ContextGroup* group) {
+ return new GLES2DecoderImpl(group);
}
-GLES2DecoderImpl::GLES2DecoderImpl(SurfaceManager* surface_manager,
- ContextGroup* group)
+GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group)
: GLES2Decoder(),
- surface_manager_(surface_manager),
group_(group),
error_bits_(0),
pack_alignment_(4),
@@ -2558,14 +2549,6 @@ error::Error GLES2DecoderImpl::HandleResizeCHROMIUM(
return error::kNoError;
}
-void GLES2DecoderImpl::DoSetSurfaceCHROMIUM(GLint surface_id) {
- gfx::GLSurface* surface = surface_manager_->LookupSurface(surface_id);
- if (!surface)
- return;
-
- surface_ = surface;
-}
-
const char* GLES2DecoderImpl::GetCommandName(unsigned int command_id) const {
if (command_id > kStartPoint && command_id < kNumCommands) {
return gles2::GetCommandName(static_cast<CommandId>(command_id));
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h
index 5995d4b..35ad67d 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.h
@@ -42,8 +42,7 @@ class GLES2Decoder : public CommonDecoder {
typedef error::Error Error;
// Creates a decoder.
- static GLES2Decoder* Create(SurfaceManager* surface_manager,
- ContextGroup* group);
+ static GLES2Decoder* Create(ContextGroup* group);
virtual ~GLES2Decoder();
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
index 27ef39b..2fb68fe 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
@@ -2568,13 +2568,6 @@ error::Error GLES2DecoderImpl::HandleGetMaxValueInBufferCHROMIUM(
return error::kNoError;
}
-error::Error GLES2DecoderImpl::HandleSetSurfaceCHROMIUM(
- uint32 immediate_data_size, const gles2::SetSurfaceCHROMIUM& c) {
- GLint surface_id = static_cast<GLint>(c.surface_id);
- DoSetSurfaceCHROMIUM(surface_id);
- return error::kNoError;
-}
-
error::Error GLES2DecoderImpl::HandlePlaceholder447CHROMIUM(
uint32 immediate_data_size, const gles2::Placeholder447CHROMIUM& c) {
return error::kUnknownCommand;
@@ -2587,5 +2580,9 @@ error::Error GLES2DecoderImpl::HandlePlaceholder452CHROMIUM(
uint32 immediate_data_size, const gles2::Placeholder452CHROMIUM& c) {
return error::kUnknownCommand;
}
+error::Error GLES2DecoderImpl::HandlePlaceholder453CHROMIUM(
+ uint32 immediate_data_size, const gles2::Placeholder453CHROMIUM& c) {
+ return error::kUnknownCommand;
+}
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
index cf648fd..3081ac9 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -2894,45 +2894,6 @@ TEST_F(GLES2DecoderWithShaderTest, VertexAttribPointer) {
}
}
-TEST_F(GLES2DecoderTest, SetSurfaceCHROMIUMChangesSurfaceForExistentSurface) {
- const int kSurfaceId = 1;
- scoped_refptr<gfx::GLSurfaceStub> surface(new gfx::GLSurfaceStub);
-
- EXPECT_CALL(*surface_manager_.get(), LookupSurface(kSurfaceId))
- .WillOnce(Return(surface.get()))
- .RetiresOnSaturation();
-
- SetSurfaceCHROMIUM cmd;
- cmd.Init(kSurfaceId);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
-
- EXPECT_EQ(surface.get(), decoder_->GetGLSurface());
-}
-
-TEST_F(GLES2DecoderTest,
- SetSurfaceCHROMIUMDoesNotChangeSurfaceWhenSurfaceDoesNotExist) {
- const int kExistentSurfaceId = 1;
- const int kNonexistentSurfaceId = 2;
- scoped_refptr<gfx::GLSurfaceStub> surface(new gfx::GLSurfaceStub);
-
- EXPECT_CALL(*surface_manager_.get(), LookupSurface(kExistentSurfaceId))
- .WillOnce(Return(surface.get()))
- .RetiresOnSaturation();
-
- EXPECT_CALL(*surface_manager_.get(), LookupSurface(kNonexistentSurfaceId))
- .WillOnce(Return(static_cast<gfx::GLSurface*>(NULL)))
- .RetiresOnSaturation();
-
- SetSurfaceCHROMIUM cmd;
- cmd.Init(kExistentSurfaceId);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
-
- cmd.Init(kNonexistentSurfaceId);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
-
- EXPECT_EQ(surface.get(), decoder_->GetGLSurface());
-}
-
// Test that with an RGB backbuffer if we set the color mask to 1,1,1,1 it is
// set to 1,1,1,0 at Draw time but is 1,1,1,1 at query time.
TEST_F(GLES2DecoderRGBBackbufferTest, RGBBackbufferColorMask) {
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
index 1206925..a94aff6 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
@@ -1711,8 +1711,9 @@ TEST_F(GLES2DecoderTest2, ViewportInvalidArgs3_0) {
// TODO(gman): RequestExtensionCHROMIUM
-// TODO(gman): SetSurfaceCHROMIUM
// TODO(gman): GetMultipleIntegervCHROMIUM
+// TODO(gman): GetProgramInfoCHROMIUM
+
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
index 80f5bc3..ce9cc45 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
@@ -10,7 +10,5 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_
#define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_
-// TODO(gman): GetProgramInfoCHROMIUM
-
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
index d20daa9..eb69e87 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -70,7 +70,6 @@ void GLES2DecoderTestBase::InitDecoder(
bool bind_generates_resource) {
gl_.reset(new StrictMock<MockGLInterface>());
::gfx::GLInterface::SetGLInterface(gl_.get());
- surface_manager_.reset(new StrictMock<MockSurfaceManager>);
group_ = ContextGroup::Ref(new ContextGroup(bind_generates_resource));
InSequence sequence;
@@ -181,7 +180,7 @@ void GLES2DecoderTestBase::InitDecoder(
};
std::vector<int32> attribs(attributes, attributes + arraysize(attributes));
- decoder_.reset(GLES2Decoder::Create(surface_manager_.get(), group_.get()));
+ decoder_.reset(GLES2Decoder::Create(group_.get()));
decoder_->Initialize(
surface_, context_, surface_->GetSize(), DisallowedExtensions(),
NULL, attribs);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
index be2ba02..c3e0dd8 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
@@ -16,7 +16,6 @@
#include "gpu/command_buffer/service/program_manager.h"
#include "gpu/command_buffer/service/renderbuffer_manager.h"
#include "gpu/command_buffer/service/shader_manager.h"
-#include "gpu/command_buffer/service/surface_manager_mock.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/gl/gl_context_stub.h"
@@ -276,7 +275,6 @@ class GLES2DecoderTestBase : public testing::Test {
scoped_refptr<gfx::GLSurfaceStub> surface_;
scoped_refptr<gfx::GLContextStub> context_;
scoped_ptr<GLES2Decoder> decoder_;
- scoped_ptr<MockSurfaceManager> surface_manager_;
GLuint client_buffer_id_;
GLuint client_framebuffer_id_;
diff --git a/gpu/command_buffer/service/gpu_scheduler.cc b/gpu/command_buffer/service/gpu_scheduler.cc
index c4505a5..70f84a4 100644
--- a/gpu/command_buffer/service/gpu_scheduler.cc
+++ b/gpu/command_buffer/service/gpu_scheduler.cc
@@ -20,12 +20,10 @@ using ::base::SharedMemory;
namespace gpu {
GpuScheduler* GpuScheduler::Create(CommandBuffer* command_buffer,
- SurfaceManager* surface_manager,
gles2::ContextGroup* group) {
DCHECK(command_buffer);
- gles2::GLES2Decoder* decoder =
- gles2::GLES2Decoder::Create(surface_manager, group);
+ gles2::GLES2Decoder* decoder = gles2::GLES2Decoder::Create(group);
GpuScheduler* scheduler = new GpuScheduler(command_buffer,
decoder,
diff --git a/gpu/command_buffer/service/gpu_scheduler.h b/gpu/command_buffer/service/gpu_scheduler.h
index 7d12535..72ffe26 100644
--- a/gpu/command_buffer/service/gpu_scheduler.h
+++ b/gpu/command_buffer/service/gpu_scheduler.h
@@ -43,7 +43,6 @@ class GpuScheduler : public CommandBufferEngine {
public:
// If a group is not passed in one will be created.
static GpuScheduler* Create(CommandBuffer* command_buffer,
- SurfaceManager* surface_manager,
gles2::ContextGroup* group);
// This constructor is for unit tests.
diff --git a/gpu/command_buffer/service/surface_manager.cc b/gpu/command_buffer/service/surface_manager.cc
deleted file mode 100644
index 2fca939..0000000
--- a/gpu/command_buffer/service/surface_manager.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2011 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/command_buffer/service/surface_manager.h"
-
-namespace gpu {
-
-SurfaceManager::SurfaceManager() {
-}
-
-SurfaceManager::~SurfaceManager() {
-}
-
-} // namespace gpu
diff --git a/gpu/command_buffer/service/surface_manager.h b/gpu/command_buffer/service/surface_manager.h
deleted file mode 100644
index 4caa4ac..0000000
--- a/gpu/command_buffer/service/surface_manager.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2011 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_COMMAND_BUFFER_SERVICE_SURFACE_MANAGER_H_
-#define GPU_COMMAND_BUFFER_SERVICE_SURFACE_MANAGER_H_
-
-#include "base/basictypes.h"
-
-namespace gfx {
-class GLSurface;
-}
-
-namespace gpu {
-
-// Interface used to get the GLSurface corresponding to an ID communicated
-// through the command buffer.
-class SurfaceManager {
- public:
- SurfaceManager();
- virtual ~SurfaceManager();
-
- virtual gfx::GLSurface* LookupSurface(int id) = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SurfaceManager);
-};
-
-} // namespace gpu
-
-#endif // GPU_COMMAND_BUFFER_SERVICE_SURFACE_MANAGER_H_
diff --git a/gpu/command_buffer/service/surface_manager_mock.cc b/gpu/command_buffer/service/surface_manager_mock.cc
deleted file mode 100644
index e472582..0000000
--- a/gpu/command_buffer/service/surface_manager_mock.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2011 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/command_buffer/service/surface_manager_mock.h"
-
-namespace gpu {
-
-MockSurfaceManager::MockSurfaceManager() {
-}
-
-MockSurfaceManager::~MockSurfaceManager() {
-}
-
-} // namespace gpu
diff --git a/gpu/command_buffer/service/surface_manager_mock.h b/gpu/command_buffer/service/surface_manager_mock.h
deleted file mode 100644
index 97f878e..0000000
--- a/gpu/command_buffer/service/surface_manager_mock.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2011 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_COMMAND_BUFFER_SERVICE_SURFACE_MANAGER_MOCK_H_
-#define GPU_COMMAND_BUFFER_SERVICE_SURFACE_MANAGER_MOCK_H_
-
-#include "gpu/command_buffer/service/surface_manager.h"
-#include "testing/gmock/include/gmock/gmock.h"
-
-namespace gpu {
-
-class MockSurfaceManager : public SurfaceManager {
- public:
- MockSurfaceManager();
- virtual ~MockSurfaceManager();
-
- MOCK_METHOD1(LookupSurface, gfx::GLSurface*(int id));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockSurfaceManager);
-};
-
-} // namespace gpu
-
-#endif // GPU_COMMAND_BUFFER_SERVICE_SURFACE_MANAGER_MOCK_H_
diff --git a/gpu/demos/framework/window.cc b/gpu/demos/framework/window.cc
index e5d24dd..30e4b5e 100644
--- a/gpu/demos/framework/window.cc
+++ b/gpu/demos/framework/window.cc
@@ -60,9 +60,7 @@ bool Window::CreateRenderContext(gfx::PluginWindowHandle hwnd) {
}
GpuScheduler* gpu_scheduler(
- GpuScheduler::Create(command_buffer.get(),
- NULL,
- NULL));
+ GpuScheduler::Create(command_buffer.get(), NULL));
if (!gpu_scheduler->Initialize(hwnd, gfx::Size(), false,
gpu::gles2::DisallowedExtensions(),
NULL, std::vector<int32>(),
diff --git a/gpu/gles2_conform_support/egl/display.cc b/gpu/gles2_conform_support/egl/display.cc
index 7b5d26b..da0ac3c 100644
--- a/gpu/gles2_conform_support/egl/display.cc
+++ b/gpu/gles2_conform_support/egl/display.cc
@@ -110,9 +110,7 @@ EGLSurface Display::CreateWindowSurface(EGLConfig config,
std::vector<int32> attribs;
gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(true));
scoped_ptr<GpuScheduler> gpu_scheduler(
- GpuScheduler::Create(command_buffer_.get(),
- NULL,
- group.get()));
+ GpuScheduler::Create(command_buffer_.get(), group.get()));
if (!gpu_scheduler->Initialize(
win, gfx::Size(), false, gpu::gles2::DisallowedExtensions(), NULL,
attribs, NULL))
diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp
index 436545b..b571fe1 100644
--- a/gpu/gpu.gyp
+++ b/gpu/gpu.gyp
@@ -232,8 +232,6 @@
'command_buffer/service/shader_manager.cc',
'command_buffer/service/shader_translator.h',
'command_buffer/service/shader_translator.cc',
- 'command_buffer/service/surface_manager.cc',
- 'command_buffer/service/surface_manager.h',
'command_buffer/service/texture_manager.h',
'command_buffer/service/texture_manager.cc',
'command_buffer/service/vertex_attrib_manager.h',
@@ -310,8 +308,6 @@
'command_buffer/service/renderbuffer_manager_unittest.cc',
'command_buffer/service/shader_manager_unittest.cc',
'command_buffer/service/shader_translator_unittest.cc',
- 'command_buffer/service/surface_manager_mock.cc',
- 'command_buffer/service/surface_manager_mock.h',
'command_buffer/service/test_helper.cc',
'command_buffer/service/test_helper.h',
'command_buffer/service/texture_manager_unittest.cc',
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
index 0c862fe..40a5957 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -436,7 +436,6 @@ bool GLInProcessContext::Initialize(bool onscreen,
bool bind_generates_resource = false;
gpu_scheduler_ = GpuScheduler::Create(
command_buffer_.get(),
- NULL,
context_group ?
context_group->gpu_scheduler_->decoder()->GetContextGroup() :
new ::gpu::gles2::ContextGroup(bind_generates_resource));