| 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 6d2808f1295e695d169663260a8d93d71951ac5f..ac5eb2e7e2c649a5cae7c606e1823c8965d15d3f 100644
|
| --- a/content/common/gpu/image_transport_surface.cc
|
| +++ b/content/common/gpu/image_transport_surface.cc
|
| @@ -187,7 +187,7 @@
|
| latency_info_.push_back(latency_info[i]);
|
| }
|
|
|
| -gfx::SwapResult PassThroughImageTransportSurface::SwapBuffers() {
|
| +bool PassThroughImageTransportSurface::SwapBuffers() {
|
| // GetVsyncValues before SwapBuffers to work around Mali driver bug:
|
| // crbug.com/223558.
|
| SendVSyncUpdateIfAvailable();
|
| @@ -206,16 +206,12 @@
|
| new std::vector<ui::LatencyInfo>();
|
| latency_info_ptr->swap(latency_info_);
|
| return gfx::GLSurfaceAdapter::SwapBuffersAsync(base::Bind(
|
| - &PassThroughImageTransportSurface::SwapBuffersCallBack,
|
| - weak_ptr_factory_.GetWeakPtr(), base::Owned(latency_info_ptr)))
|
| - ? gfx::SwapResult::SWAP_ACK
|
| - : gfx::SwapResult::SWAP_FAILED;
|
| -}
|
| -
|
| -gfx::SwapResult PassThroughImageTransportSurface::PostSubBuffer(int x,
|
| - int y,
|
| - int width,
|
| - int height) {
|
| + &PassThroughImageTransportSurface::SwapBuffersCallBack,
|
| + weak_ptr_factory_.GetWeakPtr(), base::Owned(latency_info_ptr)));
|
| +}
|
| +
|
| +bool PassThroughImageTransportSurface::PostSubBuffer(
|
| + int x, int y, int width, int height) {
|
| SendVSyncUpdateIfAvailable();
|
|
|
| base::TimeTicks swap_time = base::TimeTicks::Now();
|
| @@ -232,17 +228,14 @@
|
| new std::vector<ui::LatencyInfo>();
|
| latency_info_ptr->swap(latency_info_);
|
| return gfx::GLSurfaceAdapter::PostSubBufferAsync(
|
| - x, y, width, height,
|
| - base::Bind(&PassThroughImageTransportSurface::SwapBuffersCallBack,
|
| - weak_ptr_factory_.GetWeakPtr(),
|
| - base::Owned(latency_info_ptr)))
|
| - ? gfx::SwapResult::SWAP_ACK
|
| - : gfx::SwapResult::SWAP_FAILED;
|
| + x, y, width, height,
|
| + base::Bind(&PassThroughImageTransportSurface::SwapBuffersCallBack,
|
| + weak_ptr_factory_.GetWeakPtr(),
|
| + base::Owned(latency_info_ptr)));
|
| }
|
|
|
| void PassThroughImageTransportSurface::SwapBuffersCallBack(
|
| - std::vector<ui::LatencyInfo>* latency_info_ptr,
|
| - gfx::SwapResult result) {
|
| + std::vector<ui::LatencyInfo>* latency_info_ptr) {
|
| base::TimeTicks swap_ack_time = base::TimeTicks::Now();
|
| for (auto& latency : *latency_info_ptr) {
|
| latency.AddLatencyNumberWithTimestamp(
|
| @@ -250,7 +243,7 @@
|
| swap_ack_time, 1);
|
| }
|
|
|
| - helper_->stub()->SendSwapBuffersCompleted(*latency_info_ptr, result);
|
| + helper_->stub()->SendSwapBuffersCompleted(*latency_info_ptr);
|
| }
|
|
|
| bool PassThroughImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) {
|
|
|