Index: ui/gl/gl_surface_egl.cc |
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc |
index b6cf38f88b348d0709298d92cfbfe4bc2efe2a37..4d64da7880a2a7d31fddadc8fd1c457dabbe06bc 100644 |
--- a/ui/gl/gl_surface_egl.cc |
+++ b/ui/gl/gl_surface_egl.cc |
@@ -661,7 +661,7 @@ bool NativeViewGLSurfaceEGL::IsOffscreen() { |
return false; |
} |
-bool NativeViewGLSurfaceEGL::SwapBuffers() { |
+gfx::SwapResult NativeViewGLSurfaceEGL::SwapBuffers() { |
TRACE_EVENT2("gpu", "NativeViewGLSurfaceEGL:RealSwapBuffers", |
"width", GetSize().width(), |
"height", GetSize().height()); |
@@ -704,10 +704,10 @@ bool NativeViewGLSurfaceEGL::SwapBuffers() { |
if (!eglSwapBuffers(GetDisplay(), surface_)) { |
DVLOG(1) << "eglSwapBuffers failed with error " |
<< GetLastEGLErrorString(); |
- return false; |
+ return gfx::SwapResult::SWAP_FAILED; |
} |
- return true; |
+ return gfx::SwapResult::SWAP_ACK; |
} |
gfx::Size NativeViewGLSurfaceEGL::GetSize() { |
@@ -766,15 +766,17 @@ bool NativeViewGLSurfaceEGL::SupportsPostSubBuffer() { |
return supports_post_sub_buffer_; |
} |
-bool NativeViewGLSurfaceEGL::PostSubBuffer( |
- int x, int y, int width, int height) { |
+gfx::SwapResult NativeViewGLSurfaceEGL::PostSubBuffer(int x, |
+ int y, |
+ int width, |
+ int height) { |
DCHECK(supports_post_sub_buffer_); |
if (!eglPostSubBufferNV(GetDisplay(), surface_, x, y, width, height)) { |
DVLOG(1) << "eglPostSubBufferNV failed with error " |
<< GetLastEGLErrorString(); |
- return false; |
+ return gfx::SwapResult::SWAP_FAILED; |
} |
- return true; |
+ return gfx::SwapResult::SWAP_ACK; |
} |
VSyncProvider* NativeViewGLSurfaceEGL::GetVSyncProvider() { |
@@ -855,9 +857,9 @@ bool PbufferGLSurfaceEGL::IsOffscreen() { |
return true; |
} |
-bool PbufferGLSurfaceEGL::SwapBuffers() { |
+gfx::SwapResult PbufferGLSurfaceEGL::SwapBuffers() { |
NOTREACHED() << "Attempted to call SwapBuffers on a PbufferGLSurfaceEGL."; |
- return false; |
+ return gfx::SwapResult::SWAP_FAILED; |
} |
gfx::Size PbufferGLSurfaceEGL::GetSize() { |
@@ -941,9 +943,9 @@ bool SurfacelessEGL::IsSurfaceless() const { |
return true; |
} |
-bool SurfacelessEGL::SwapBuffers() { |
+gfx::SwapResult SurfacelessEGL::SwapBuffers() { |
LOG(ERROR) << "Attempted to call SwapBuffers with SurfacelessEGL."; |
- return false; |
+ return gfx::SwapResult::SWAP_FAILED; |
} |
gfx::Size SurfacelessEGL::GetSize() { |