Adding status to swap buffers completion

This will give us more options than completing all swaps successfully, or losing context

BUG=476966
TBR=torne - approved interface change

Committed: https://crrev.com/c794eda78e9ba3c46b550b433e9fe5a248d40104
Cr-Commit-Position: refs/heads/master@{#331906}

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

Cr-Commit-Position: refs/heads/master@{#331989}
diff --git a/ui/gl/gl_surface_osmesa.cc b/ui/gl/gl_surface_osmesa.cc
index 7f1b1ad..00acc95 100644
--- a/ui/gl/gl_surface_osmesa.cc
+++ b/ui/gl/gl_surface_osmesa.cc
@@ -84,9 +84,9 @@
   return true;
 }
 
-bool GLSurfaceOSMesa::SwapBuffers() {
+gfx::SwapResult GLSurfaceOSMesa::SwapBuffers() {
   NOTREACHED() << "Should not call SwapBuffers on an GLSurfaceOSMesa.";
-  return false;
+  return gfx::SwapResult::SWAP_FAILED;
 }
 
 gfx::Size GLSurfaceOSMesa::GetSize() {
@@ -107,7 +107,9 @@
 
 bool GLSurfaceOSMesaHeadless::IsOffscreen() { return false; }
 
-bool GLSurfaceOSMesaHeadless::SwapBuffers() { return true; }
+gfx::SwapResult GLSurfaceOSMesaHeadless::SwapBuffers() {
+  return gfx::SwapResult::SWAP_ACK;
+}
 
 GLSurfaceOSMesaHeadless::GLSurfaceOSMesaHeadless()
     : GLSurfaceOSMesa(OSMesaSurfaceFormatBGRA, gfx::Size(1, 1)) {