summaryrefslogtreecommitdiffstats
path: root/webkit/gpu
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 21:53:38 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 21:53:38 +0000
commit0b7a2fff445beb2c5de1e2a632540a4107e00708 (patch)
tree759f7a9d489b6bf44c9f5de081d7bf335233028d /webkit/gpu
parent72ab1b792dbddfb680490153984b1865b725d8f4 (diff)
downloadchromium_src-0b7a2fff445beb2c5de1e2a632540a4107e00708.zip
chromium_src-0b7a2fff445beb2c5de1e2a632540a4107e00708.tar.gz
chromium_src-0b7a2fff445beb2c5de1e2a632540a4107e00708.tar.bz2
Revert 87371 - Broke Compile - Support for glSetSurfaceCHROMIUM.
This command allows a previously created GPU surface to be made current for a command buffer. There are no surfaces registered at this point so this command is currently a no-op. Review URL: http://codereview.chromium.org/7077001 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7027008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87373 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/gpu')
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc16
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h6
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.cc17
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.h6
4 files changed, 23 insertions, 22 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
index dfb4959..62439d8 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -10,7 +10,6 @@
#include <string>
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
@@ -134,7 +133,7 @@ bool WebGraphicsContext3DInProcessCommandBufferImpl::initialize(
// and from there to the window, and WebViewImpl::paint already
// correctly handles the case where the compositor is active but
// the output needs to go to a WebCanvas.
- gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1));
+ gl_surface_.reset(gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)));
if (!gl_surface_.get()) {
if (!is_gles2_)
@@ -149,13 +148,14 @@ bool WebGraphicsContext3DInProcessCommandBufferImpl::initialize(
// necessary.
webView->mainFrame()->collectGarbage();
- gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1));
+ gl_surface_.reset(gfx::GLSurface::CreateOffscreenGLSurface(
+ gfx::Size(1, 1)));
if (!gl_surface_.get())
return false;
}
- gl_context_ = gfx::GLContext::CreateGLContext(share_context,
- gl_surface_.get());
+ gl_context_.reset(gfx::GLContext::CreateGLContext(share_context,
+ gl_surface_.get()));
if (!gl_context_.get()) {
if (!is_gles2_)
return false;
@@ -169,8 +169,8 @@ bool WebGraphicsContext3DInProcessCommandBufferImpl::initialize(
// necessary.
webView->mainFrame()->collectGarbage();
- gl_context_ = gfx::GLContext::CreateGLContext(share_context,
- gl_surface_.get());
+ gl_context_.reset(gfx::GLContext::CreateGLContext(share_context,
+ gl_surface_.get()));
if (!gl_context_.get())
return false;
}
@@ -189,7 +189,7 @@ bool WebGraphicsContext3DInProcessCommandBufferImpl::initialize(
attributes_.antialias = false;
if (!gl_context_->MakeCurrent(gl_surface_.get())) {
- gl_context_ = NULL;
+ gl_context_.reset();
return false;
}
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
index dc51c80..08c8df1 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
@@ -9,7 +9,7 @@
#include <set>
#include "base/hash_tables.h"
-#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "third_party/angle/include/GLSLANG/ShaderLang.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebGraphicsContext3D.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
@@ -464,8 +464,8 @@ class WebGraphicsContext3DInProcessCommandBufferImpl : public WebGraphicsContext
std::list<WGC3Denum> synthetic_errors_list_;
std::set<WGC3Denum> synthetic_errors_set_;
- scoped_refptr<gfx::GLContext> gl_context_;
- scoped_refptr<gfx::GLSurface> gl_surface_;
+ scoped_ptr<gfx::GLContext> gl_context_;
+ scoped_ptr<gfx::GLSurface> gl_surface_;
ShaderSourceMap shader_source_map_;
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
index f79f4a6..f2fc2e9 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
@@ -10,7 +10,6 @@
#include <string>
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
@@ -135,7 +134,8 @@ bool WebGraphicsContext3DInProcessImpl::initialize(
// and from there to the window, and WebViewImpl::paint already
// correctly handles the case where the compositor is active but
// the output needs to go to a WebCanvas.
- gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1));
+ gl_surface_.reset(gfx::GLSurface::CreateOffscreenGLSurface(
+ gfx::Size(1, 1)));
if (!gl_surface_.get()) {
if (!is_gles2_)
return false;
@@ -149,13 +149,14 @@ bool WebGraphicsContext3DInProcessImpl::initialize(
// necessary.
webView->mainFrame()->collectGarbage();
- gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1));
+ gl_surface_.reset(
+ gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)));
if (!gl_surface_.get())
return false;
}
- gl_context_ = gfx::GLContext::CreateGLContext(share_context,
- gl_surface_.get());
+ gl_context_.reset(gfx::GLContext::CreateGLContext(share_context,
+ gl_surface_.get()));
if (!gl_context_.get()) {
if (!is_gles2_)
return false;
@@ -169,8 +170,8 @@ bool WebGraphicsContext3DInProcessImpl::initialize(
// necessary.
webView->mainFrame()->collectGarbage();
- gl_context_ = gfx::GLContext::CreateGLContext(share_context,
- gl_surface_.get());
+ gl_context_.reset(gfx::GLContext::CreateGLContext(share_context,
+ gl_surface_.get()));
if (!gl_context_.get())
return false;
}
@@ -189,7 +190,7 @@ bool WebGraphicsContext3DInProcessImpl::initialize(
attributes_.antialias = false;
if (!gl_context_->MakeCurrent(gl_surface_.get())) {
- gl_context_ = NULL;
+ gl_context_.reset();
return false;
}
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
index 304f9fb..ae3fac2 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.h
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
@@ -9,7 +9,7 @@
#include <set>
#include "base/hash_tables.h"
-#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "third_party/angle/include/GLSLANG/ShaderLang.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebGraphicsContext3D.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
@@ -468,8 +468,8 @@ class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D {
std::list<WGC3Denum> synthetic_errors_list_;
std::set<WGC3Denum> synthetic_errors_set_;
- scoped_refptr<gfx::GLContext> gl_context_;
- scoped_refptr<gfx::GLSurface> gl_surface_;
+ scoped_ptr<gfx::GLContext> gl_context_;
+ scoped_ptr<gfx::GLSurface> gl_surface_;
ShaderSourceMap shader_source_map_;