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

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

Issue 16304003: Unified OutputSurface::SwapBuffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to 205473 Created 7 years, 6 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.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/layer_scroll_offset_delegate.h" 18 #include "cc/input/layer_scroll_offset_delegate.h"
19 #include "cc/input/top_controls_manager_client.h" 19 #include "cc/input/top_controls_manager_client.h"
20 #include "cc/layers/layer_lists.h" 20 #include "cc/layers/layer_lists.h"
21 #include "cc/layers/render_pass_sink.h" 21 #include "cc/layers/render_pass_sink.h"
22 #include "cc/output/output_surface_client.h" 22 #include "cc/output/output_surface_client.h"
23 #include "cc/output/renderer.h" 23 #include "cc/output/renderer.h"
24 #include "cc/quads/render_pass.h" 24 #include "cc/quads/render_pass.h"
25 #include "cc/resources/tile_manager.h" 25 #include "cc/resources/tile_manager.h"
26 #include "skia/ext/refptr.h" 26 #include "skia/ext/refptr.h"
27 #include "third_party/skia/include/core/SkColor.h" 27 #include "third_party/skia/include/core/SkColor.h"
28 #include "third_party/skia/include/core/SkPicture.h" 28 #include "third_party/skia/include/core/SkPicture.h"
29 #include "ui/base/latency_info.h"
30 #include "ui/gfx/rect.h" 29 #include "ui/gfx/rect.h"
31 30
32 namespace cc { 31 namespace cc {
33 32
34 class CompletionEvent; 33 class CompletionEvent;
35 class CompositorFrameMetadata; 34 class CompositorFrameMetadata;
36 class DebugRectHistory; 35 class DebugRectHistory;
37 class FrameRateCounter; 36 class FrameRateCounter;
38 class LayerImpl; 37 class LayerImpl;
39 class LayerTreeHostImplTimeSourceAdapter; 38 class LayerTreeHostImplTimeSourceAdapter;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 virtual ~FrameData(); 138 virtual ~FrameData();
140 139
141 std::vector<gfx::Rect> occluding_screen_space_rects; 140 std::vector<gfx::Rect> occluding_screen_space_rects;
142 std::vector<gfx::Rect> non_occluding_screen_space_rects; 141 std::vector<gfx::Rect> non_occluding_screen_space_rects;
143 RenderPassList render_passes; 142 RenderPassList render_passes;
144 RenderPassIdHashMap render_passes_by_id; 143 RenderPassIdHashMap render_passes_by_id;
145 const LayerImplList* render_surface_layer_list; 144 const LayerImplList* render_surface_layer_list;
146 LayerImplList will_draw_layers; 145 LayerImplList will_draw_layers;
147 bool contains_incomplete_tile; 146 bool contains_incomplete_tile;
148 bool has_no_damage; 147 bool has_no_damage;
149 ui::LatencyInfo latency_info;
150 148
151 // RenderPassSink implementation. 149 // RenderPassSink implementation.
152 virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE; 150 virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE;
153 }; 151 };
154 152
155 virtual void BeginCommit(); 153 virtual void BeginCommit();
156 virtual void CommitComplete(); 154 virtual void CommitComplete();
157 virtual void Animate(base::TimeTicks monotonic_time, 155 virtual void Animate(base::TimeTicks monotonic_time,
158 base::Time wall_clock_time); 156 base::Time wall_clock_time);
159 virtual void UpdateAnimationState(bool start_ready_animations); 157 virtual void UpdateAnimationState(bool start_ready_animations);
(...skipping 19 matching lines...) Expand all
179 // the URL bar and non-overlay scrollbars. 177 // the URL bar and non-overlay scrollbars.
180 gfx::SizeF VisibleViewportSize() const; 178 gfx::SizeF VisibleViewportSize() const;
181 179
182 // RendererClient implementation 180 // RendererClient implementation
183 virtual gfx::Rect DeviceViewport() const OVERRIDE; 181 virtual gfx::Rect DeviceViewport() const OVERRIDE;
184 private: 182 private:
185 virtual float DeviceScaleFactor() const OVERRIDE; 183 virtual float DeviceScaleFactor() const OVERRIDE;
186 virtual const LayerTreeSettings& Settings() const OVERRIDE; 184 virtual const LayerTreeSettings& Settings() const OVERRIDE;
187 public: 185 public:
188 virtual void DidLoseOutputSurface() OVERRIDE; 186 virtual void DidLoseOutputSurface() OVERRIDE;
189 virtual void OnSwapBuffersComplete() OVERRIDE; 187 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) OVERRIDE;
190 virtual void SetFullRootLayerDamage() OVERRIDE; 188 virtual void SetFullRootLayerDamage() OVERRIDE;
191 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy) 189 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
192 OVERRIDE; 190 OVERRIDE;
193 virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) 191 virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
194 OVERRIDE; 192 OVERRIDE;
195 virtual bool HasImplThread() const OVERRIDE; 193 virtual bool HasImplThread() const OVERRIDE;
196 virtual bool ShouldClearRootRenderPass() const OVERRIDE; 194 virtual bool ShouldClearRootRenderPass() const OVERRIDE;
197 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE; 195 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE;
198 virtual bool AllowPartialSwap() const OVERRIDE; 196 virtual bool AllowPartialSwap() const OVERRIDE;
199 197
200 // TileManagerClient implementation. 198 // TileManagerClient implementation.
201 virtual void DidInitializeVisibleTile() OVERRIDE; 199 virtual void DidInitializeVisibleTile() OVERRIDE;
202 virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const 200 virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const
203 OVERRIDE; 201 OVERRIDE;
204 202
205 // OutputSurfaceClient implementation. 203 // OutputSurfaceClient implementation.
206 virtual bool DeferredInitialize( 204 virtual bool DeferredInitialize(
207 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; 205 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE;
208 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE; 206 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE;
209 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, 207 virtual void OnVSyncParametersChanged(base::TimeTicks timebase,
210 base::TimeDelta interval) OVERRIDE; 208 base::TimeDelta interval) OVERRIDE;
211 virtual void BeginFrame(base::TimeTicks frame_time) 209 virtual void BeginFrame(base::TimeTicks frame_time)
212 OVERRIDE; 210 OVERRIDE;
213 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack)
214 OVERRIDE;
215 virtual void SetExternalDrawConstraints(const gfx::Transform& transform, 211 virtual void SetExternalDrawConstraints(const gfx::Transform& transform,
216 gfx::Rect viewport) OVERRIDE; 212 gfx::Rect viewport) OVERRIDE;
217 213
218 // Called from LayerTreeImpl. 214 // Called from LayerTreeImpl.
219 void OnCanDrawStateChangedForTree(); 215 void OnCanDrawStateChangedForTree();
220 216
221 // Implementation 217 // Implementation
222 bool CanDraw(); 218 bool CanDraw();
223 OutputSurface* output_surface() const { return output_surface_.get(); } 219 OutputSurface* output_surface() const { return output_surface_.get(); }
224 220
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 scoped_ptr<AnimationRegistrar> animation_registrar_; 531 scoped_ptr<AnimationRegistrar> animation_registrar_;
536 532
537 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 533 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
538 534
539 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 535 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
540 }; 536 };
541 537
542 } // namespace cc 538 } // namespace cc
543 539
544 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 540 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698