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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 10830322: aura: fix flashing when switching tabs rapidly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 resize_locks_.clear(); 611 resize_locks_.clear();
612 } 612 }
613 } 613 }
614 614
615 void RenderWidgetHostViewAura::AcceleratedSurfaceBuffersSwapped( 615 void RenderWidgetHostViewAura::AcceleratedSurfaceBuffersSwapped(
616 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, 616 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel,
617 int gpu_host_id) { 617 int gpu_host_id) {
618 surface_route_id_ = params_in_pixel.route_id; 618 surface_route_id_ = params_in_pixel.route_id;
619 // If protection state changed, then this swap is stale. We must still ACK but 619 // If protection state changed, then this swap is stale. We must still ACK but
620 // do not update current_surface_ since it may have been discarded. 620 // do not update current_surface_ since it may have been discarded.
621 if (host_->is_hidden() || 621 if (params_in_pixel.protection_state_id &&
622 (params_in_pixel.protection_state_id && 622 params_in_pixel.protection_state_id != protection_state_id_) {
623 params_in_pixel.protection_state_id != protection_state_id_)) {
624 DCHECK(!current_surface_); 623 DCHECK(!current_surface_);
625 if (!params_in_pixel.skip_ack) 624 if (!params_in_pixel.skip_ack)
626 InsertSyncPointAndACK(params_in_pixel.route_id, gpu_host_id, NULL); 625 InsertSyncPointAndACK(params_in_pixel.route_id, gpu_host_id, NULL);
627 return; 626 return;
628 } 627 }
629 current_surface_ = params_in_pixel.surface_handle; 628 current_surface_ = params_in_pixel.surface_handle;
630 // If we don't require an ACK that means the content is not a fresh updated 629 // If we don't require an ACK that means the content is not a fresh updated
631 // new frame, rather we are just resetting our handle to some old content that 630 // new frame, rather we are just resetting our handle to some old content that
632 // we still hadn't discarded. Although we could display immediately, by not 631 // we still hadn't discarded. Although we could display immediately, by not
633 // resetting the compositor lock here, we give us some time to get a fresh 632 // resetting the compositor lock here, we give us some time to get a fresh
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 } 681 }
683 } 682 }
684 } 683 }
685 684
686 void RenderWidgetHostViewAura::AcceleratedSurfacePostSubBuffer( 685 void RenderWidgetHostViewAura::AcceleratedSurfacePostSubBuffer(
687 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel, 686 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel,
688 int gpu_host_id) { 687 int gpu_host_id) {
689 surface_route_id_ = params_in_pixel.route_id; 688 surface_route_id_ = params_in_pixel.route_id;
690 // If visible state changed, then this PSB is stale. We must still ACK but 689 // If visible state changed, then this PSB is stale. We must still ACK but
691 // do not update current_surface_. 690 // do not update current_surface_.
692 if (host_->is_hidden() || 691 if (params_in_pixel.protection_state_id &&
693 (params_in_pixel.protection_state_id && 692 params_in_pixel.protection_state_id != protection_state_id_) {
694 params_in_pixel.protection_state_id != protection_state_id_)) {
695 DCHECK(!current_surface_); 693 DCHECK(!current_surface_);
696 InsertSyncPointAndACK(params_in_pixel.route_id, gpu_host_id, NULL); 694 InsertSyncPointAndACK(params_in_pixel.route_id, gpu_host_id, NULL);
697 return; 695 return;
698 } 696 }
699 current_surface_ = params_in_pixel.surface_handle; 697 current_surface_ = params_in_pixel.surface_handle;
700 released_front_lock_ = NULL; 698 released_front_lock_ = NULL;
701 DCHECK(current_surface_); 699 DCHECK(current_surface_);
702 UpdateExternalTexture(); 700 UpdateExternalTexture();
703 701
704 ui::Compositor* compositor = GetCompositor(); 702 ui::Compositor* compositor = GetCompositor();
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 RenderWidgetHost* widget) { 1654 RenderWidgetHost* widget) {
1657 return new RenderWidgetHostViewAura(widget); 1655 return new RenderWidgetHostViewAura(widget);
1658 } 1656 }
1659 1657
1660 // static 1658 // static
1661 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 1659 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
1662 GetScreenInfoForWindow(results, NULL); 1660 GetScreenInfoForWindow(results, NULL);
1663 } 1661 }
1664 1662
1665 } // namespace content 1663 } // namespace content
OLDNEW
« 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