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

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

Issue 16833003: cc: Emulate BeginFrame in OutputSurfaces that don't support it natively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « cc/test/scheduler_test_common.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
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 struct RendererCapabilities; 47 struct RendererCapabilities;
48 48
49 // LayerTreeHost->Proxy callback interface. 49 // LayerTreeHost->Proxy callback interface.
50 class LayerTreeHostImplClient { 50 class LayerTreeHostImplClient {
51 public: 51 public:
52 virtual void DidTryInitializeRendererOnImplThread( 52 virtual void DidTryInitializeRendererOnImplThread(
53 bool success, 53 bool success,
54 scoped_refptr<ContextProvider> offscreen_context_provider) = 0; 54 scoped_refptr<ContextProvider> offscreen_context_provider) = 0;
55 virtual void DidLoseOutputSurfaceOnImplThread() = 0; 55 virtual void DidLoseOutputSurfaceOnImplThread() = 0;
56 virtual void OnSwapBuffersCompleteOnImplThread() = 0; 56 virtual void OnSwapBuffersCompleteOnImplThread() = 0;
57 virtual void OnVSyncParametersChanged(base::TimeTicks timebase,
58 base::TimeDelta interval) = 0;
59 virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) = 0; 57 virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) = 0;
60 virtual void OnCanDrawStateChanged(bool can_draw) = 0; 58 virtual void OnCanDrawStateChanged(bool can_draw) = 0;
61 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) = 0; 59 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) = 0;
62 virtual void SetNeedsRedrawOnImplThread() = 0; 60 virtual void SetNeedsRedrawOnImplThread() = 0;
63 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) = 0; 61 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) = 0;
64 virtual void DidInitializeVisibleTileOnImplThread() = 0; 62 virtual void DidInitializeVisibleTileOnImplThread() = 0;
65 virtual void SetNeedsCommitOnImplThread() = 0; 63 virtual void SetNeedsCommitOnImplThread() = 0;
66 virtual void PostAnimationEventsToMainThreadOnImplThread( 64 virtual void PostAnimationEventsToMainThreadOnImplThread(
67 scoped_ptr<AnimationEventsVector> events, 65 scoped_ptr<AnimationEventsVector> events,
68 base::Time wall_clock_time) = 0; 66 base::Time wall_clock_time) = 0;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // Returns the currently visible viewport size in DIP. This value excludes 174 // Returns the currently visible viewport size in DIP. This value excludes
177 // the URL bar and non-overlay scrollbars. 175 // the URL bar and non-overlay scrollbars.
178 gfx::SizeF VisibleViewportSize() const; 176 gfx::SizeF VisibleViewportSize() const;
179 177
180 // RendererClient implementation 178 // RendererClient implementation
181 virtual gfx::Rect DeviceViewport() const OVERRIDE; 179 virtual gfx::Rect DeviceViewport() const OVERRIDE;
182 private: 180 private:
183 virtual float DeviceScaleFactor() const OVERRIDE; 181 virtual float DeviceScaleFactor() const OVERRIDE;
184 virtual const LayerTreeSettings& Settings() const OVERRIDE; 182 virtual const LayerTreeSettings& Settings() const OVERRIDE;
185 public: 183 public:
186 virtual void DidLoseOutputSurface() OVERRIDE;
187 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) OVERRIDE;
188 virtual void SetFullRootLayerDamage() OVERRIDE; 184 virtual void SetFullRootLayerDamage() OVERRIDE;
189 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy) 185 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
190 OVERRIDE; 186 OVERRIDE;
191 virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) 187 virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
192 OVERRIDE; 188 OVERRIDE;
193 virtual bool HasImplThread() const OVERRIDE; 189 virtual bool HasImplThread() const OVERRIDE;
194 virtual bool ShouldClearRootRenderPass() const OVERRIDE; 190 virtual bool ShouldClearRootRenderPass() const OVERRIDE;
195 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE; 191 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE;
196 virtual bool AllowPartialSwap() const OVERRIDE; 192 virtual bool AllowPartialSwap() const OVERRIDE;
197 193
198 // TileManagerClient implementation. 194 // TileManagerClient implementation.
199 virtual void DidInitializeVisibleTile() OVERRIDE; 195 virtual void DidInitializeVisibleTile() OVERRIDE;
200 virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const 196 virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const
201 OVERRIDE; 197 OVERRIDE;
202 virtual void NotifyReadyToActivate() OVERRIDE; 198 virtual void NotifyReadyToActivate() OVERRIDE;
203 199
204 // OutputSurfaceClient implementation. 200 // OutputSurfaceClient implementation.
205 virtual bool DeferredInitialize( 201 virtual bool DeferredInitialize(
206 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; 202 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE;
207 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE; 203 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE;
208 virtual void OnVSyncParametersChanged(base::TimeTicks timebase,
209 base::TimeDelta interval) OVERRIDE;
210 virtual void BeginFrame(base::TimeTicks frame_time) 204 virtual void BeginFrame(base::TimeTicks frame_time)
211 OVERRIDE; 205 OVERRIDE;
212 virtual void SetExternalDrawConstraints(const gfx::Transform& transform, 206 virtual void SetExternalDrawConstraints(const gfx::Transform& transform,
213 gfx::Rect viewport) OVERRIDE; 207 gfx::Rect viewport) OVERRIDE;
208 virtual void DidLoseOutputSurface() OVERRIDE;
209 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) OVERRIDE;
214 210
215 // Called from LayerTreeImpl. 211 // Called from LayerTreeImpl.
216 void OnCanDrawStateChangedForTree(); 212 void OnCanDrawStateChangedForTree();
217 213
218 // Implementation 214 // Implementation
219 bool CanDraw(); 215 bool CanDraw();
220 OutputSurface* output_surface() const { return output_surface_.get(); } 216 OutputSurface* output_surface() const { return output_surface_.get(); }
221 217
222 std::string LayerTreeAsText() const; 218 std::string LayerTreeAsText() const;
223 std::string LayerTreeAsJson() const; 219 std::string LayerTreeAsJson() const;
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 scoped_ptr<AnimationRegistrar> animation_registrar_; 528 scoped_ptr<AnimationRegistrar> animation_registrar_;
533 529
534 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 530 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
535 531
536 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 532 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
537 }; 533 };
538 534
539 } // namespace cc 535 } // namespace cc
540 536
541 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 537 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/test/scheduler_test_common.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698