| Index: content/common/gpu/image_transport_surface.cc
|
| diff --git a/content/common/gpu/image_transport_surface.cc b/content/common/gpu/image_transport_surface.cc
|
| index f4c5a68cb218b02b354c2612ec7f3b18b4e89b63..8d2747c8952a4e6385722f52bf1711574bf79212 100644
|
| --- a/content/common/gpu/image_transport_surface.cc
|
| +++ b/content/common/gpu/image_transport_surface.cc
|
| @@ -213,21 +213,20 @@ bool PassThroughImageTransportSurface::SwapBuffers() {
|
| // GetVsyncValues before SwapBuffers to work around Mali driver bug:
|
| // crbug.com/223558.
|
| SendVSyncUpdateIfAvailable();
|
| - bool result = gfx::GLSurfaceAdapter::SwapBuffers();
|
| - for (size_t i = 0; i < latency_info_.size(); i++) {
|
| - latency_info_[i].AddLatencyNumber(
|
| - ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0);
|
| - }
|
| -
|
| - helper_->SwapBuffersCompleted(latency_info_);
|
| - latency_info_.clear();
|
| - return result;
|
| + return gfx::GLSurfaceAdapter::SwapBuffersAsync(
|
| + base::Bind(&PassThroughImageTransportSurface::SwapBuffersCallBack,
|
| + base::Unretained(this)));
|
| }
|
|
|
| bool PassThroughImageTransportSurface::PostSubBuffer(
|
| int x, int y, int width, int height) {
|
| SendVSyncUpdateIfAvailable();
|
| - bool result = gfx::GLSurfaceAdapter::PostSubBuffer(x, y, width, height);
|
| + return gfx::GLSurfaceAdapter::PostSubBufferAsync(x, y, width, height,
|
| + base::Bind(&PassThroughImageTransportSurface::SwapBuffersCallBack,
|
| + base::Unretained(this)));
|
| +}
|
| +
|
| +void PassThroughImageTransportSurface::SwapBuffersCallBack() {
|
| for (size_t i = 0; i < latency_info_.size(); i++) {
|
| latency_info_[i].AddLatencyNumber(
|
| ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0);
|
| @@ -235,7 +234,6 @@ bool PassThroughImageTransportSurface::PostSubBuffer(
|
|
|
| helper_->SwapBuffersCompleted(latency_info_);
|
| latency_info_.clear();
|
| - return result;
|
| }
|
|
|
| bool PassThroughImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) {
|
|
|