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

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

Issue 13604007: Fix large mis-paint when resizing windows aura chrome (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | 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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 if (window_->bounds().size() != rect.size() && 764 if (window_->bounds().size() != rect.size() &&
765 host_->is_accelerated_compositing_active()) { 765 host_->is_accelerated_compositing_active()) {
766 aura::RootWindow* root_window = window_->GetRootWindow(); 766 aura::RootWindow* root_window = window_->GetRootWindow();
767 ui::Compositor* compositor = root_window ? 767 ui::Compositor* compositor = root_window ?
768 root_window->compositor() : NULL; 768 root_window->compositor() : NULL;
769 if (root_window && compositor) { 769 if (root_window && compositor) {
770 // Listen to changes in the compositor lock state. 770 // Listen to changes in the compositor lock state.
771 if (!compositor->HasObserver(this)) 771 if (!compositor->HasObserver(this))
772 compositor->AddObserver(this); 772 compositor->AddObserver(this);
773 773
774 // On Windows while resizing, the the resize locks makes us mis-paint a white
775 // vertical strip (including the non-client area) if the content composition is
776 // lagging the UI composition. So here we disable the throttling so that the UI
777 // bits can draw ahead of the content thereby reducing the amount of whiteout.
778 // Because this causes the content to be drawn at wrong sizes while resizing
779 // we compensate by blocking the UI thread in Compositor::Draw() by issuing a
780 // FinishAllRendering() if we are resizing.
781 #if !defined (OS_WIN)
774 bool defer_compositor_lock = 782 bool defer_compositor_lock =
775 can_lock_compositor_ == NO_PENDING_RENDERER_FRAME || 783 can_lock_compositor_ == NO_PENDING_RENDERER_FRAME ||
776 can_lock_compositor_ == NO_PENDING_COMMIT; 784 can_lock_compositor_ == NO_PENDING_COMMIT;
777 785
778 if (can_lock_compositor_ == YES) 786 if (can_lock_compositor_ == YES)
779 can_lock_compositor_ = YES_DID_LOCK; 787 can_lock_compositor_ = YES_DID_LOCK;
780 788
781 resize_locks_.push_back(make_linked_ptr( 789 resize_locks_.push_back(make_linked_ptr(
782 new ResizeLock(root_window, rect.size(), defer_compositor_lock))); 790 new ResizeLock(root_window, rect.size(), defer_compositor_lock)));
791 #endif
783 } 792 }
784 } 793 }
785 window_->SetBounds(rect); 794 window_->SetBounds(rect);
786 host_->WasResized(); 795 host_->WasResized();
787 } 796 }
788 797
789 gfx::NativeView RenderWidgetHostViewAura::GetNativeView() const { 798 gfx::NativeView RenderWidgetHostViewAura::GetNativeView() const {
790 return window_; 799 return window_;
791 } 800 }
792 801
(...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after
2674 RenderWidgetHost* widget) { 2683 RenderWidgetHost* widget) {
2675 return new RenderWidgetHostViewAura(widget); 2684 return new RenderWidgetHostViewAura(widget);
2676 } 2685 }
2677 2686
2678 // static 2687 // static
2679 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 2688 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
2680 GetScreenInfoForWindow(results, NULL); 2689 GetScreenInfoForWindow(results, NULL);
2681 } 2690 }
2682 2691
2683 } // namespace content 2692 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698