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

Unified Diff: ui/gl/gl_surface.h

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/gfx/swap_result.h ('k') | ui/gl/gl_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface.h
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h
index b67ca69a63968758dd4e77024924d63015311856..9fee0a37c2cc6d09b9ab6bd3253ea106c17c832a 100644
--- a/ui/gl/gl_surface.h
+++ b/ui/gl/gl_surface.h
@@ -15,6 +15,7 @@
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/overlay_transform.h"
+#include "ui/gfx/swap_result.h"
#include "ui/gl/gl_export.h"
#include "ui/gl/gl_implementation.h"
@@ -58,7 +59,7 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
// Swaps front and back buffers. This has no effect for off-screen
// contexts.
- virtual bool SwapBuffers() = 0;
+ virtual gfx::SwapResult SwapBuffers() = 0;
// Get the size of the surface.
virtual gfx::Size GetSize() = 0;
@@ -73,7 +74,7 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
// FBO. Otherwise returns 0.
virtual unsigned int GetBackingFrameBufferObject();
- typedef base::Callback<void()> SwapCompletionCallback;
+ typedef base::Callback<void(SwapResult)> SwapCompletionCallback;
// Swaps front and back buffers. This has no effect for off-screen
// contexts. On some platforms, we want to send SwapBufferAck only after the
// surface is displayed on screen. The callback can be used to delay sending
@@ -82,7 +83,7 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
virtual bool SwapBuffersAsync(const SwapCompletionCallback& callback);
// Copy part of the backbuffer to the frontbuffer.
- virtual bool PostSubBuffer(int x, int y, int width, int height);
+ virtual gfx::SwapResult PostSubBuffer(int x, int y, int width, int height);
// Copy part of the backbuffer to the frontbuffer. On some platforms, we want
// to send SwapBufferAck only after the surface is displayed on screen. The
@@ -204,9 +205,9 @@ class GL_EXPORT GLSurfaceAdapter : public GLSurface {
bool Recreate() override;
bool DeferDraws() override;
bool IsOffscreen() override;
- bool SwapBuffers() override;
+ gfx::SwapResult SwapBuffers() override;
bool SwapBuffersAsync(const SwapCompletionCallback& callback) override;
- bool PostSubBuffer(int x, int y, int width, int height) override;
+ gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override;
bool PostSubBufferAsync(int x,
int y,
int width,
« no previous file with comments | « ui/gfx/swap_result.h ('k') | ui/gl/gl_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698