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

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: Rebase onto dependent patches. Created 5 years, 7 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 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 <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 15 matching lines...) Expand all
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/resources/ui_resource_client.h" 35 #include "cc/resources/ui_resource_client.h"
36 #include "cc/scheduler/begin_frame_tracker.h"
36 #include "cc/scheduler/commit_earlyout_reason.h" 37 #include "cc/scheduler/commit_earlyout_reason.h"
37 #include "cc/scheduler/draw_result.h" 38 #include "cc/scheduler/draw_result.h"
38 #include "cc/scheduler/video_frame_controller.h" 39 #include "cc/scheduler/video_frame_controller.h"
39 #include "cc/trees/layer_tree_settings.h" 40 #include "cc/trees/layer_tree_settings.h"
40 #include "cc/trees/proxy.h" 41 #include "cc/trees/proxy.h"
41 #include "skia/ext/refptr.h" 42 #include "skia/ext/refptr.h"
42 #include "third_party/skia/include/core/SkColor.h" 43 #include "third_party/skia/include/core/SkColor.h"
43 #include "ui/gfx/geometry/rect.h" 44 #include "ui/gfx/geometry/rect.h"
44 45
45 namespace gfx { 46 namespace gfx {
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 437
437 gfx::Vector2dF accumulated_root_overscroll() const { 438 gfx::Vector2dF accumulated_root_overscroll() const {
438 return accumulated_root_overscroll_; 439 return accumulated_root_overscroll_;
439 } 440 }
440 441
441 bool pinch_gesture_active() const { return pinch_gesture_active_; } 442 bool pinch_gesture_active() const { return pinch_gesture_active_; }
442 443
443 void SetTreePriority(TreePriority priority); 444 void SetTreePriority(TreePriority priority);
444 TreePriority GetTreePriority() const; 445 TreePriority GetTreePriority() const;
445 446
447 // TODO(mithro): Remove this methods which exposes the internal
448 // BeginFrameArgs to external callers.
446 virtual BeginFrameArgs CurrentBeginFrameArgs() const; 449 virtual BeginFrameArgs CurrentBeginFrameArgs() const;
447 450
448 // Expected time between two begin impl frame calls. 451 // Expected time between two begin impl frame calls.
449 base::TimeDelta begin_impl_frame_interval() const { 452 base::TimeDelta CurrentBeginFrameInterval() const;
450 return begin_impl_frame_interval_;
451 }
452 453
453 void AsValueWithFrameInto(FrameData* frame, 454 void AsValueWithFrameInto(FrameData* frame,
454 base::trace_event::TracedValue* value) const; 455 base::trace_event::TracedValue* value) const;
455 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValueWithFrame( 456 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValueWithFrame(
456 FrameData* frame) const; 457 FrameData* frame) const;
457 void ActivationStateAsValueInto(base::trace_event::TracedValue* value) const; 458 void ActivationStateAsValueInto(base::trace_event::TracedValue* value) const;
458 459
459 bool page_scale_animation_active() const { return !!page_scale_animation_; } 460 bool page_scale_animation_active() const { return !!page_scale_animation_; }
460 461
461 virtual void CreateUIResource(UIResourceId uid, 462 virtual void CreateUIResource(UIResourceId uid,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 bool is_likely_to_require_a_draw() const { 551 bool is_likely_to_require_a_draw() const {
551 return is_likely_to_require_a_draw_; 552 return is_likely_to_require_a_draw_;
552 } 553 }
553 554
554 // Removes empty or orphan RenderPasses from the frame. 555 // Removes empty or orphan RenderPasses from the frame.
555 static void RemoveRenderPasses(FrameData* frame); 556 static void RemoveRenderPasses(FrameData* frame);
556 557
557 LayerTreeHostImplClient* client_; 558 LayerTreeHostImplClient* client_;
558 Proxy* proxy_; 559 Proxy* proxy_;
559 560
561 BeginFrameTracker current_begin_frame_tracker_;
562
560 private: 563 private:
561 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( 564 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta(
562 LayerImpl* layer_impl, 565 LayerImpl* layer_impl,
563 const gfx::PointF& viewport_point, 566 const gfx::PointF& viewport_point,
564 const gfx::Vector2dF& viewport_delta); 567 const gfx::Vector2dF& viewport_delta);
565 568
566 void CreateAndSetRenderer(); 569 void CreateAndSetRenderer();
567 void CreateAndSetTileManager(); 570 void CreateAndSetTileManager();
568 void DestroyTileManager(); 571 void DestroyTileManager();
569 void ReleaseTreeResources(); 572 void ReleaseTreeResources();
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 // - viewport_rect_for_tile_priority_ is the rect in view space used for 722 // - viewport_rect_for_tile_priority_ is the rect in view space used for
720 // tiling priority. 723 // tiling priority.
721 gfx::Transform external_transform_; 724 gfx::Transform external_transform_;
722 gfx::Rect external_viewport_; 725 gfx::Rect external_viewport_;
723 gfx::Rect external_clip_; 726 gfx::Rect external_clip_;
724 gfx::Rect viewport_rect_for_tile_priority_; 727 gfx::Rect viewport_rect_for_tile_priority_;
725 bool resourceless_software_draw_; 728 bool resourceless_software_draw_;
726 729
727 gfx::Rect viewport_damage_rect_; 730 gfx::Rect viewport_damage_rect_;
728 731
729 BeginFrameArgs current_begin_frame_args_;
730
731 // Expected time between two begin impl frame calls.
732 base::TimeDelta begin_impl_frame_interval_;
733
734 scoped_ptr<AnimationRegistrar> animation_registrar_; 732 scoped_ptr<AnimationRegistrar> animation_registrar_;
735 std::set<ScrollbarAnimationController*> scrollbar_animation_controllers_; 733 std::set<ScrollbarAnimationController*> scrollbar_animation_controllers_;
736 std::set<VideoFrameController*> video_frame_controllers_; 734 std::set<VideoFrameController*> video_frame_controllers_;
737 735
738 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 736 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
739 MicroBenchmarkControllerImpl micro_benchmark_controller_; 737 MicroBenchmarkControllerImpl micro_benchmark_controller_;
740 scoped_ptr<TaskGraphRunner> single_thread_synchronous_task_graph_runner_; 738 scoped_ptr<TaskGraphRunner> single_thread_synchronous_task_graph_runner_;
741 739
742 // Optional callback to notify of new tree activations. 740 // Optional callback to notify of new tree activations.
743 base::Closure tree_activation_callback_; 741 base::Closure tree_activation_callback_;
(...skipping 12 matching lines...) Expand all
756 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; 754 scoped_ptr<FrameTimingTracker> frame_timing_tracker_;
757 755
758 scoped_ptr<Viewport> viewport_; 756 scoped_ptr<Viewport> viewport_;
759 757
760 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 758 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
761 }; 759 };
762 760
763 } // namespace cc 761 } // namespace cc
764 762
765 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 763 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698