| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/gl/gl_surface.h" | 5 #include "ui/gl/gl_surface.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 return false; | 188 return false; |
| 189 } | 189 } |
| 190 | 190 |
| 191 unsigned int GLSurface::GetBackingFrameBufferObject() { | 191 unsigned int GLSurface::GetBackingFrameBufferObject() { |
| 192 return 0; | 192 return 0; |
| 193 } | 193 } |
| 194 | 194 |
| 195 bool GLSurface::SwapBuffersAsync(const SwapCompletionCallback& callback) { | 195 bool GLSurface::SwapBuffersAsync(const SwapCompletionCallback& callback) { |
| 196 DCHECK(!IsSurfaceless()); | 196 DCHECK(!IsSurfaceless()); |
| 197 bool success = SwapBuffers(); | 197 bool success = SwapBuffers(); |
| 198 callback.Run(); | 198 callback.Run(SwapAck); |
| 199 return success; | 199 return success; |
| 200 } | 200 } |
| 201 | 201 |
| 202 bool GLSurface::PostSubBuffer(int x, int y, int width, int height) { | 202 bool GLSurface::PostSubBuffer(int x, int y, int width, int height) { |
| 203 return false; | 203 return false; |
| 204 } | 204 } |
| 205 | 205 |
| 206 bool GLSurface::PostSubBufferAsync(int x, | 206 bool GLSurface::PostSubBufferAsync(int x, |
| 207 int y, | 207 int y, |
| 208 int width, | 208 int width, |
| 209 int height, | 209 int height, |
| 210 const SwapCompletionCallback& callback) { | 210 const SwapCompletionCallback& callback) { |
| 211 bool success = PostSubBuffer(x, y, width, height); | 211 bool success = PostSubBuffer(x, y, width, height); |
| 212 callback.Run(); | 212 callback.Run(SwapAck); |
| 213 return success; | 213 return success; |
| 214 } | 214 } |
| 215 | 215 |
| 216 bool GLSurface::OnMakeCurrent(GLContext* context) { | 216 bool GLSurface::OnMakeCurrent(GLContext* context) { |
| 217 return true; | 217 return true; |
| 218 } | 218 } |
| 219 | 219 |
| 220 void GLSurface::NotifyWasBound() { | 220 void GLSurface::NotifyWasBound() { |
| 221 } | 221 } |
| 222 | 222 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 z_order, transform, image, bounds_rect, crop_rect); | 395 z_order, transform, image, bounds_rect, crop_rect); |
| 396 } | 396 } |
| 397 | 397 |
| 398 bool GLSurfaceAdapter::IsSurfaceless() const { | 398 bool GLSurfaceAdapter::IsSurfaceless() const { |
| 399 return surface_->IsSurfaceless(); | 399 return surface_->IsSurfaceless(); |
| 400 } | 400 } |
| 401 | 401 |
| 402 GLSurfaceAdapter::~GLSurfaceAdapter() {} | 402 GLSurfaceAdapter::~GLSurfaceAdapter() {} |
| 403 | 403 |
| 404 } // namespace gfx | 404 } // namespace gfx |
| OLD | NEW |