summaryrefslogtreecommitdiffstats
path: root/ui/gfx/surface
diff options
context:
space:
mode:
authorjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-21 14:45:24 +0000
committerjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-21 14:45:24 +0000
commit3a16cbc704db7e80d5184b932ad9d3b0b13f7dc7 (patch)
tree56537abb44f3a2c9ba2921e27ab4995bb68830dd /ui/gfx/surface
parentf5d978cfcc87e29ac3284d9c518770d24c529699 (diff)
downloadchromium_src-3a16cbc704db7e80d5184b932ad9d3b0b13f7dc7.zip
chromium_src-3a16cbc704db7e80d5184b932ad9d3b0b13f7dc7.tar.gz
chromium_src-3a16cbc704db7e80d5184b932ad9d3b0b13f7dc7.tar.bz2
Allow creating a gpu channel that uses software rendering
Where supported (on ANGLE with EGL_ANGLE_software_display), allow for the creation of gpu channels that use software rendering instead of hardware rendering. BUG= TEST=trybots, other later tests Review URL: http://codereview.chromium.org/7383004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93393 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/surface')
-rw-r--r--ui/gfx/surface/accelerated_surface_linux.cc4
-rw-r--r--ui/gfx/surface/accelerated_surface_mac.cc3
2 files changed, 4 insertions, 3 deletions
diff --git a/ui/gfx/surface/accelerated_surface_linux.cc b/ui/gfx/surface/accelerated_surface_linux.cc
index 9a42c68..a74ac5c 100644
--- a/ui/gfx/surface/accelerated_surface_linux.cc
+++ b/ui/gfx/surface/accelerated_surface_linux.cc
@@ -14,7 +14,7 @@
AcceleratedSurface::AcceleratedSurface(const gfx::Size& size)
: size_(size) {
Display* dpy = gfx::GLSurfaceEGL::GetNativeDisplay();
- EGLDisplay edpy = gfx::GLSurfaceEGL::GetDisplay();
+ EGLDisplay edpy = gfx::GLSurfaceEGL::GetHardwareDisplay();
XID window = XDefaultRootWindow(dpy);
XWindowAttributes gwa;
@@ -42,6 +42,6 @@ AcceleratedSurface::AcceleratedSurface(const gfx::Size& size)
AcceleratedSurface::~AcceleratedSurface() {
glDeleteTextures(1, &texture_);
- eglDestroyImageKHR(gfx::GLSurfaceEGL::GetDisplay(), image_);
+ eglDestroyImageKHR(gfx::GLSurfaceEGL::GetHardwareDisplay(), image_);
XFreePixmap(gfx::GLSurfaceEGL::GetNativeDisplay(), pixmap_);
}
diff --git a/ui/gfx/surface/accelerated_surface_mac.cc b/ui/gfx/surface/accelerated_surface_mac.cc
index e3e74cb..cbbee4b 100644
--- a/ui/gfx/surface/accelerated_surface_mac.cc
+++ b/ui/gfx/surface/accelerated_surface_mac.cc
@@ -36,7 +36,8 @@ bool AcceleratedSurface::Initialize(gfx::GLContext* share_context,
if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL)
return false;
- gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1));
+ gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(
+ false, gfx::Size(1, 1));
if (!gl_surface_.get()) {
Destroy();
return false;