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

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

Issue 13560016: [Aura] Fix for a flash of black frame when resizing with the new resize logic. (Closed) Base URL: svn://svn.chromium.org/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 | 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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 HWND parent = root_window->GetAcceleratedWidget(); 751 HWND parent = root_window->GetAcceleratedWidget();
752 LPARAM lparam = reinterpret_cast<LPARAM>(this); 752 LPARAM lparam = reinterpret_cast<LPARAM>(this);
753 753
754 EnumChildWindows(parent, HideWindowsCallback, lparam); 754 EnumChildWindows(parent, HideWindowsCallback, lparam);
755 } 755 }
756 #endif 756 #endif
757 } 757 }
758 758
759 void RenderWidgetHostViewAura::SetSize(const gfx::Size& size) { 759 void RenderWidgetHostViewAura::SetSize(const gfx::Size& size) {
760 SetBounds(gfx::Rect(window_->bounds().origin(), size)); 760 SetBounds(gfx::Rect(window_->bounds().origin(), size));
761 previous_damage_.op(RectToSkIRect(gfx::Rect(size)), SkRegion::kUnion_Op);
piman 2013/04/09 00:11:49 Why is this needed? When we resize, the new frame
761 } 762 }
762 763
763 void RenderWidgetHostViewAura::SetBounds(const gfx::Rect& rect) { 764 void RenderWidgetHostViewAura::SetBounds(const gfx::Rect& rect) {
764 if (window_->bounds().size() != rect.size() && 765 if (window_->bounds().size() != rect.size() &&
765 host_->is_accelerated_compositing_active()) { 766 host_->is_accelerated_compositing_active()) {
766 aura::RootWindow* root_window = window_->GetRootWindow(); 767 aura::RootWindow* root_window = window_->GetRootWindow();
767 ui::Compositor* compositor = root_window ? 768 ui::Compositor* compositor = root_window ?
768 root_window->compositor() : NULL; 769 root_window->compositor() : NULL;
769 if (root_window && compositor) { 770 if (root_window && compositor) {
770 // Listen to changes in the compositor lock state. 771 // Listen to changes in the compositor lock state.
(...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after
2804 RenderWidgetHost* widget) { 2805 RenderWidgetHost* widget) {
2805 return new RenderWidgetHostViewAura(widget); 2806 return new RenderWidgetHostViewAura(widget);
2806 } 2807 }
2807 2808
2808 // static 2809 // static
2809 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 2810 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
2810 GetScreenInfoForWindow(results, NULL); 2811 GetScreenInfoForWindow(results, NULL);
2811 } 2812 }
2812 2813
2813 } // namespace content 2814 } // 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