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

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

Issue 13285002: cc: Consolidate LayerList types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl.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 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/time.h" 13 #include "base/time.h"
14 #include "cc/animation/animation_events.h" 14 #include "cc/animation/animation_events.h"
15 #include "cc/animation/animation_registrar.h" 15 #include "cc/animation/animation_registrar.h"
16 #include "cc/base/cc_export.h" 16 #include "cc/base/cc_export.h"
17 #include "cc/input/input_handler.h" 17 #include "cc/input/input_handler.h"
18 #include "cc/input/top_controls_manager_client.h" 18 #include "cc/input/top_controls_manager_client.h"
19 #include "cc/layers/layer_lists.h"
19 #include "cc/layers/render_pass_sink.h" 20 #include "cc/layers/render_pass_sink.h"
20 #include "cc/output/output_surface_client.h" 21 #include "cc/output/output_surface_client.h"
21 #include "cc/output/renderer.h" 22 #include "cc/output/renderer.h"
22 #include "cc/quads/render_pass.h" 23 #include "cc/quads/render_pass.h"
23 #include "cc/resources/tile_manager.h" 24 #include "cc/resources/tile_manager.h"
24 #include "skia/ext/refptr.h" 25 #include "skia/ext/refptr.h"
25 #include "third_party/skia/include/core/SkColor.h" 26 #include "third_party/skia/include/core/SkColor.h"
26 #include "third_party/skia/include/core/SkPicture.h" 27 #include "third_party/skia/include/core/SkPicture.h"
27 #include "ui/gfx/rect.h" 28 #include "ui/gfx/rect.h"
28 29
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 }; 77 };
77 78
78 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering 79 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering
79 // state. 80 // state.
80 class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient, 81 class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient,
81 public RendererClient, 82 public RendererClient,
82 public TileManagerClient, 83 public TileManagerClient,
83 public OutputSurfaceClient, 84 public OutputSurfaceClient,
84 public TopControlsManagerClient { 85 public TopControlsManagerClient {
85 public: 86 public:
86 typedef std::vector<LayerImpl*> LayerList;
87
88 static scoped_ptr<LayerTreeHostImpl> Create( 87 static scoped_ptr<LayerTreeHostImpl> Create(
89 const LayerTreeSettings& settings, 88 const LayerTreeSettings& settings,
90 LayerTreeHostImplClient* client, 89 LayerTreeHostImplClient* client,
91 Proxy* proxy, 90 Proxy* proxy,
92 RenderingStatsInstrumentation* rendering_stats_instrumentation); 91 RenderingStatsInstrumentation* rendering_stats_instrumentation);
93 virtual ~LayerTreeHostImpl(); 92 virtual ~LayerTreeHostImpl();
94 93
95 // InputHandlerClient implementation 94 // InputHandlerClient implementation
96 virtual InputHandlerClient::ScrollStatus ScrollBegin( 95 virtual InputHandlerClient::ScrollStatus ScrollBegin(
97 gfx::Point viewport_point, 96 gfx::Point viewport_point,
(...skipping 24 matching lines...) Expand all
122 void StartScrollbarAnimation(base::TimeTicks now); 121 void StartScrollbarAnimation(base::TimeTicks now);
123 122
124 struct CC_EXPORT FrameData : public RenderPassSink { 123 struct CC_EXPORT FrameData : public RenderPassSink {
125 FrameData(); 124 FrameData();
126 virtual ~FrameData(); 125 virtual ~FrameData();
127 126
128 std::vector<gfx::Rect> occluding_screen_space_rects; 127 std::vector<gfx::Rect> occluding_screen_space_rects;
129 std::vector<gfx::Rect> non_occluding_screen_space_rects; 128 std::vector<gfx::Rect> non_occluding_screen_space_rects;
130 RenderPassList render_passes; 129 RenderPassList render_passes;
131 RenderPassIdHashMap render_passes_by_id; 130 RenderPassIdHashMap render_passes_by_id;
132 const LayerList* render_surface_layer_list; 131 const LayerImplList* render_surface_layer_list;
133 LayerList will_draw_layers; 132 LayerImplList will_draw_layers;
134 bool contains_incomplete_tile; 133 bool contains_incomplete_tile;
135 134
136 // RenderPassSink implementation. 135 // RenderPassSink implementation.
137 virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE; 136 virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE;
138 }; 137 };
139 138
140 virtual void BeginCommit(); 139 virtual void BeginCommit();
141 virtual void CommitComplete(); 140 virtual void CommitComplete();
142 virtual void Animate(base::TimeTicks monotonic_time, 141 virtual void Animate(base::TimeTicks monotonic_time,
143 base::Time wall_clock_time); 142 base::Time wall_clock_time);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 void AnimateScrollbars(base::TimeTicks monotonic_time); 373 void AnimateScrollbars(base::TimeTicks monotonic_time);
375 void AnimateTopControls(base::TimeTicks monotonic_time); 374 void AnimateTopControls(base::TimeTicks monotonic_time);
376 375
377 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( 376 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta(
378 LayerImpl* layer_impl, 377 LayerImpl* layer_impl,
379 float scale_from_viewport_to_screen_space, 378 float scale_from_viewport_to_screen_space,
380 gfx::PointF viewport_point, 379 gfx::PointF viewport_point,
381 gfx::Vector2dF viewport_delta); 380 gfx::Vector2dF viewport_delta);
382 381
383 void UpdateMaxScrollOffset(); 382 void UpdateMaxScrollOffset();
384 void TrackDamageForAllSurfaces(LayerImpl* root_draw_layer, 383 void TrackDamageForAllSurfaces(
385 const LayerList& render_surface_layer_list); 384 LayerImpl* root_draw_layer,
385 const LayerImplList& render_surface_layer_list);
386 386
387 // Returns false if the frame should not be displayed. This function should 387 // Returns false if the frame should not be displayed. This function should
388 // only be called from PrepareToDraw, as DidDrawAllLayers must be called 388 // only be called from PrepareToDraw, as DidDrawAllLayers must be called
389 // if this helper function is called. 389 // if this helper function is called.
390 bool CalculateRenderPasses(FrameData* frame); 390 bool CalculateRenderPasses(FrameData* frame);
391 void SetBackgroundTickingEnabled(bool enabled); 391 void SetBackgroundTickingEnabled(bool enabled);
392 392
393 void SendDidLoseOutputSurfaceRecursive(LayerImpl* current); 393 void SendDidLoseOutputSurfaceRecursive(LayerImpl* current);
394 void ClearRenderSurfaces(); 394 void ClearRenderSurfaces();
395 bool EnsureRenderSurfaceLayerList(); 395 bool EnsureRenderSurfaceLayerList();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 scoped_ptr<AnimationRegistrar> animation_registrar_; 473 scoped_ptr<AnimationRegistrar> animation_registrar_;
474 474
475 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 475 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
476 476
477 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 477 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
478 }; 478 };
479 479
480 } // namespace cc 480 } // namespace cc
481 481
482 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 482 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698