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

Unified Diff: ui/gl/gl_surface_wgl.cc

Issue 1084173004: Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change swapbuffers return 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
Index: ui/gl/gl_surface_wgl.cc
diff --git a/ui/gl/gl_surface_wgl.cc b/ui/gl/gl_surface_wgl.cc
index 698539fe7ff1ae7936debf3478f2d4e6bc17d12f..32bf2a4ceb03afd5f32e36e9c8ca4139eb039b2d 100644
--- a/ui/gl/gl_surface_wgl.cc
+++ b/ui/gl/gl_surface_wgl.cc
@@ -250,7 +250,7 @@ bool NativeViewGLSurfaceWGL::IsOffscreen() {
return false;
}
-bool NativeViewGLSurfaceWGL::SwapBuffers() {
+gfx::SwapResult NativeViewGLSurfaceWGL::SwapBuffers() {
TRACE_EVENT2("gpu", "NativeViewGLSurfaceWGL:RealSwapBuffers",
"width", GetSize().width(),
"height", GetSize().height());
@@ -259,18 +259,19 @@ bool NativeViewGLSurfaceWGL::SwapBuffers() {
// it as it moves.
RECT rect;
if (!GetClientRect(window_, &rect))
- return false;
+ return gfx::SWAP_FAILED;
if (!MoveWindow(child_window_,
0,
0,
rect.right - rect.left,
rect.bottom - rect.top,
FALSE)) {
- return false;
+ return gfx::SWAP_FAILED;
}
DCHECK(device_context_);
- return ::SwapBuffers(device_context_) == TRUE;
+ return ::SwapBuffers(device_context_) == TRUE ? gfx::SWAP_ACK
+ : gfx::SWAP_FAILED;
}
gfx::Size NativeViewGLSurfaceWGL::GetSize() {
@@ -345,9 +346,9 @@ bool PbufferGLSurfaceWGL::IsOffscreen() {
return true;
}
-bool PbufferGLSurfaceWGL::SwapBuffers() {
+gfx::SwapResult PbufferGLSurfaceWGL::SwapBuffers() {
NOTREACHED() << "Attempted to call SwapBuffers on a pbuffer.";
- return false;
+ return gfx::SWAP_FAILED;
}
gfx::Size PbufferGLSurfaceWGL::GetSize() {
« no previous file with comments | « ui/gl/gl_surface_wgl.h ('k') | ui/gl/gl_surface_win.cc » ('j') | ui/gl/gl_surface_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698