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

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

Issue 2971613002: Add command-line flag to force compositor framerate. (Closed)
Patch Set: change flag name to limit-fps Created 3 years, 5 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 | « no previous file | ui/compositor/compositor.cc » ('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 #ifndef UI_COMPOSITOR_COMPOSITOR_H_ 5 #ifndef UI_COMPOSITOR_COMPOSITOR_H_
6 #define UI_COMPOSITOR_COMPOSITOR_H_ 6 #define UI_COMPOSITOR_COMPOSITOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 base::ObserverList<CompositorObserver, true> observer_list_; 395 base::ObserverList<CompositorObserver, true> observer_list_;
396 base::ObserverList<CompositorAnimationObserver> animation_observer_list_; 396 base::ObserverList<CompositorAnimationObserver> animation_observer_list_;
397 397
398 gfx::AcceleratedWidget widget_ = gfx::kNullAcceleratedWidget; 398 gfx::AcceleratedWidget widget_ = gfx::kNullAcceleratedWidget;
399 // A sequence number of a current compositor frame for use with metrics. 399 // A sequence number of a current compositor frame for use with metrics.
400 int activated_frame_count_ = 0; 400 int activated_frame_count_ = 0;
401 401
402 // Current vsync refresh rate per second. 402 // Current vsync refresh rate per second.
403 float refresh_rate_ = 0.f; 403 float refresh_rate_ = 0.f;
404 404
405 // If nonzero, this is the refresh rate forced from the command-line.
406 double forced_refresh_rate_ = 0.f;
407
405 // A map from child id to parent id. 408 // A map from child id to parent id.
406 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> child_frame_sinks_; 409 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> child_frame_sinks_;
407 bool widget_valid_ = false; 410 bool widget_valid_ = false;
408 bool compositor_frame_sink_requested_ = false; 411 bool compositor_frame_sink_requested_ = false;
409 const cc::FrameSinkId frame_sink_id_; 412 const cc::FrameSinkId frame_sink_id_;
410 scoped_refptr<cc::Layer> root_web_layer_; 413 scoped_refptr<cc::Layer> root_web_layer_;
411 std::unique_ptr<cc::AnimationHost> animation_host_; 414 std::unique_ptr<cc::AnimationHost> animation_host_;
412 std::unique_ptr<cc::LayerTreeHost> host_; 415 std::unique_ptr<cc::LayerTreeHost> host_;
413 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 416 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
414 417
(...skipping 20 matching lines...) Expand all
435 438
436 base::WeakPtrFactory<Compositor> weak_ptr_factory_; 439 base::WeakPtrFactory<Compositor> weak_ptr_factory_;
437 base::WeakPtrFactory<Compositor> lock_timeout_weak_ptr_factory_; 440 base::WeakPtrFactory<Compositor> lock_timeout_weak_ptr_factory_;
438 441
439 DISALLOW_COPY_AND_ASSIGN(Compositor); 442 DISALLOW_COPY_AND_ASSIGN(Compositor);
440 }; 443 };
441 444
442 } // namespace ui 445 } // namespace ui
443 446
444 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 447 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698