Chromium Code Reviews| Index: cc/output/gl_renderer.cc |
| diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc |
| index 9456c005c2e19dd4f111a81a4984a05e9d31dc65..c0b152bcec70a817feeff2c65a6325d3d82940ef 100644 |
| --- a/cc/output/gl_renderer.cc |
| +++ b/cc/output/gl_renderer.cc |
| @@ -2765,10 +2765,10 @@ void GLRenderer::SwapBuffers(CompositorFrameMetadata metadata) { |
| } |
| void GLRenderer::SwapBuffersComplete() { |
| - // Once a resouce has been swap-ACKed, send a query to the GPU process to ask |
| - // if the resource is no longer being consumed by the system compositor. The |
| - // response will come with the next swap-ACK. |
| if (settings_->release_overlay_resources_after_gpu_query) { |
| + // Once a resouce has been swap-ACKed, send a query to the GPU process to |
|
reveman
2016/07/20 21:07:22
nit: s/resouce/resource/
Daniele Castagna
2016/07/20 23:03:58
Done.
|
| + // ask if the resource is no longer being consumed by the system compositor. |
| + // The response will come with the next swap-ACK. |
| if (!swapping_overlay_resources_.empty()) { |
| for (OverlayResourceLock& lock : swapping_overlay_resources_.front()) { |
| unsigned texture = lock->texture_id(); |
| @@ -2788,6 +2788,9 @@ void GLRenderer::SwapBuffersComplete() { |
| } |
| gl_->ScheduleCALayerInUseQueryCHROMIUM(textures.size(), textures.data()); |
| } |
| + } else if (swapping_overlay_resources_.size() > 1) { |
| + DCHECK_EQ(2U, swapping_overlay_resources_.size()); |
|
reveman
2016/07/20 21:07:22
nit: 2u
Daniele Castagna
2016/07/20 23:03:58
I used the capital U to stay consistent with overl
|
| + swapping_overlay_resources_.pop_front(); |
|
reveman
2016/07/20 21:07:21
I think a comment here explaining why this is corr
ccameron
2016/07/20 21:22:24
+1
|
| } |
| } |