| Index: ui/gl/gl_surface.cc
|
| diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc
|
| index e2f1717348538e6c01e42f6fb70cfff92ae2d4f4..b449c526eea8e755dac31d92e2a06105b675acdb 100644
|
| --- a/ui/gl/gl_surface.cc
|
| +++ b/ui/gl/gl_surface.cc
|
| @@ -191,10 +191,27 @@ unsigned int GLSurface::GetBackingFrameBufferObject() {
|
| return 0;
|
| }
|
|
|
| +bool GLSurface::SwapBuffersAsync(const SwapCompletionCallback& callback) {
|
| + DCHECK(!IsSurfaceless());
|
| + 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,
|
| + int y,
|
| + int width,
|
| + int height,
|
| + const SwapCompletionCallback& callback) {
|
| + bool success = PostSubBuffer(x, y, width, height);
|
| + callback.Run();
|
| + return success;
|
| +}
|
| +
|
| bool GLSurface::OnMakeCurrent(GLContext* context) {
|
| return true;
|
| }
|
| @@ -299,10 +316,21 @@ bool GLSurfaceAdapter::SwapBuffers() {
|
| return surface_->SwapBuffers();
|
| }
|
|
|
| +bool GLSurfaceAdapter::SwapBuffersAsync(
|
| + const SwapCompletionCallback& callback) {
|
| + return surface_->SwapBuffersAsync(callback);
|
| +}
|
| +
|
| bool GLSurfaceAdapter::PostSubBuffer(int x, int y, int width, int height) {
|
| return surface_->PostSubBuffer(x, y, width, height);
|
| }
|
|
|
| +bool GLSurfaceAdapter::PostSubBufferAsync(
|
| + int x, int y, int width, int height,
|
| + const SwapCompletionCallback& callback) {
|
| + return surface_->PostSubBufferAsync(x, y, width, height, callback);
|
| +}
|
| +
|
| bool GLSurfaceAdapter::SupportsPostSubBuffer() {
|
| return surface_->SupportsPostSubBuffer();
|
| }
|
|
|