| 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 "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" |
| 6 | 6 |
| 7 #include "base/win/metro.h" | 7 #include "base/win/metro.h" |
| 8 #include "third_party/skia/include/core/SkPath.h" | 8 #include "third_party/skia/include/core/SkPath.h" |
| 9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 } | 934 } |
| 935 | 935 |
| 936 bool DesktopWindowTreeHostWin::HandleScrollEvent( | 936 bool DesktopWindowTreeHostWin::HandleScrollEvent( |
| 937 const ui::ScrollEvent& event) { | 937 const ui::ScrollEvent& event) { |
| 938 SendEventToProcessor(const_cast<ui::ScrollEvent*>(&event)); | 938 SendEventToProcessor(const_cast<ui::ScrollEvent*>(&event)); |
| 939 return event.handled(); | 939 return event.handled(); |
| 940 } | 940 } |
| 941 | 941 |
| 942 void DesktopWindowTreeHostWin::HandleWindowSizeChanging() { | 942 void DesktopWindowTreeHostWin::HandleWindowSizeChanging() { |
| 943 if (compositor() && need_synchronous_paint_) { | 943 if (compositor() && need_synchronous_paint_) { |
| 944 compositor()->FinishAllRendering(); | 944 compositor()->DisableSwapUntilResize(); |
| 945 // If we received the window size changing notification due to a restore or | 945 // If we received the window size changing notification due to a restore or |
| 946 // maximize operation, then we can reset the need_synchronous_paint_ flag | 946 // maximize operation, then we can reset the need_synchronous_paint_ flag |
| 947 // here. For a sizing operation, the flag will be reset at the end of the | 947 // here. For a sizing operation, the flag will be reset at the end of the |
| 948 // operation. | 948 // operation. |
| 949 if (!in_sizing_loop_) | 949 if (!in_sizing_loop_) |
| 950 need_synchronous_paint_ = false; | 950 need_synchronous_paint_ = false; |
| 951 } | 951 } |
| 952 } | 952 } |
| 953 | 953 |
| 954 //////////////////////////////////////////////////////////////////////////////// | 954 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 | 995 |
| 996 // static | 996 // static |
| 997 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 997 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 998 internal::NativeWidgetDelegate* native_widget_delegate, | 998 internal::NativeWidgetDelegate* native_widget_delegate, |
| 999 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 999 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 1000 return new DesktopWindowTreeHostWin(native_widget_delegate, | 1000 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 1001 desktop_native_widget_aura); | 1001 desktop_native_widget_aura); |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 } // namespace views | 1004 } // namespace views |
| OLD | NEW |