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

Side by Side Diff: ash/display/display_controller.cc

Issue 1016033006: Enable BeginFrame scheduling on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable BeginFrame scheduling under flag Created 5 years, 7 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
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.cc ('k') | cc/base/switches.h » ('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 "ash/display/display_controller.h" 5 #include "ash/display/display_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 21 matching lines...) Expand all
32 #include "base/strings/utf_string_conversions.h" 32 #include "base/strings/utf_string_conversions.h"
33 #include "ui/aura/client/capture_client.h" 33 #include "ui/aura/client/capture_client.h"
34 #include "ui/aura/client/focus_client.h" 34 #include "ui/aura/client/focus_client.h"
35 #include "ui/aura/client/screen_position_client.h" 35 #include "ui/aura/client/screen_position_client.h"
36 #include "ui/aura/window.h" 36 #include "ui/aura/window.h"
37 #include "ui/aura/window_event_dispatcher.h" 37 #include "ui/aura/window_event_dispatcher.h"
38 #include "ui/aura/window_property.h" 38 #include "ui/aura/window_property.h"
39 #include "ui/aura/window_tracker.h" 39 #include "ui/aura/window_tracker.h"
40 #include "ui/aura/window_tree_host.h" 40 #include "ui/aura/window_tree_host.h"
41 #include "ui/compositor/compositor.h" 41 #include "ui/compositor/compositor.h"
42 #include "ui/compositor/compositor_vsync_manager.h"
43 #include "ui/gfx/display.h" 42 #include "ui/gfx/display.h"
44 #include "ui/gfx/screen.h" 43 #include "ui/gfx/screen.h"
45 #include "ui/wm/core/coordinate_conversion.h" 44 #include "ui/wm/core/coordinate_conversion.h"
46 #include "ui/wm/public/activation_client.h" 45 #include "ui/wm/public/activation_client.h"
47 46
48 #if defined(OS_CHROMEOS) 47 #if defined(OS_CHROMEOS)
49 #include "ash/display/display_configurator_animation.h" 48 #include "ash/display/display_configurator_animation.h"
50 #include "base/sys_info.h" 49 #include "base/sys_info.h"
51 #include "base/time/time.h" 50 #include "base/time/time.h"
52 #endif // defined(OS_CHROMEOS) 51 #endif // defined(OS_CHROMEOS)
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 host->GetAcceleratedWidget(), info.GetActiveRotation(), scale); 145 host->GetAcceleratedWidget(), info.GetActiveRotation(), scale);
147 #endif 146 #endif
148 #endif 147 #endif
149 scoped_ptr<RootWindowTransformer> transformer( 148 scoped_ptr<RootWindowTransformer> transformer(
150 CreateRootWindowTransformerForDisplay(host->window(), display)); 149 CreateRootWindowTransformerForDisplay(host->window(), display));
151 ash_host->SetRootWindowTransformer(transformer.Pass()); 150 ash_host->SetRootWindowTransformer(transformer.Pass());
152 151
153 DisplayMode mode = 152 DisplayMode mode =
154 GetDisplayManager()->GetActiveModeForDisplayId(display.id()); 153 GetDisplayManager()->GetActiveModeForDisplayId(display.id());
155 if (mode.refresh_rate > 0.0f) { 154 if (mode.refresh_rate > 0.0f) {
156 host->compositor()->vsync_manager()->SetAuthoritativeVSyncInterval( 155 host->compositor()->SetAuthoritativeVSyncInterval(
157 base::TimeDelta::FromMicroseconds( 156 base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond /
158 base::Time::kMicrosecondsPerSecond / mode.refresh_rate)); 157 mode.refresh_rate));
159 } 158 }
160 159
161 // Just movnig the display requires the full redraw. 160 // Just movnig the display requires the full redraw.
162 // chrome-os-partner:33558. 161 // chrome-os-partner:33558.
163 host->compositor()->ScheduleFullRedraw(); 162 host->compositor()->ScheduleFullRedraw();
164 } 163 }
165 164
166 void ClearDisplayPropertiesOnHost(AshWindowTreeHost* ash_host) { 165 void ClearDisplayPropertiesOnHost(AshWindowTreeHost* ash_host) {
167 #if defined(OS_CHROMEOS) && defined(USE_OZONE) 166 #if defined(OS_CHROMEOS) && defined(USE_OZONE)
168 aura::WindowTreeHost* host = ash_host->AsWindowTreeHost(); 167 aura::WindowTreeHost* host = ash_host->AsWindowTreeHost();
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 Shell::GetInstance()->display_configurator_animation() 901 Shell::GetInstance()->display_configurator_animation()
903 ->StartFadeInAnimation(); 902 ->StartFadeInAnimation();
904 #endif 903 #endif
905 } 904 }
906 905
907 void DisplayController::SetMirrorModeAfterAnimation(bool mirror) { 906 void DisplayController::SetMirrorModeAfterAnimation(bool mirror) {
908 GetDisplayManager()->SetMirrorMode(mirror); 907 GetDisplayManager()->SetMirrorMode(mirror);
909 } 908 }
910 909
911 } // namespace ash 910 } // namespace ash
OLDNEW
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.cc ('k') | cc/base/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698