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

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

Issue 423773002: Unified BeginFrame scheduling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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 | cc/BUILD.gn » ('j') | cc/base/switches.cc » ('J')
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 18 matching lines...) Expand all
29 #include "base/strings/utf_string_conversions.h" 29 #include "base/strings/utf_string_conversions.h"
30 #include "ui/aura/client/capture_client.h" 30 #include "ui/aura/client/capture_client.h"
31 #include "ui/aura/client/focus_client.h" 31 #include "ui/aura/client/focus_client.h"
32 #include "ui/aura/client/screen_position_client.h" 32 #include "ui/aura/client/screen_position_client.h"
33 #include "ui/aura/window.h" 33 #include "ui/aura/window.h"
34 #include "ui/aura/window_event_dispatcher.h" 34 #include "ui/aura/window_event_dispatcher.h"
35 #include "ui/aura/window_property.h" 35 #include "ui/aura/window_property.h"
36 #include "ui/aura/window_tracker.h" 36 #include "ui/aura/window_tracker.h"
37 #include "ui/aura/window_tree_host.h" 37 #include "ui/aura/window_tree_host.h"
38 #include "ui/compositor/compositor.h" 38 #include "ui/compositor/compositor.h"
39 #include "ui/compositor/compositor_vsync_manager.h"
40 #include "ui/gfx/display.h" 39 #include "ui/gfx/display.h"
41 #include "ui/gfx/screen.h" 40 #include "ui/gfx/screen.h"
42 #include "ui/wm/public/activation_client.h" 41 #include "ui/wm/public/activation_client.h"
43 42
44 #if defined(OS_CHROMEOS) 43 #if defined(OS_CHROMEOS)
45 #include "ash/display/display_configurator_animation.h" 44 #include "ash/display/display_configurator_animation.h"
46 #include "base/sys_info.h" 45 #include "base/sys_info.h"
47 #include "base/time/time.h" 46 #include "base/time/time.h"
48 #endif // defined(OS_CHROMEOS) 47 #endif // defined(OS_CHROMEOS)
49 48
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 kCARDINAL, 122 kCARDINAL,
124 100 * display.device_scale_factor()); 123 100 * display.device_scale_factor());
125 #endif 124 #endif
126 scoped_ptr<RootWindowTransformer> transformer( 125 scoped_ptr<RootWindowTransformer> transformer(
127 CreateRootWindowTransformerForDisplay(host->window(), display)); 126 CreateRootWindowTransformerForDisplay(host->window(), display));
128 ash_host->SetRootWindowTransformer(transformer.Pass()); 127 ash_host->SetRootWindowTransformer(transformer.Pass());
129 128
130 DisplayMode mode; 129 DisplayMode mode;
131 if (GetDisplayManager()->GetSelectedModeForDisplayId(display.id(), &mode) && 130 if (GetDisplayManager()->GetSelectedModeForDisplayId(display.id(), &mode) &&
132 mode.refresh_rate > 0.0f) { 131 mode.refresh_rate > 0.0f) {
133 host->compositor()->vsync_manager()->SetAuthoritativeVSyncInterval( 132 host->compositor()->SetAuthoritativeVSyncInterval(
134 base::TimeDelta::FromMicroseconds( 133 base::TimeDelta::FromMicroseconds(
135 base::Time::kMicrosecondsPerSecond / mode.refresh_rate)); 134 base::Time::kMicrosecondsPerSecond / mode.refresh_rate));
136 } 135 }
137 } 136 }
138 137
139 aura::Window* GetWindow(AshWindowTreeHost* ash_host) { 138 aura::Window* GetWindow(AshWindowTreeHost* ash_host) {
140 CHECK(ash_host->AsWindowTreeHost()); 139 CHECK(ash_host->AsWindowTreeHost());
141 return ash_host->AsWindowTreeHost()->window(); 140 return ash_host->AsWindowTreeHost()->window();
142 } 141 }
143 142
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 std::string name = 774 std::string name =
776 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; 775 root_windows[i] == primary ? "aura_root_0" : "aura_root_x";
777 gfx::AcceleratedWidget xwindow = 776 gfx::AcceleratedWidget xwindow =
778 root_windows[i]->GetHost()->GetAcceleratedWidget(); 777 root_windows[i]->GetHost()->GetAcceleratedWidget();
779 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); 778 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str());
780 } 779 }
781 #endif 780 #endif
782 } 781 }
783 782
784 } // namespace ash 783 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | cc/BUILD.gn » ('j') | cc/base/switches.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698