diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-17 18:28:09 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-17 18:28:09 +0000 |
commit | 658f03f18b7bb5f475e8536d4689e153549e5ac9 (patch) | |
tree | 39f9f4117ac60ad7f7f7737215d1491bab994ffb | |
parent | eacc2f41a8b08d2dea319e88759b3d27e22a1cf1 (diff) | |
download | chromium_src-658f03f18b7bb5f475e8536d4689e153549e5ac9.zip chromium_src-658f03f18b7bb5f475e8536d4689e153549e5ac9.tar.gz chromium_src-658f03f18b7bb5f475e8536d4689e153549e5ac9.tar.bz2 |
Delete usage and support for EGL_ANGLE_software_display extension.
We aren't using it anymore. It used to be used to switch to SwitchShader but the new version of SwiftShader exposes a EGL / GLES2 interface without ANGLE in between.
TBR=kbr@chromium.org, senorblanco@chromium.org
Review URL: https://codereview.chromium.org/17110007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206759 0039d316-1c4b-4281-b951-d872f2087c98
21 files changed, 37 insertions, 123 deletions
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc index 6bda5b84..fff1638 100644 --- a/content/common/gpu/gpu_channel_manager.cc +++ b/content/common/gpu/gpu_channel_manager.cc @@ -291,7 +291,7 @@ void GpuChannelManager::OnLoseAllContexts() { gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { if (!default_offscreen_surface_.get()) { default_offscreen_surface_ = - gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1)); + gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)); } return default_offscreen_surface_.get(); } diff --git a/content/common/gpu/image_transport_surface_android.cc b/content/common/gpu/image_transport_surface_android.cc index 2d8ee43..5ba2d17 100644 --- a/content/common/gpu/image_transport_surface_android.cc +++ b/content/common/gpu/image_transport_surface_android.cc @@ -22,7 +22,7 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( GpuSurfaceLookup::GetInstance()->AcquireNativeWidget( stub->surface_id()); scoped_refptr<gfx::GLSurface> surface = - new gfx::NativeViewGLSurfaceEGL(false, window); + new gfx::NativeViewGLSurfaceEGL(window); bool initialize_success = surface->Initialize(); if (window) ANativeWindow_release(window); diff --git a/content/common/gpu/image_transport_surface_linux.cc b/content/common/gpu/image_transport_surface_linux.cc index c6e5930..238d74d 100644 --- a/content/common/gpu/image_transport_surface_linux.cc +++ b/content/common/gpu/image_transport_surface_linux.cc @@ -15,7 +15,7 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( DCHECK(handle.transport_type == gfx::NATIVE_DIRECT || handle.transport_type == gfx::NATIVE_TRANSPORT); scoped_refptr<gfx::GLSurface> surface = - gfx::GLSurface::CreateViewGLSurface(false, handle.handle); + gfx::GLSurface::CreateViewGLSurface(handle.handle); if (!surface.get()) return surface; return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( diff --git a/content/common/gpu/image_transport_surface_win.cc b/content/common/gpu/image_transport_surface_win.cc index a7ebaa8..74dfbaa 100644 --- a/content/common/gpu/image_transport_surface_win.cc +++ b/content/common/gpu/image_transport_surface_win.cc @@ -79,7 +79,7 @@ class PbufferImageTransportSurface PbufferImageTransportSurface::PbufferImageTransportSurface( GpuChannelManager* manager, GpuCommandBufferStub* stub) - : GLSurfaceAdapter(new gfx::PbufferGLSurfaceEGL(false, gfx::Size(1, 1))), + : GLSurfaceAdapter(new gfx::PbufferGLSurfaceEGL(gfx::Size(1, 1))), backbuffer_suggested_allocation_(true), frontbuffer_suggested_allocation_(true), is_swap_buffers_pending_(false), @@ -270,7 +270,7 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( } scoped_refptr<gfx::GLSurface> surface = - gfx::GLSurface::CreateViewGLSurface(false, handle.handle); + gfx::GLSurface::CreateViewGLSurface(handle.handle); if (!surface) return surface; return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc index dc59afb..794617d 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -308,7 +308,7 @@ namespace { #if defined(OS_LINUX) void CreateDummyGlContext() { scoped_refptr<gfx::GLSurface> surface( - gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1))); + gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1))); if (!surface.get()) { VLOG(1) << "gfx::GLSurface::CreateOffscreenGLSurface failed"; return; diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_egl.cc b/gpu/command_buffer/service/async_pixel_transfer_manager_egl.cc index 8564e01..4931bfe 100644 --- a/gpu/command_buffer/service/async_pixel_transfer_manager_egl.cc +++ b/gpu/command_buffer/service/async_pixel_transfer_manager_egl.cc @@ -102,8 +102,7 @@ class TransferThread : public base::Thread { virtual void Init() OVERRIDE { gfx::GLShareGroup* share_group = NULL; - bool software = false; - surface_ = new gfx::PbufferGLSurfaceEGL(software, gfx::Size(1,1)); + surface_ = new gfx::PbufferGLSurfaceEGL(gfx::Size(1, 1)); surface_->Initialize(); context_ = gfx::GLContext::CreateGLContext( share_group, surface_.get(), gfx::PreferDiscreteGpu); diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc b/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc index 67aa52e..2e13e7f 100644 --- a/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc +++ b/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc @@ -99,7 +99,7 @@ class TransferThread : public base::Thread { return; } - surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1)); + surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)); if (!surface_.get()) { LOG(ERROR) << "Unable to create GLSurface"; caller_wait->Signal(); diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc index cb05e35..9089579 100644 --- a/gpu/command_buffer/tests/gl_manager.cc +++ b/gpu/command_buffer/tests/gl_manager.cc @@ -148,7 +148,7 @@ void GLManager::Initialize(const GLManager::Options& options) { decoder_->set_engine(gpu_scheduler_.get()); - surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, options.size); + surface_ = gfx::GLSurface::CreateOffscreenGLSurface(options.size); ASSERT_TRUE(surface_.get() != NULL) << "could not create offscreen surface"; if (real_gl_context) { @@ -217,7 +217,7 @@ void GLManager::SetupBaseContext() { new gfx::GLShareGroup); gfx::Size size(4, 4); base_surface_ = new scoped_refptr<gfx::GLSurface>( - gfx::GLSurface::CreateOffscreenGLSurface(false, size)); + gfx::GLSurface::CreateOffscreenGLSurface(size)); gfx::GpuPreference gpu_preference(gfx::PreferDiscreteGpu); base_context_ = new scoped_refptr<gfx::GLContext>( gfx::GLContext::CreateGLContext(base_share_group_->get(), diff --git a/gpu/command_buffer/tests/gl_unittests_android.cc b/gpu/command_buffer/tests/gl_unittests_android.cc index b1d4151..870bedb 100644 --- a/gpu/command_buffer/tests/gl_unittests_android.cc +++ b/gpu/command_buffer/tests/gl_unittests_android.cc @@ -44,7 +44,7 @@ TEST_F(GLSurfaceTextureTest, SimpleTest) { EXPECT_TRUE(window != NULL); scoped_refptr<gfx::GLSurface> gl_surface = - gfx::GLSurface::CreateViewGLSurface(false, window); + gfx::GLSurface::CreateViewGLSurface(window); EXPECT_TRUE(gl_surface.get() != NULL); gl_.SetSurface(gl_surface.get()); diff --git a/gpu/config/gpu_info_collector.cc b/gpu/config/gpu_info_collector.cc index f66833c..d15cc47 100644 --- a/gpu/config/gpu_info_collector.cc +++ b/gpu/config/gpu_info_collector.cc @@ -22,7 +22,7 @@ namespace { scoped_refptr<gfx::GLSurface> InitializeGLSurface() { scoped_refptr<gfx::GLSurface> surface( - gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1))); + gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1))); if (!surface.get()) { LOG(ERROR) << "gfx::GLContext::CreateOffscreenGLSurface failed"; return NULL; diff --git a/gpu/demos/framework/window.cc b/gpu/demos/framework/window.cc index 6606c19..b2fb5f8 100644 --- a/gpu/demos/framework/window.cc +++ b/gpu/demos/framework/window.cc @@ -92,7 +92,7 @@ bool Window::CreateRenderContext(gfx::AcceleratedWidget hwnd) { decoder_->set_engine(gpu_scheduler_.get()); - surface_ = gfx::GLSurface::CreateViewGLSurface(false, hwnd); + surface_ = gfx::GLSurface::CreateViewGLSurface(hwnd); if (!surface_.get()) return false; diff --git a/gpu/gles2_conform_support/egl/display.cc b/gpu/gles2_conform_support/egl/display.cc index 9df88e5..5288a9b 100644 --- a/gpu/gles2_conform_support/egl/display.cc +++ b/gpu/gles2_conform_support/egl/display.cc @@ -126,12 +126,12 @@ EGLSurface Display::CreateWindowSurface(EGLConfig config, decoder_->set_engine(gpu_scheduler_.get()); gfx::Size size(create_offscreen_width_, create_offscreen_height_); if (create_offscreen_) { - gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, size); + gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(size); create_offscreen_ = false; create_offscreen_width_ = 0; create_offscreen_height_ = 0; } else { - gl_surface_ = gfx::GLSurface::CreateViewGLSurface(false, win); + gl_surface_ = gfx::GLSurface::CreateViewGLSurface(win); } if (!gl_surface_.get()) return EGL_NO_SURFACE; diff --git a/media/tools/shader_bench/shader_bench.cc b/media/tools/shader_bench/shader_bench.cc index d033357..270bef3 100644 --- a/media/tools/shader_bench/shader_bench.cc +++ b/media/tools/shader_bench/shader_bench.cc @@ -130,7 +130,7 @@ int main(int argc, char** argv) { gfx::GLSurface::InitializeOneOff(); scoped_ptr<media::Window> window(new media::Window(width, height)); gfx::GLSurface* surface = - gfx::GLSurface::CreateViewGLSurface(false, window->PluginWindow()).get(); + gfx::GLSurface::CreateViewGLSurface(window->PluginWindow()).get(); gfx::GLContext* context = gfx::GLContext::CreateGLContext( NULL, surface, gfx::PreferDiscreteGpu).get(); context->MakeCurrent(surface); diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h index a8825a5..8eaf60d 100644 --- a/ui/gl/gl_surface.h +++ b/ui/gl/gl_surface.h @@ -99,12 +99,10 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { // Create a GL surface that renders directly to a view. static scoped_refptr<GLSurface> CreateViewGLSurface( - bool software, gfx::AcceleratedWidget window); // Create a GL surface used for offscreen rendering. static scoped_refptr<GLSurface> CreateOffscreenGLSurface( - bool software, const gfx::Size& size); static GLSurface* GetCurrent(); diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc index 84efbc6..b99b7b4 100644 --- a/ui/gl/gl_surface_egl.cc +++ b/ui/gl/gl_surface_egl.cc @@ -37,9 +37,6 @@ namespace { EGLConfig g_config; EGLDisplay g_display; EGLNativeDisplayType g_native_display; -EGLConfig g_software_config; -EGLDisplay g_software_display; -EGLNativeDisplayType g_software_native_display; const char* g_egl_extensions = NULL; bool g_egl_create_context_robustness_supported = false; @@ -83,7 +80,7 @@ class EGLSyncControlVSyncProvider } // namespace -GLSurfaceEGL::GLSurfaceEGL() : software_(false) {} +GLSurfaceEGL::GLSurfaceEGL() {} bool GLSurfaceEGL::InitializeOneOff() { static bool initialized = false; @@ -157,59 +154,17 @@ bool GLSurfaceEGL::InitializeOneOff() { initialized = true; -#if defined(USE_X11) || defined(OS_ANDROID) \ - || defined(USE_OZONE) - return true; -#else - g_software_native_display = EGL_SOFTWARE_DISPLAY_ANGLE; -#endif - g_software_display = eglGetDisplay(g_software_native_display); - if (!g_software_display) { - return true; - } - - if (!eglInitialize(g_software_display, NULL, NULL)) { - return true; - } - - if (!eglChooseConfig(g_software_display, - kConfigAttribs, - NULL, - 0, - &num_configs)) { - g_software_display = NULL; - return true; - } - - if (num_configs == 0) { - g_software_display = NULL; - return true; - } - - if (!eglChooseConfig(g_software_display, - kConfigAttribs, - &g_software_config, - 1, - &num_configs)) { - g_software_display = NULL; - return false; - } - return true; } EGLDisplay GLSurfaceEGL::GetDisplay() { - return software_ ? g_software_display : g_display; + return g_display; } EGLDisplay GLSurfaceEGL::GetHardwareDisplay() { return g_display; } -EGLDisplay GLSurfaceEGL::GetSoftwareDisplay() { - return g_software_display; -} - EGLNativeDisplayType GLSurfaceEGL::GetNativeDisplay() { return g_native_display; } @@ -228,13 +183,11 @@ bool GLSurfaceEGL::IsCreateContextRobustnessSupported() { GLSurfaceEGL::~GLSurfaceEGL() {} -NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(bool software, - gfx::AcceleratedWidget window) +NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(gfx::AcceleratedWidget window) : window_(window), surface_(NULL), supports_post_sub_buffer_(false), config_(NULL) { - software_ = software; #if defined(OS_ANDROID) if (window) ANativeWindow_acquire(window); @@ -305,7 +258,7 @@ void NativeViewGLSurfaceEGL::Destroy() { EGLConfig NativeViewGLSurfaceEGL::GetConfig() { #if !defined(USE_X11) - return software_ ? g_software_config : g_config; + return g_config; #else if (!config_) { // Get a config compatible with the window @@ -480,10 +433,9 @@ void NativeViewGLSurfaceEGL::SetHandle(EGLSurface surface) { surface_ = surface; } -PbufferGLSurfaceEGL::PbufferGLSurfaceEGL(bool software, const gfx::Size& size) +PbufferGLSurfaceEGL::PbufferGLSurfaceEGL(const gfx::Size& size) : size_(size), surface_(NULL) { - software_ = software; } bool PbufferGLSurfaceEGL::Initialize() { @@ -538,7 +490,7 @@ void PbufferGLSurfaceEGL::Destroy() { } EGLConfig PbufferGLSurfaceEGL::GetConfig() { - return software_ ? g_software_config : g_config; + return g_config; } bool PbufferGLSurfaceEGL::IsOffscreen() { @@ -623,10 +575,7 @@ bool GLSurface::InitializeOneOffInternal() { // static scoped_refptr<GLSurface> -GLSurface::CreateViewGLSurface(bool software, gfx::AcceleratedWidget window) { - if (software) - return NULL; - +GLSurface::CreateViewGLSurface(gfx::AcceleratedWidget window) { DCHECK(GetGLImplementation() == kGLImplementationEGLGLES2); if (window) { scoped_refptr<NativeViewGLSurfaceEGL> surface; @@ -637,7 +586,7 @@ GLSurface::CreateViewGLSurface(bool software, gfx::AcceleratedWidget window) { sync_provider = ui::SurfaceFactoryOzone::GetInstance()->GetVSyncProvider(window); #endif - surface = new NativeViewGLSurfaceEGL(false, window); + surface = new NativeViewGLSurfaceEGL(window); if(surface->Initialize(sync_provider)) return surface; } else { @@ -650,14 +599,11 @@ GLSurface::CreateViewGLSurface(bool software, gfx::AcceleratedWidget window) { // static scoped_refptr<GLSurface> -GLSurface::CreateOffscreenGLSurface(bool software, const gfx::Size& size) { - if (software) - return NULL; - +GLSurface::CreateOffscreenGLSurface(const gfx::Size& size) { switch (GetGLImplementation()) { case kGLImplementationEGLGLES2: { scoped_refptr<PbufferGLSurfaceEGL> surface( - new PbufferGLSurfaceEGL(false, size)); + new PbufferGLSurfaceEGL(size)); if (!surface->Initialize()) return NULL; return surface; diff --git a/ui/gl/gl_surface_egl.h b/ui/gl/gl_surface_egl.h index 04db3a9..e6a13cb 100644 --- a/ui/gl/gl_surface_egl.h +++ b/ui/gl/gl_surface_egl.h @@ -31,7 +31,6 @@ class GL_EXPORT GLSurfaceEGL : public GLSurface { static bool InitializeOneOff(); static EGLDisplay GetHardwareDisplay(); - static EGLDisplay GetSoftwareDisplay(); static EGLNativeDisplayType GetNativeDisplay(); // These aren't particularly tied to surfaces, but since we already @@ -44,8 +43,6 @@ class GL_EXPORT GLSurfaceEGL : public GLSurface { protected: virtual ~GLSurfaceEGL(); - bool software_; - private: DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); }; @@ -53,7 +50,7 @@ class GL_EXPORT GLSurfaceEGL : public GLSurface { // Encapsulates an EGL surface bound to a view. class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { public: - NativeViewGLSurfaceEGL(bool software, gfx::AcceleratedWidget window); + explicit NativeViewGLSurfaceEGL(gfx::AcceleratedWidget window); // Implement GLSurface. virtual EGLConfig GetConfig() OVERRIDE; @@ -90,7 +87,7 @@ class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { // Encapsulates a pbuffer EGL surface. class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL { public: - PbufferGLSurfaceEGL(bool software, const gfx::Size& size); + explicit PbufferGLSurfaceEGL(const gfx::Size& size); // Implement GLSurface. virtual EGLConfig GetConfig() OVERRIDE; diff --git a/ui/gl/gl_surface_mac.cc b/ui/gl/gl_surface_mac.cc index 099ff9e..7cd5461 100644 --- a/ui/gl/gl_surface_mac.cc +++ b/ui/gl/gl_surface_mac.cc @@ -36,13 +36,9 @@ bool GLSurface::InitializeOneOffInternal() { } scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( - bool software, gfx::AcceleratedWidget window) { TRACE_EVENT0("gpu", "GLSurface::CreateViewGLSurface"); #if defined(USE_AURA) - if (software) - return NULL; - switch (GetGLImplementation()) { case kGLImplementationDesktopGL: case kGLImplementationAppleGL: { @@ -59,17 +55,13 @@ scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( return NULL; } #else - return CreateOffscreenGLSurface(software, gfx::Size(1,1)); + return CreateOffscreenGLSurface(gfx::Size(1, 1)); #endif } scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( - bool software, const gfx::Size& size) { TRACE_EVENT0("gpu", "GLSurface::CreateOffscreenGLSurface"); - if (software) - return NULL; - switch (GetGLImplementation()) { case kGLImplementationOSMesaGL: { scoped_refptr<GLSurface> surface(new GLSurfaceOSMesa(OSMESA_RGBA, diff --git a/ui/gl/gl_surface_win.cc b/ui/gl/gl_surface_win.cc index 02120ce..766e123 100644 --- a/ui/gl/gl_surface_win.cc +++ b/ui/gl/gl_surface_win.cc @@ -173,7 +173,6 @@ bool NativeViewGLSurfaceOSMesa::PostSubBuffer( } scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( - bool software, gfx::AcceleratedWidget window) { TRACE_EVENT0("gpu", "GLSurface::CreateViewGLSurface"); switch (GetGLImplementation()) { @@ -186,16 +185,13 @@ scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( return surface; } case kGLImplementationEGLGLES2: { - scoped_refptr<GLSurface> surface(new NativeViewGLSurfaceEGL(software, - window)); + scoped_refptr<GLSurface> surface(new NativeViewGLSurfaceEGL(window)); if (!surface->Initialize()) return NULL; return surface; } case kGLImplementationDesktopGL: { - if (software) - return NULL; scoped_refptr<GLSurface> surface(new NativeViewGLSurfaceWGL( window)); if (!surface->Initialize()) @@ -212,7 +208,6 @@ scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( } scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( - bool software, const gfx::Size& size) { TRACE_EVENT0("gpu", "GLSurface::CreateOffscreenGLSurface"); switch (GetGLImplementation()) { @@ -225,15 +220,13 @@ scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( return surface; } case kGLImplementationEGLGLES2: { - scoped_refptr<GLSurface> surface(new PbufferGLSurfaceEGL(software, size)); + scoped_refptr<GLSurface> surface(new PbufferGLSurfaceEGL(size)); if (!surface->Initialize()) return NULL; return surface; } case kGLImplementationDesktopGL: { - if (software) - return NULL; scoped_refptr<GLSurface> surface(new PbufferGLSurfaceWGL(size)); if (!surface->Initialize()) return NULL; diff --git a/ui/gl/gl_surface_x11.cc b/ui/gl/gl_surface_x11.cc index 58112d3..1153b65 100644 --- a/ui/gl/gl_surface_x11.cc +++ b/ui/gl/gl_surface_x11.cc @@ -266,12 +266,8 @@ NativeViewGLSurfaceOSMesa::~NativeViewGLSurfaceOSMesa() { } scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( - bool software, gfx::AcceleratedWidget window) { TRACE_EVENT0("gpu", "GLSurface::CreateViewGLSurface"); - if (software) - return NULL; - switch (GetGLImplementation()) { case kGLImplementationOSMesaGL: { scoped_refptr<GLSurface> surface( @@ -282,16 +278,14 @@ scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( return surface; } case kGLImplementationDesktopGL: { - scoped_refptr<GLSurface> surface(new NativeViewGLSurfaceGLX( - window)); + scoped_refptr<GLSurface> surface(new NativeViewGLSurfaceGLX(window)); if (!surface->Initialize()) return NULL; return surface; } case kGLImplementationEGLGLES2: { - scoped_refptr<GLSurface> surface(new NativeViewGLSurfaceEGL( - false, window)); + scoped_refptr<GLSurface> surface(new NativeViewGLSurfaceEGL(window)); if (!surface->Initialize()) return NULL; @@ -306,12 +300,8 @@ scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( } scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( - bool software, const gfx::Size& size) { TRACE_EVENT0("gpu", "GLSurface::CreateOffscreenGLSurface"); - if (software) - return NULL; - switch (GetGLImplementation()) { case kGLImplementationOSMesaGL: { scoped_refptr<GLSurface> surface(new GLSurfaceOSMesa(OSMESA_RGBA, @@ -329,7 +319,7 @@ scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( return surface; } case kGLImplementationEGLGLES2: { - scoped_refptr<GLSurface> surface(new PbufferGLSurfaceEGL(false, size)); + scoped_refptr<GLSurface> surface(new PbufferGLSurfaceEGL(size)); if (!surface->Initialize()) return NULL; diff --git a/ui/surface/accelerated_surface_mac.cc b/ui/surface/accelerated_surface_mac.cc index 01b76d3..239836a 100644 --- a/ui/surface/accelerated_surface_mac.cc +++ b/ui/surface/accelerated_surface_mac.cc @@ -39,8 +39,7 @@ bool AcceleratedSurface::Initialize( gfx::GetGLImplementation() != gfx::kGLImplementationAppleGL) return false; - gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface( - false, gfx::Size(1, 1)); + gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)); if (!gl_surface_.get()) { Destroy(); return false; diff --git a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc index 8488020..35b1f13 100644 --- a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc +++ b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc @@ -600,9 +600,9 @@ bool GLInProcessContext::Initialize( decoder_->set_engine(gpu_scheduler_.get()); if (is_offscreen) - surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, size); + surface_ = gfx::GLSurface::CreateOffscreenGLSurface(size); else - surface_ = gfx::GLSurface::CreateViewGLSurface(false, window); + surface_ = gfx::GLSurface::CreateViewGLSurface(window); if (!surface_.get()) { LOG(ERROR) << "Could not create GLSurface."; |