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

Side by Side Diff: cc/layers/layer_impl.h

Issue 834343004: cc: Add frame timing request plumbing through the layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 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_LAYERS_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector>
10 11
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/values.h" 14 #include "base/values.h"
14 #include "cc/animation/animation_delegate.h" 15 #include "cc/animation/animation_delegate.h"
15 #include "cc/animation/layer_animation_controller.h" 16 #include "cc/animation/layer_animation_controller.h"
16 #include "cc/animation/layer_animation_value_observer.h" 17 #include "cc/animation/layer_animation_value_observer.h"
17 #include "cc/animation/layer_animation_value_provider.h" 18 #include "cc/animation/layer_animation_value_provider.h"
18 #include "cc/base/cc_export.h" 19 #include "cc/base/cc_export.h"
19 #include "cc/base/region.h" 20 #include "cc/base/region.h"
20 #include "cc/base/scoped_ptr_vector.h" 21 #include "cc/base/scoped_ptr_vector.h"
22 #include "cc/debug/frame_timing_request.h"
21 #include "cc/input/input_handler.h" 23 #include "cc/input/input_handler.h"
22 #include "cc/input/scrollbar.h" 24 #include "cc/input/scrollbar.h"
23 #include "cc/layers/draw_properties.h" 25 #include "cc/layers/draw_properties.h"
24 #include "cc/layers/layer_lists.h" 26 #include "cc/layers/layer_lists.h"
25 #include "cc/layers/layer_position_constraint.h" 27 #include "cc/layers/layer_position_constraint.h"
26 #include "cc/layers/render_surface_impl.h" 28 #include "cc/layers/render_surface_impl.h"
27 #include "cc/output/filter_operations.h" 29 #include "cc/output/filter_operations.h"
28 #include "cc/quads/shared_quad_state.h" 30 #include "cc/quads/shared_quad_state.h"
29 #include "cc/resources/resource_provider.h" 31 #include "cc/resources/resource_provider.h"
30 #include "skia/ext/refptr.h" 32 #include "skia/ext/refptr.h"
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark); 564 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark);
563 565
564 virtual void SetDebugInfo( 566 virtual void SetDebugInfo(
565 scoped_refptr<base::debug::ConvertableToTraceFormat> other); 567 scoped_refptr<base::debug::ConvertableToTraceFormat> other);
566 568
567 bool IsDrawnRenderSurfaceLayerListMember() const; 569 bool IsDrawnRenderSurfaceLayerListMember() const;
568 570
569 void Set3dSortingContextId(int id); 571 void Set3dSortingContextId(int id);
570 int sorting_context_id() { return sorting_context_id_; } 572 int sorting_context_id() { return sorting_context_id_; }
571 573
574 void SetFrameTimingRequests(
575 const std::vector<FrameTimingRequest>& frame_timing_requests);
576 const std::vector<FrameTimingRequest>& frame_timing_requests() const {
577 return frame_timing_requests_;
578 }
579
572 protected: 580 protected:
573 LayerImpl(LayerTreeImpl* layer_impl, int id); 581 LayerImpl(LayerTreeImpl* layer_impl, int id);
574 582
575 // Get the color and size of the layer's debug border. 583 // Get the color and size of the layer's debug border.
576 virtual void GetDebugBorderProperties(SkColor* color, float* width) const; 584 virtual void GetDebugBorderProperties(SkColor* color, float* width) const;
577 585
578 void AppendDebugBorderQuad(RenderPass* render_pass, 586 void AppendDebugBorderQuad(RenderPass* render_pass,
579 const gfx::Size& content_bounds, 587 const gfx::Size& content_bounds,
580 const SharedQuadState* shared_quad_state, 588 const SharedQuadState* shared_quad_state,
581 AppendQuadsData* append_quads_data) const; 589 AppendQuadsData* append_quads_data) const;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 scoped_ptr<ScrollbarSet> scrollbars_; 725 scoped_ptr<ScrollbarSet> scrollbars_;
718 726
719 ScopedPtrVector<CopyOutputRequest> copy_requests_; 727 ScopedPtrVector<CopyOutputRequest> copy_requests_;
720 728
721 // Group of properties that need to be computed based on the layer tree 729 // Group of properties that need to be computed based on the layer tree
722 // hierarchy before layers can be drawn. 730 // hierarchy before layers can be drawn.
723 DrawProperties<LayerImpl> draw_properties_; 731 DrawProperties<LayerImpl> draw_properties_;
724 732
725 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; 733 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_;
726 scoped_ptr<RenderSurfaceImpl> render_surface_; 734 scoped_ptr<RenderSurfaceImpl> render_surface_;
735
736 std::vector<FrameTimingRequest> frame_timing_requests_;
737 bool frame_timing_requests_dirty_;
738
727 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 739 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
728 }; 740 };
729 741
730 } // namespace cc 742 } // namespace cc
731 743
732 #endif // CC_LAYERS_LAYER_IMPL_H_ 744 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698