summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-30 19:56:45 +0000
committerboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-30 19:56:45 +0000
commitb658871502a810bbf2692a61cf0986978100bcc2 (patch)
tree24bad83fbf825cef003a39b8a0aab4438f28cac8 /content/common
parent0113d8d2435ef2ba6ccb208acacd74400c97ee83 (diff)
downloadchromium_src-b658871502a810bbf2692a61cf0986978100bcc2.zip
chromium_src-b658871502a810bbf2692a61cf0986978100bcc2.tar.gz
chromium_src-b658871502a810bbf2692a61cf0986978100bcc2.tar.bz2
Remove dead code in WGC3DCBI
Removing InitializeWithCommandBuffer and CreateViewContext. Also one tiny fix for multiple MaybeInitializeGL calls on failure. BUG= Review URL: https://chromiumcodereview.appspot.com/14569004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197440 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc35
-rw-r--r--content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h27
2 files changed, 1 insertions, 61 deletions
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
index 1951c47..9e7e9ad 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -180,16 +180,6 @@ WebGraphicsContext3DCommandBufferImpl::
Destroy();
}
-void WebGraphicsContext3DCommandBufferImpl::InitializeWithCommandBuffer(
- CommandBufferProxyImpl* command_buffer,
- const WebGraphicsContext3D::Attributes& attributes,
- bool bind_generates_resources) {
- DCHECK(command_buffer);
- command_buffer_ = command_buffer;
- attributes_ = attributes;
- bind_generates_resources_ = bind_generates_resources;
-}
-
bool WebGraphicsContext3DCommandBufferImpl::Initialize(
const WebGraphicsContext3D::Attributes& attributes,
bool bind_generates_resources,
@@ -230,6 +220,7 @@ bool WebGraphicsContext3DCommandBufferImpl::MaybeInitializeGL(
allowed_extensions ?
allowed_extensions : preferred_extensions)) {
Destroy();
+ initialize_failed_ = true;
return false;
}
@@ -1531,30 +1522,6 @@ bool WebGraphicsContext3DCommandBufferImpl::IsCommandBufferContextLost() {
// static
WebGraphicsContext3DCommandBufferImpl*
-WebGraphicsContext3DCommandBufferImpl::CreateViewContext(
- GpuChannelHostFactory* factory,
- int32 surface_id,
- const char* allowed_extensions,
- const WebGraphicsContext3D::Attributes& attributes,
- bool bind_generates_resources,
- const GURL& active_url,
- CauseForGpuLaunch cause) {
- WebGraphicsContext3DCommandBufferImpl* context =
- new WebGraphicsContext3DCommandBufferImpl(
- surface_id,
- active_url,
- factory,
- base::WeakPtr<WebGraphicsContext3DSwapBuffersClient>());
- if (!context->Initialize(attributes, bind_generates_resources, cause) ||
- !context->MaybeInitializeGL(allowed_extensions)) {
- delete context;
- return NULL;
- }
- return context;
-}
-
-// static
-WebGraphicsContext3DCommandBufferImpl*
WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
GpuChannelHostFactory* factory,
const WebGraphicsContext3D::Attributes& attributes,
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
index 6cbc318..c24a238 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
@@ -79,11 +79,6 @@ class WebGraphicsContext3DCommandBufferImpl
virtual ~WebGraphicsContext3DCommandBufferImpl();
- void InitializeWithCommandBuffer(
- CommandBufferProxyImpl* command_buffer,
- const Attributes& attributes,
- bool bind_generates_resources);
-
bool Initialize(const Attributes& attributes,
bool bind_generates_resources,
CauseForGpuLaunch cause);
@@ -106,28 +101,6 @@ class WebGraphicsContext3DCommandBufferImpl
// problem communicating with the GPU process.
bool IsCommandBufferContextLost();
- // Create a WebGraphicsContext3DCommandBufferImpl that renders directly to a
- // view. The view and the associated window must not be destroyed until
- // the returned ContentGLContext has been destroyed, otherwise the GPU process
- // might attempt to render to an invalid window handle.
- //
- // NOTE: on Mac OS X, this entry point is only used to set up the
- // accelerated compositor's output. On this platform, we actually pass
- // a gfx::PluginWindowHandle in place of the gfx::NativeViewId,
- // because the facility to allocate a fake PluginWindowHandle is
- // already in place. We could add more entry points and messages to
- // allocate both fake PluginWindowHandles and NativeViewIds and map
- // from fake NativeViewIds to PluginWindowHandles, but this seems like
- // unnecessary complexity at the moment.
- static WebGraphicsContext3DCommandBufferImpl* CreateViewContext(
- GpuChannelHostFactory* factory,
- int32 surface_id,
- const char* allowed_extensions,
- const WebGraphicsContext3D::Attributes& attributes,
- bool bind_generates_resources,
- const GURL& active_url,
- CauseForGpuLaunch cause);
-
// Create & initialize a WebGraphicsContext3DCommandBufferImpl. Return NULL
// on any failure.
static WebGraphicsContext3DCommandBufferImpl* CreateOffscreenContext(