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

Unified Diff: ui/gl/gl_surface_x11.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_stub.cc ('k') | ui/ozone/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_x11.cc
diff --git a/ui/gl/gl_surface_x11.cc b/ui/gl/gl_surface_x11.cc
index efbaf60b1e1bffb60cbfdf76beece3dc0536f0b3..8255a088b240f9fc410c598969498c52f060dbf0 100644
--- a/ui/gl/gl_surface_x11.cc
+++ b/ui/gl/gl_surface_x11.cc
@@ -34,9 +34,9 @@ class NativeViewGLSurfaceOSMesa : public GLSurfaceOSMesa {
void Destroy() override;
bool Resize(const gfx::Size& new_size) override;
bool IsOffscreen() override;
- bool SwapBuffers() override;
+ gfx::SwapResult SwapBuffers() override;
bool SupportsPostSubBuffer() override;
- bool PostSubBuffer(int x, int y, int width, int height) override;
+ gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override;
protected:
~NativeViewGLSurfaceOSMesa() override;
@@ -186,7 +186,7 @@ bool NativeViewGLSurfaceOSMesa::IsOffscreen() {
return false;
}
-bool NativeViewGLSurfaceOSMesa::SwapBuffers() {
+gfx::SwapResult NativeViewGLSurfaceOSMesa::SwapBuffers() {
TRACE_EVENT2("gpu", "NativeViewGLSurfaceOSMesa:RealSwapBuffers",
"width", GetSize().width(),
"height", GetSize().height());
@@ -196,7 +196,7 @@ bool NativeViewGLSurfaceOSMesa::SwapBuffers() {
XWindowAttributes attributes;
if (!XGetWindowAttributes(xdisplay_, window_, &attributes)) {
LOG(ERROR) << "XGetWindowAttributes failed for window " << window_ << ".";
- return false;
+ return gfx::SwapResult::SWAP_FAILED;
}
// Copy the frame into the pixmap.
@@ -221,14 +221,14 @@ bool NativeViewGLSurfaceOSMesa::SwapBuffers() {
0,
0);
- return true;
+ return gfx::SwapResult::SWAP_ACK;
}
bool NativeViewGLSurfaceOSMesa::SupportsPostSubBuffer() {
return true;
}
-bool NativeViewGLSurfaceOSMesa::PostSubBuffer(
+gfx::SwapResult NativeViewGLSurfaceOSMesa::PostSubBuffer(
int x, int y, int width, int height) {
gfx::Size size = GetSize();
@@ -238,7 +238,7 @@ bool NativeViewGLSurfaceOSMesa::PostSubBuffer(
XWindowAttributes attributes;
if (!XGetWindowAttributes(xdisplay_, window_, &attributes)) {
LOG(ERROR) << "XGetWindowAttributes failed for window " << window_ << ".";
- return false;
+ return gfx::SwapResult::SWAP_FAILED;
}
// Copy the frame into the pixmap.
@@ -269,7 +269,7 @@ bool NativeViewGLSurfaceOSMesa::PostSubBuffer(
x,
y);
- return true;
+ return gfx::SwapResult::SWAP_ACK;
}
NativeViewGLSurfaceOSMesa::~NativeViewGLSurfaceOSMesa() {
« no previous file with comments | « ui/gl/gl_surface_stub.cc ('k') | ui/ozone/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698