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

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 787763006: cc: Adding BeginFrameTracker object and removing Now() from LTHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding documentation as requested by Brian. Created 6 years 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 CC_TREES_LAYER_TREE_HOST_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 14 matching lines...) Expand all
25 #include "cc/input/top_controls_manager_client.h" 25 #include "cc/input/top_controls_manager_client.h"
26 #include "cc/layers/layer_lists.h" 26 #include "cc/layers/layer_lists.h"
27 #include "cc/layers/render_pass_sink.h" 27 #include "cc/layers/render_pass_sink.h"
28 #include "cc/output/begin_frame_args.h" 28 #include "cc/output/begin_frame_args.h"
29 #include "cc/output/managed_memory_policy.h" 29 #include "cc/output/managed_memory_policy.h"
30 #include "cc/output/output_surface_client.h" 30 #include "cc/output/output_surface_client.h"
31 #include "cc/output/renderer.h" 31 #include "cc/output/renderer.h"
32 #include "cc/quads/render_pass.h" 32 #include "cc/quads/render_pass.h"
33 #include "cc/resources/resource_provider.h" 33 #include "cc/resources/resource_provider.h"
34 #include "cc/resources/tile_manager.h" 34 #include "cc/resources/tile_manager.h"
35 #include "cc/scheduler/begin_frame_tracker.h"
35 #include "cc/scheduler/commit_earlyout_reason.h" 36 #include "cc/scheduler/commit_earlyout_reason.h"
36 #include "cc/scheduler/draw_result.h" 37 #include "cc/scheduler/draw_result.h"
37 #include "skia/ext/refptr.h" 38 #include "skia/ext/refptr.h"
38 #include "third_party/skia/include/core/SkColor.h" 39 #include "third_party/skia/include/core/SkColor.h"
39 #include "ui/gfx/geometry/rect.h" 40 #include "ui/gfx/geometry/rect.h"
40 41
41 namespace cc { 42 namespace cc {
42 43
43 class CompletionEvent; 44 class CompletionEvent;
44 class CompositorFrameMetadata; 45 class CompositorFrameMetadata;
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 426
426 gfx::Vector2dF accumulated_root_overscroll() const { 427 gfx::Vector2dF accumulated_root_overscroll() const {
427 return accumulated_root_overscroll_; 428 return accumulated_root_overscroll_;
428 } 429 }
429 430
430 bool pinch_gesture_active() const { return pinch_gesture_active_; } 431 bool pinch_gesture_active() const { return pinch_gesture_active_; }
431 432
432 void SetTreePriority(TreePriority priority); 433 void SetTreePriority(TreePriority priority);
433 TreePriority GetTreePriority() const; 434 TreePriority GetTreePriority() const;
434 435
436 // TODO(mithro): Remove these methods which expose control of the internal
brianderson 2014/12/18 21:57:08 Can you at least remove UpdateCurrentBeginFrameArg
mithro-old 2014/12/18 23:15:06 Done.
437 // BeginFrameArgs to external callers. LayerTreeHostImpl should manage its
438 // own frame time based on WillBeginImplFrame and other methods.
435 void UpdateCurrentBeginFrameArgs(const BeginFrameArgs& args); 439 void UpdateCurrentBeginFrameArgs(const BeginFrameArgs& args);
436 void ResetCurrentBeginFrameArgsForNextFrame(); 440 void ResetCurrentBeginFrameArgsForNextFrame();
437 virtual BeginFrameArgs CurrentBeginFrameArgs() const; 441 virtual BeginFrameArgs CurrentBeginFrameArgs() const;
438 442
439 // Expected time between two begin impl frame calls. 443 // Expected time between two begin impl frame calls.
440 base::TimeDelta begin_impl_frame_interval() const { 444 base::TimeDelta CurrentBeginFrameInterval() const;
441 return begin_impl_frame_interval_;
442 }
443 445
444 void AsValueInto(base::debug::TracedValue* value) const; 446 void AsValueInto(base::debug::TracedValue* value) const;
445 void AsValueWithFrameInto(FrameData* frame, 447 void AsValueWithFrameInto(FrameData* frame,
446 base::debug::TracedValue* value) const; 448 base::debug::TracedValue* value) const;
447 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const; 449 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const;
448 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValueWithFrame( 450 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValueWithFrame(
449 FrameData* frame) const; 451 FrameData* frame) const;
450 scoped_refptr<base::debug::ConvertableToTraceFormat> ActivationStateAsValue() 452 scoped_refptr<base::debug::ConvertableToTraceFormat> ActivationStateAsValue()
451 const; 453 const;
452 void ActivationStateAsValueInto(base::debug::TracedValue* value) const; 454 void ActivationStateAsValueInto(base::debug::TracedValue* value) const;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 const AnimationRegistrar::AnimationControllerMap& 524 const AnimationRegistrar::AnimationControllerMap&
523 active_animation_controllers() const { 525 active_animation_controllers() const {
524 return animation_registrar_->active_animation_controllers(); 526 return animation_registrar_->active_animation_controllers();
525 } 527 }
526 528
527 bool prepare_tiles_needed() const { return tile_priorities_dirty_; } 529 bool prepare_tiles_needed() const { return tile_priorities_dirty_; }
528 530
529 LayerTreeHostImplClient* client_; 531 LayerTreeHostImplClient* client_;
530 Proxy* proxy_; 532 Proxy* proxy_;
531 533
534 BeginFrameTracker current_begin_frame_args_ =
535 BeginFrameTracker(BEGINFRAMETRACKER_FROM_HERE);
brianderson 2014/12/18 21:57:08 According to http://chromium-cpp.appspot.com this
mithro-old 2014/12/18 23:15:06 Done.
536
532 private: 537 private:
533 void CreateAndSetRenderer(); 538 void CreateAndSetRenderer();
534 void CreateAndSetTileManager(); 539 void CreateAndSetTileManager();
535 void DestroyTileManager(); 540 void DestroyTileManager();
536 void ReleaseTreeResources(); 541 void ReleaseTreeResources();
537 void EnforceZeroBudget(bool zero_budget); 542 void EnforceZeroBudget(bool zero_budget);
538 543
539 bool UsePendingTreeForSync() const; 544 bool UsePendingTreeForSync() const;
540 bool IsSynchronousSingleThreaded() const; 545 bool IsSynchronousSingleThreaded() const;
541 546
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 // - viewport_rect_for_tile_priority_ is the rect in view space used for 700 // - viewport_rect_for_tile_priority_ is the rect in view space used for
696 // tiling priority. 701 // tiling priority.
697 gfx::Transform external_transform_; 702 gfx::Transform external_transform_;
698 gfx::Rect external_viewport_; 703 gfx::Rect external_viewport_;
699 gfx::Rect external_clip_; 704 gfx::Rect external_clip_;
700 gfx::Rect viewport_rect_for_tile_priority_; 705 gfx::Rect viewport_rect_for_tile_priority_;
701 bool resourceless_software_draw_; 706 bool resourceless_software_draw_;
702 707
703 gfx::Rect viewport_damage_rect_; 708 gfx::Rect viewport_damage_rect_;
704 709
705 BeginFrameArgs current_begin_frame_args_;
706
707 // Expected time between two begin impl frame calls.
708 base::TimeDelta begin_impl_frame_interval_;
709
710 scoped_ptr<AnimationRegistrar> animation_registrar_; 710 scoped_ptr<AnimationRegistrar> animation_registrar_;
711 711
712 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 712 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
713 MicroBenchmarkControllerImpl micro_benchmark_controller_; 713 MicroBenchmarkControllerImpl micro_benchmark_controller_;
714 scoped_ptr<TaskGraphRunner> single_thread_synchronous_task_graph_runner_; 714 scoped_ptr<TaskGraphRunner> single_thread_synchronous_task_graph_runner_;
715 715
716 // Optional callback to notify of new tree activations. 716 // Optional callback to notify of new tree activations.
717 base::Closure tree_activation_callback_; 717 base::Closure tree_activation_callback_;
718 718
719 SharedBitmapManager* shared_bitmap_manager_; 719 SharedBitmapManager* shared_bitmap_manager_;
720 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 720 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
721 int id_; 721 int id_;
722 722
723 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 723 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
724 724
725 std::vector<PictureLayerImpl*> picture_layers_; 725 std::vector<PictureLayerImpl*> picture_layers_;
726 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; 726 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_;
727 727
728 bool requires_high_res_to_draw_; 728 bool requires_high_res_to_draw_;
729 bool required_for_draw_tile_is_top_of_raster_queue_; 729 bool required_for_draw_tile_is_top_of_raster_queue_;
730 730
731 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 731 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
732 }; 732 };
733 733
734 } // namespace cc 734 } // namespace cc
735 735
736 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 736 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698