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

Unified Diff: ui/gl/gl_surface.cc

Issue 1166463004: Revert of Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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.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 8a60ca5477d5e7722cc7c5be5c87b040382b19ad..47690924fa7d4f06da4cc1f033f23823126b8ddb 100644
--- a/ui/gl/gl_surface.cc
+++ b/ui/gl/gl_surface.cc
@@ -12,7 +12,6 @@
#include "base/logging.h"
#include "base/threading/thread_local.h"
#include "base/trace_event/trace_event.h"
-#include "ui/gfx/swap_result.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_switches.h"
@@ -195,13 +194,13 @@
bool GLSurface::SwapBuffersAsync(const SwapCompletionCallback& callback) {
DCHECK(!IsSurfaceless());
- gfx::SwapResult result = SwapBuffers();
- callback.Run(result);
- return result == gfx::SwapResult::SWAP_ACK;
-}
-
-gfx::SwapResult GLSurface::PostSubBuffer(int x, int y, int width, int height) {
- return gfx::SwapResult::SWAP_FAILED;
+ bool success = SwapBuffers();
+ callback.Run();
+ return success;
+}
+
+bool GLSurface::PostSubBuffer(int x, int y, int width, int height) {
+ return false;
}
bool GLSurface::PostSubBufferAsync(int x,
@@ -209,9 +208,9 @@
int width,
int height,
const SwapCompletionCallback& callback) {
- gfx::SwapResult result = PostSubBuffer(x, y, width, height);
- callback.Run(result);
- return result == gfx::SwapResult::SWAP_ACK;
+ bool success = PostSubBuffer(x, y, width, height);
+ callback.Run();
+ return success;
}
bool GLSurface::OnMakeCurrent(GLContext* context) {
@@ -320,7 +319,7 @@
return surface_->IsOffscreen();
}
-gfx::SwapResult GLSurfaceAdapter::SwapBuffers() {
+bool GLSurfaceAdapter::SwapBuffers() {
return surface_->SwapBuffers();
}
@@ -329,10 +328,7 @@
return surface_->SwapBuffersAsync(callback);
}
-gfx::SwapResult GLSurfaceAdapter::PostSubBuffer(int x,
- int y,
- int width,
- int height) {
+bool 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