Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 1084173004: Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ozone demo Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | ui/gl/gl_surface_glx.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | ui/gl/gl_surface_glx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698