Commit 292dd3e4 authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

[Fuchsia] Update ImageTransportSurface to use gl::init::CreateViewGLSurface()

Previously ImageTransportSurface was creating GLSurfaceOSMesa, but
that this is wrong because GLSurfaceOSMesa doesn't support
SwapBuffers(). Updated ImageTransportSurface to call
CreateViewGLSurface(), which in turn creates GLSurfaceOSMesaHeadless.
That class handles SwapBuffers() correctly.

Bug: 778467
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I701dd219ad5867359ade613fbb1ea24d722f55f3
Reviewed-on: https://chromium-review.googlesource.com/876993Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530693}
parent 49e494a8
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
#include "base/logging.h" #include "base/logging.h"
#include "ui/gl/gl_surface.h" #include "ui/gl/gl_surface.h"
#include "ui/gl/gl_surface_osmesa.h"
#include "ui/gl/gl_surface_stub.h" #include "ui/gl/gl_surface_stub.h"
#include "ui/gl/init/gl_factory.h"
namespace gpu { namespace gpu {
...@@ -16,14 +16,12 @@ scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface( ...@@ -16,14 +16,12 @@ scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface(
base::WeakPtr<ImageTransportSurfaceDelegate> delegate, base::WeakPtr<ImageTransportSurfaceDelegate> delegate,
SurfaceHandle surface_handle, SurfaceHandle surface_handle,
gl::GLSurfaceFormat format) { gl::GLSurfaceFormat format) {
if (gl::GetGLImplementation() == gl::kGLImplementationOSMesaGL) { if (gl::GetGLImplementation() == gl::kGLImplementationMockGL ||
return gl::InitializeGLSurfaceWithFormat( gl::GetGLImplementation() == gl::kGLImplementationStubGL) {
new gl::GLSurfaceOSMesa(format, gfx::Size(1, 1)), format); return new gl::GLSurfaceStub;
} }
DCHECK(gl::GetGLImplementation() == gl::kGLImplementationMockGL || return gl::init::CreateViewGLSurface(surface_handle);
gl::GetGLImplementation() == gl::kGLImplementationStubGL);
return new gl::GLSurfaceStub;
} }
} // namespace gpu } // namespace gpu
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