Commit bb4d10cd authored by Maksim Sisov's avatar Maksim Sisov Committed by Commit Bot

[ozone/wayland] gardening: move method definition below.

This change does not bring any functionality changes.

TBR=rjkroege@chromium.org

Bug: 578890
Change-Id: Ibbd06a33c41b63274c99473f79bb21eafdf6fa67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1503592
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Reviewed-by: default avatarMaksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#637671}
parent 2806da1a
......@@ -36,23 +36,7 @@ class GLOzoneEGLWayland : public GLOzoneEGL {
gfx::AcceleratedWidget widget) override;
scoped_refptr<gl::GLSurface> CreateSurfacelessViewGLSurface(
gfx::AcceleratedWidget window) override {
// Only EGLGLES2 is supported with surfaceless view gl.
if (gl::GetGLImplementation() != gl::kGLImplementationEGLGLES2)
return nullptr;
#if defined(WAYLAND_GBM)
// If there is a gbm device available, use surfaceless gl surface.
if (!connection_->gbm_device())
return nullptr;
return gl::InitializeGLSurface(new GbmSurfacelessWayland(
static_cast<WaylandSurfaceFactory*>(
OzonePlatform::GetInstance()->GetSurfaceFactoryOzone()),
window));
#else
return nullptr;
#endif
}
gfx::AcceleratedWidget window) override;
scoped_refptr<gl::GLSurface> CreateOffscreenGLSurface(
const gfx::Size& size) override;
......@@ -86,6 +70,25 @@ scoped_refptr<gl::GLSurface> GLOzoneEGLWayland::CreateViewGLSurface(
return gl::InitializeGLSurface(new GLSurfaceWayland(std::move(egl_window)));
}
scoped_refptr<gl::GLSurface> GLOzoneEGLWayland::CreateSurfacelessViewGLSurface(
gfx::AcceleratedWidget window) {
// Only EGLGLES2 is supported with surfaceless view gl.
if (gl::GetGLImplementation() != gl::kGLImplementationEGLGLES2)
return nullptr;
#if defined(WAYLAND_GBM)
// If there is a gbm device available, use surfaceless gl surface.
if (!connection_->gbm_device())
return nullptr;
return gl::InitializeGLSurface(new GbmSurfacelessWayland(
static_cast<WaylandSurfaceFactory*>(
OzonePlatform::GetInstance()->GetSurfaceFactoryOzone()),
window));
#else
return nullptr;
#endif
}
scoped_refptr<gl::GLSurface> GLOzoneEGLWayland::CreateOffscreenGLSurface(
const gfx::Size& size) {
if (gl::GLSurfaceEGL::IsEGLSurfacelessContextSupported() &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment