diff options
author | vabr <vabr@chromium.org> | 2015-05-29 03:40:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-29 10:41:10 +0000 |
commit | 9b3f11392a034ab4479126eede391e253c7c0969 (patch) | |
tree | eae5a5a112cf12893f0ffb228ed22863023cca89 /content/common/gpu/image_transport_surface.cc | |
parent | 583a6c2a684d55ab7d2fc7f758e3af1bb4adf244 (diff) | |
download | chromium_src-9b3f11392a034ab4479126eede391e253c7c0969.zip chromium_src-9b3f11392a034ab4479126eede391e253c7c0969.tar.gz chromium_src-9b3f11392a034ab4479126eede391e253c7c0969.tar.bz2 |
Revert of Adding status to swap complete (patchset #18 id:340001 of https://codereview.chromium.org/1084173004/)
Reason for revert:
Looks like this broke compilation on http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Ozone%20Builder/builds/17401.
Speculatively reverting for now. If confirmed, will file a bug with details, otherwise re-revert.
Cheers,
your's sheriff
Original issue's description:
> Adding status to swap buffers completion
>
> This will give us more options than completing all swaps successfully, or losing context
>
> BUG=476966
> TBR=torne - approved interface change
>
> Committed: https://crrev.com/c794eda78e9ba3c46b550b433e9fe5a248d40104
> Cr-Commit-Position: refs/heads/master@{#331906}
TBR=alexst@chromium.org,danakj@chromium.org,dnicoara@chromium.org,nasko@chromium.org,piman@chromium.org,spang@chromium.org,torne@chromium.org,dcheng@chromium.org,achaulk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=476966
Review URL: https://codereview.chromium.org/1166463004
Cr-Commit-Position: refs/heads/master@{#331939}
Diffstat (limited to 'content/common/gpu/image_transport_surface.cc')
-rw-r--r-- | content/common/gpu/image_transport_surface.cc | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/content/common/gpu/image_transport_surface.cc b/content/common/gpu/image_transport_surface.cc index 6d2808f..ac5eb2e 100644 --- a/content/common/gpu/image_transport_surface.cc +++ b/content/common/gpu/image_transport_surface.cc @@ -187,7 +187,7 @@ void PassThroughImageTransportSurface::SetLatencyInfo( 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 @@ gfx::SwapResult PassThroughImageTransportSurface::SwapBuffers() { 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; + &PassThroughImageTransportSurface::SwapBuffersCallBack, + weak_ptr_factory_.GetWeakPtr(), base::Owned(latency_info_ptr))); } -gfx::SwapResult PassThroughImageTransportSurface::PostSubBuffer(int x, - int y, - int width, - int height) { +bool PassThroughImageTransportSurface::PostSubBuffer( + int x, int y, int width, int height) { SendVSyncUpdateIfAvailable(); base::TimeTicks swap_time = base::TimeTicks::Now(); @@ -232,17 +228,14 @@ gfx::SwapResult PassThroughImageTransportSurface::PostSubBuffer(int x, 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 @@ void PassThroughImageTransportSurface::SwapBuffersCallBack( swap_ack_time, 1); } - helper_->stub()->SendSwapBuffersCompleted(*latency_info_ptr, result); + helper_->stub()->SendSwapBuffersCompleted(*latency_info_ptr); } bool PassThroughImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) { |