Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |