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

Unified Diff: ui/gl/gl_surface.h

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_implementation_ozone.cc ('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 73c085d4da56ac55da4e23ac0bb2bc99851b94ad..f6bba1b89e8a52783c88bc0b9f915e9f7e8caab5 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"
@@ -67,7 +68,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;
@@ -82,7 +83,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(gfx::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
@@ -91,7 +92,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
@@ -222,9 +223,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/gl/gl_implementation_ozone.cc ('k') | ui/gl/gl_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698