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

Side by Side Diff: ui/compositor/compositor.cc

Issue 922293006: Revert of Fixes for two different HUD issues related to win32k lockdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 10 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 | « content/renderer/renderer_main_platform_delegate_win.cc ('k') | ui/gfx/BUILD.gn » ('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 "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 13 matching lines...) Expand all
24 #include "cc/surfaces/surface_id_allocator.h" 24 #include "cc/surfaces/surface_id_allocator.h"
25 #include "cc/trees/layer_tree_host.h" 25 #include "cc/trees/layer_tree_host.h"
26 #include "third_party/skia/include/core/SkBitmap.h" 26 #include "third_party/skia/include/core/SkBitmap.h"
27 #include "ui/compositor/compositor_observer.h" 27 #include "ui/compositor/compositor_observer.h"
28 #include "ui/compositor/compositor_switches.h" 28 #include "ui/compositor/compositor_switches.h"
29 #include "ui/compositor/compositor_vsync_manager.h" 29 #include "ui/compositor/compositor_vsync_manager.h"
30 #include "ui/compositor/dip_util.h" 30 #include "ui/compositor/dip_util.h"
31 #include "ui/compositor/layer.h" 31 #include "ui/compositor/layer.h"
32 #include "ui/compositor/layer_animator_collection.h" 32 #include "ui/compositor/layer_animator_collection.h"
33 #include "ui/gfx/frame_time.h" 33 #include "ui/gfx/frame_time.h"
34 #include "ui/gfx/hud_font.h"
35 #include "ui/gl/gl_context.h" 34 #include "ui/gl/gl_context.h"
36 #include "ui/gl/gl_switches.h" 35 #include "ui/gl/gl_switches.h"
37 36
38 namespace { 37 namespace {
39 38
40 const double kDefaultRefreshRate = 60.0; 39 const double kDefaultRefreshRate = 60.0;
41 const double kTestRefreshRate = 200.0; 40 const double kTestRefreshRate = 200.0;
42 41
43 const int kCompositorLockTimeoutMs = 67; 42 const int kCompositorLockTimeoutMs = 67;
44 43
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 settings.initial_debug_state.show_screen_space_rects = 126 settings.initial_debug_state.show_screen_space_rects =
128 command_line->HasSwitch(cc::switches::kUIShowScreenSpaceRects); 127 command_line->HasSwitch(cc::switches::kUIShowScreenSpaceRects);
129 settings.initial_debug_state.show_replica_screen_space_rects = 128 settings.initial_debug_state.show_replica_screen_space_rects =
130 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects); 129 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects);
131 130
132 settings.initial_debug_state.SetRecordRenderingStats( 131 settings.initial_debug_state.SetRecordRenderingStats(
133 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 132 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
134 133
135 settings.impl_side_painting = IsUIImplSidePaintingEnabled(); 134 settings.impl_side_painting = IsUIImplSidePaintingEnabled();
136 settings.use_zero_copy = IsUIZeroCopyEnabled(); 135 settings.use_zero_copy = IsUIZeroCopyEnabled();
137 settings.hud_typeface = ui::GetHudTypeface();
138 136
139 base::TimeTicks before_create = base::TimeTicks::Now(); 137 base::TimeTicks before_create = base::TimeTicks::Now();
140 if (compositor_thread_loop_.get()) { 138 if (compositor_thread_loop_.get()) {
141 host_ = cc::LayerTreeHost::CreateThreaded( 139 host_ = cc::LayerTreeHost::CreateThreaded(
142 this, 140 this,
143 context_factory_->GetSharedBitmapManager(), 141 context_factory_->GetSharedBitmapManager(),
144 context_factory_->GetGpuMemoryBufferManager(), 142 context_factory_->GetGpuMemoryBufferManager(),
145 settings, 143 settings,
146 task_runner_, 144 task_runner_,
147 compositor_thread_loop_, 145 compositor_thread_loop_,
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 observer_list_, 408 observer_list_,
411 OnCompositingLockStateChanged(this)); 409 OnCompositingLockStateChanged(this));
412 } 410 }
413 411
414 void Compositor::CancelCompositorLock() { 412 void Compositor::CancelCompositorLock() {
415 if (compositor_lock_) 413 if (compositor_lock_)
416 compositor_lock_->CancelLock(); 414 compositor_lock_->CancelLock();
417 } 415 }
418 416
419 } // namespace ui 417 } // namespace ui
OLDNEW
« no previous file with comments | « content/renderer/renderer_main_platform_delegate_win.cc ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698