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

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

Issue 2631333002: [animations] Adds metrics for jank on selected layer animations (Closed)
Patch Set: Adds UMA reporting for ripples and overview mode (committed frames) Created 3 years, 11 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
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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 const cc::LayerTreeDebugState& GetLayerTreeDebugState() const; 374 const cc::LayerTreeDebugState& GetLayerTreeDebugState() const;
375 void SetLayerTreeDebugState(const cc::LayerTreeDebugState& debug_state); 375 void SetLayerTreeDebugState(const cc::LayerTreeDebugState& debug_state);
376 const cc::RendererSettings& GetRendererSettings() const; 376 const cc::RendererSettings& GetRendererSettings() const;
377 377
378 LayerAnimatorCollection* layer_animator_collection() { 378 LayerAnimatorCollection* layer_animator_collection() {
379 return &layer_animator_collection_; 379 return &layer_animator_collection_;
380 } 380 }
381 381
382 const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; } 382 const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; }
383 int committed_frame_number() const { return committed_frame_number_; }
383 384
384 private: 385 private:
385 friend class base::RefCounted<Compositor>; 386 friend class base::RefCounted<Compositor>;
386 friend class CompositorLock; 387 friend class CompositorLock;
387 388
388 // Called by CompositorLock. 389 // Called by CompositorLock.
389 void UnlockCompositor(); 390 void UnlockCompositor();
390 391
391 // Called to release any pending CompositorLock 392 // Called to release any pending CompositorLock
392 void CancelCompositorLock(); 393 void CancelCompositorLock();
393 394
394 gfx::Size size_; 395 gfx::Size size_;
395 396
396 ui::ContextFactory* context_factory_; 397 ui::ContextFactory* context_factory_;
397 ui::ContextFactoryPrivate* context_factory_private_; 398 ui::ContextFactoryPrivate* context_factory_private_;
398 399
399 // The root of the Layer tree drawn by this compositor. 400 // The root of the Layer tree drawn by this compositor.
400 Layer* root_layer_; 401 Layer* root_layer_;
401 402
402 base::ObserverList<CompositorObserver, true> observer_list_; 403 base::ObserverList<CompositorObserver, true> observer_list_;
403 base::ObserverList<CompositorAnimationObserver> animation_observer_list_; 404 base::ObserverList<CompositorAnimationObserver> animation_observer_list_;
404 405
405 gfx::AcceleratedWidget widget_; 406 gfx::AcceleratedWidget widget_;
407 // A sequence number of a current compositor frame for use with metrics.
408 int committed_frame_number_;
406 // A map from child id to parent id. 409 // A map from child id to parent id.
407 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> child_frame_sinks_; 410 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> child_frame_sinks_;
408 bool widget_valid_; 411 bool widget_valid_;
409 bool compositor_frame_sink_requested_; 412 bool compositor_frame_sink_requested_;
410 const cc::FrameSinkId frame_sink_id_; 413 const cc::FrameSinkId frame_sink_id_;
411 scoped_refptr<cc::Layer> root_web_layer_; 414 scoped_refptr<cc::Layer> root_web_layer_;
412 std::unique_ptr<cc::AnimationHost> animation_host_; 415 std::unique_ptr<cc::AnimationHost> animation_host_;
413 std::unique_ptr<cc::LayerTreeHost> host_; 416 std::unique_ptr<cc::LayerTreeHost> host_;
414 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 417 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
415 418
(...skipping 14 matching lines...) Expand all
430 gfx::ColorSpace color_space_; 433 gfx::ColorSpace color_space_;
431 434
432 base::WeakPtrFactory<Compositor> weak_ptr_factory_; 435 base::WeakPtrFactory<Compositor> weak_ptr_factory_;
433 436
434 DISALLOW_COPY_AND_ASSIGN(Compositor); 437 DISALLOW_COPY_AND_ASSIGN(Compositor);
435 }; 438 };
436 439
437 } // namespace ui 440 } // namespace ui
438 441
439 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 442 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698