ozone: fix crash when running video decode unittests.

In GLSurfaceOzoneSurfacelessSurfaceImpl::Destroy, if the previous
context was NULL, do not make it current.

BUG=chromium:602921
TEST=Run vda unittests on oak.

Review URL: https://codereview.chromium.org/1887563002

Cr-Commit-Position: refs/heads/master@{#386988}
scoped_refptr<GLSurface> GLSurface::CreateSurfacelessViewGLSurface(
    gfx::AcceleratedWidget window) {
  if (GetGLImplementation() == kGLImplementationEGLGLES2 &&
      window != kNullAcceleratedWidget &&
      GLSurfaceEGL::IsEGLSurfacelessContextSupported()) {
    std::unique_ptr<ui::SurfaceOzoneEGL> surface_ozone =
        ui::OzonePlatform::GetInstance()
            ->GetSurfaceFactoryOzone()
            ->CreateSurfacelessEGLSurfaceForWidget(window);
    if (!surface_ozone)
      return nullptr;
    scoped_refptr<GLSurface> surface;
    surface = new GLSurfaceOzoneSurfaceless(std::move(surface_ozone), window);
    if (surface->Initialize())
      return surface;
  }

  return nullptr;
}

scoped_refptr<GLSurface> GLSurface::CreateSurfacelessViewGLSurface(
    gfx::AcceleratedWidget window) {
  if (GetGLImplementation() == kGLImplementationEGLGLES2 &&
      window != kNullAcceleratedWidget &&
      GLSurfaceEGL::IsEGLSurfacelessContextSupported()) {
    std::unique_ptr<ui::SurfaceOzoneEGL> surface_ozone =
        ui::OzonePlatform::GetInstance()
            ->GetSurfaceFactoryOzone()
            ->CreateSurfacelessEGLSurfaceForWidget(window);
    if (!surface_ozone)
      return nullptr;
    scoped_refptr<GLSurface> surface;
    surface = new GLSurfaceOzoneSurfaceless(std::move(surface_ozone), window);
    if (surface->Initialize())
      return surface;
  }

  return nullptr;
}
