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

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

Issue 2776973004: Remove CompositorObserver::OnCompositingEnded() (Closed)
Patch Set: Rename commited_frame_number_ to activated_frame_count_ and move increments back to DidReceiveCompo… Created 3 years, 8 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/browser/renderer_host/delegated_frame_host.cc ('k') | 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 const cc::LayerTreeDebugState& GetLayerTreeDebugState() const; 379 const cc::LayerTreeDebugState& GetLayerTreeDebugState() const;
380 void SetLayerTreeDebugState(const cc::LayerTreeDebugState& debug_state); 380 void SetLayerTreeDebugState(const cc::LayerTreeDebugState& debug_state);
381 const cc::RendererSettings& GetRendererSettings() const; 381 const cc::RendererSettings& GetRendererSettings() const;
382 382
383 LayerAnimatorCollection* layer_animator_collection() { 383 LayerAnimatorCollection* layer_animator_collection() {
384 return &layer_animator_collection_; 384 return &layer_animator_collection_;
385 } 385 }
386 386
387 const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; } 387 const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; }
388 int committed_frame_number() const { return committed_frame_number_; } 388 int activated_frame_count() const { return activated_frame_count_; }
389 float refresh_rate() const { return refresh_rate_; } 389 float refresh_rate() const { return refresh_rate_; }
390 390
391 private: 391 private:
392 friend class base::RefCounted<Compositor>; 392 friend class base::RefCounted<Compositor>;
393 friend class CompositorLock; 393 friend class CompositorLock;
394 394
395 // Called by CompositorLock. 395 // Called by CompositorLock.
396 void UnlockCompositor(); 396 void UnlockCompositor();
397 397
398 // Called to release any pending CompositorLock 398 // Called to release any pending CompositorLock
399 void CancelCompositorLock(); 399 void CancelCompositorLock();
400 400
401 gfx::Size size_; 401 gfx::Size size_;
402 402
403 ui::ContextFactory* context_factory_; 403 ui::ContextFactory* context_factory_;
404 ui::ContextFactoryPrivate* context_factory_private_; 404 ui::ContextFactoryPrivate* context_factory_private_;
405 405
406 // The root of the Layer tree drawn by this compositor. 406 // The root of the Layer tree drawn by this compositor.
407 Layer* root_layer_; 407 Layer* root_layer_;
408 408
409 base::ObserverList<CompositorObserver, true> observer_list_; 409 base::ObserverList<CompositorObserver, true> observer_list_;
410 base::ObserverList<CompositorAnimationObserver> animation_observer_list_; 410 base::ObserverList<CompositorAnimationObserver> animation_observer_list_;
411 411
412 gfx::AcceleratedWidget widget_; 412 gfx::AcceleratedWidget widget_;
413 // A sequence number of a current compositor frame for use with metrics. 413 // A sequence number of a current compositor frame for use with metrics.
414 int committed_frame_number_; 414 int activated_frame_count_;
415 415
416 // current VSYNC refresh rate per second. 416 // current VSYNC refresh rate per second.
417 float refresh_rate_; 417 float refresh_rate_;
418 418
419 // A map from child id to parent id. 419 // A map from child id to parent id.
420 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> child_frame_sinks_; 420 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> child_frame_sinks_;
421 bool widget_valid_; 421 bool widget_valid_;
422 bool compositor_frame_sink_requested_; 422 bool compositor_frame_sink_requested_;
423 const cc::FrameSinkId frame_sink_id_; 423 const cc::FrameSinkId frame_sink_id_;
424 scoped_refptr<cc::Layer> root_web_layer_; 424 scoped_refptr<cc::Layer> root_web_layer_;
(...skipping 19 matching lines...) Expand all
444 gfx::ColorSpace blending_color_space_; 444 gfx::ColorSpace blending_color_space_;
445 445
446 base::WeakPtrFactory<Compositor> weak_ptr_factory_; 446 base::WeakPtrFactory<Compositor> weak_ptr_factory_;
447 447
448 DISALLOW_COPY_AND_ASSIGN(Compositor); 448 DISALLOW_COPY_AND_ASSIGN(Compositor);
449 }; 449 };
450 450
451 } // namespace ui 451 } // namespace ui
452 452
453 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 453 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/delegated_frame_host.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698