Commit 7ce25faa authored by piman@chromium.org's avatar piman@chromium.org

aura: fix flashing when switching tabs rapidly

The test was wrong (hence triggerring the DCHECK): host_->is_hidden() doesn't say anything about the last compositor frame that may still be pending, and sending the ACK causes the renderer to possibly render to the "front" surface in fast hide/show/hide/show transitions.

--enable-ui-release-front-surface hides the effect, but it's visible without that flag.

BUG=None


Review URL: https://chromiumcodereview.appspot.com/10830322

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151645 0039d316-1c4b-4281-b951-d872f2087c98
parent cd1183d6
......@@ -618,9 +618,8 @@ void RenderWidgetHostViewAura::AcceleratedSurfaceBuffersSwapped(
surface_route_id_ = params_in_pixel.route_id;
// If protection state changed, then this swap is stale. We must still ACK but
// do not update current_surface_ since it may have been discarded.
if (host_->is_hidden() ||
(params_in_pixel.protection_state_id &&
params_in_pixel.protection_state_id != protection_state_id_)) {
if (params_in_pixel.protection_state_id &&
params_in_pixel.protection_state_id != protection_state_id_) {
DCHECK(!current_surface_);
if (!params_in_pixel.skip_ack)
InsertSyncPointAndACK(params_in_pixel.route_id, gpu_host_id, NULL);
......@@ -689,9 +688,8 @@ void RenderWidgetHostViewAura::AcceleratedSurfacePostSubBuffer(
surface_route_id_ = params_in_pixel.route_id;
// If visible state changed, then this PSB is stale. We must still ACK but
// do not update current_surface_.
if (host_->is_hidden() ||
(params_in_pixel.protection_state_id &&
params_in_pixel.protection_state_id != protection_state_id_)) {
if (params_in_pixel.protection_state_id &&
params_in_pixel.protection_state_id != protection_state_id_) {
DCHECK(!current_surface_);
InsertSyncPointAndACK(params_in_pixel.route_id, gpu_host_id, NULL);
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment