Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1690)

Unified Diff: cc/output/gl_renderer.cc

Issue 2166973002: cc: Release pending overlay resources on swap-ack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698