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

Unified Diff: ui/gl/gl_surface.cc

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header Created 5 years, 4 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.h ('k') | ui/gl/gl_surface_egl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface.cc
diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc
index 007bcafc4802f8a47e06da98d7cb2e74aca04a42..e5ac99d7d828920e9cb52c93be193dffda02a043 100644
--- a/ui/gl/gl_surface.cc
+++ b/ui/gl/gl_surface.cc
@@ -197,13 +197,13 @@ unsigned int GLSurface::GetBackingFrameBufferObject() {
bool GLSurface::SwapBuffersAsync(const SwapCompletionCallback& callback) {
DCHECK(!IsSurfaceless());
- bool success = SwapBuffers();
- callback.Run();
- return success;
+ gfx::SwapResult result = SwapBuffers();
+ callback.Run(result);
+ return result == gfx::SwapResult::SWAP_ACK;
}
-bool GLSurface::PostSubBuffer(int x, int y, int width, int height) {
- return false;
+gfx::SwapResult GLSurface::PostSubBuffer(int x, int y, int width, int height) {
+ return gfx::SwapResult::SWAP_FAILED;
}
bool GLSurface::PostSubBufferAsync(int x,
@@ -211,9 +211,9 @@ bool GLSurface::PostSubBufferAsync(int x,
int width,
int height,
const SwapCompletionCallback& callback) {
- bool success = PostSubBuffer(x, y, width, height);
- callback.Run();
- return success;
+ gfx::SwapResult result = PostSubBuffer(x, y, width, height);
+ callback.Run(result);
+ return result == gfx::SwapResult::SWAP_ACK;
}
bool GLSurface::OnMakeCurrent(GLContext* context) {
@@ -324,7 +324,7 @@ bool GLSurfaceAdapter::IsOffscreen() {
return surface_->IsOffscreen();
}
-bool GLSurfaceAdapter::SwapBuffers() {
+gfx::SwapResult GLSurfaceAdapter::SwapBuffers() {
return surface_->SwapBuffers();
}
@@ -333,7 +333,8 @@ bool GLSurfaceAdapter::SwapBuffersAsync(
return surface_->SwapBuffersAsync(callback);
}
-bool GLSurfaceAdapter::PostSubBuffer(int x, int y, int width, int height) {
+gfx::SwapResult GLSurfaceAdapter::PostSubBuffer(
+ int x, int y, int width, int height) {
return surface_->PostSubBuffer(x, y, width, height);
}
« no previous file with comments | « ui/gl/gl_surface.h ('k') | ui/gl/gl_surface_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698