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

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

Issue 15836005: cc: Emulate BeginFrame in OutputSurfaces that don't support it natively (Closed) Base URL: http://git.chromium.org/chromium/src.git@nofrc
Patch Set: Fix PRId64 for Windows 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 198
203 // OutputSurfaceClient implementation. 199 // OutputSurfaceClient implementation.
204 virtual bool DeferredInitialize( 200 virtual bool DeferredInitialize(
205 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; 201 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE;
206 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE; 202 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE;
207 virtual void OnVSyncParametersChanged(base::TimeTicks timebase,
208 base::TimeDelta interval) OVERRIDE;
209 virtual void BeginFrame(base::TimeTicks frame_time) 203 virtual void BeginFrame(base::TimeTicks frame_time)
210 OVERRIDE; 204 OVERRIDE;
211 virtual void SetExternalDrawConstraints(const gfx::Transform& transform, 205 virtual void SetExternalDrawConstraints(const gfx::Transform& transform,
212 gfx::Rect viewport) OVERRIDE; 206 gfx::Rect viewport) OVERRIDE;
207 virtual void DidLoseOutputSurface() OVERRIDE;
208 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) OVERRIDE;
213 209
214 // Called from LayerTreeImpl. 210 // Called from LayerTreeImpl.
215 void OnCanDrawStateChangedForTree(); 211 void OnCanDrawStateChangedForTree();
216 212
217 // Implementation 213 // Implementation
218 bool CanDraw(); 214 bool CanDraw();
219 OutputSurface* output_surface() const { return output_surface_.get(); } 215 OutputSurface* output_surface() const { return output_surface_.get(); }
220 216
221 std::string LayerTreeAsText() const; 217 std::string LayerTreeAsText() const;
222 std::string LayerTreeAsJson() const; 218 std::string LayerTreeAsJson() const;
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 scoped_ptr<AnimationRegistrar> animation_registrar_; 527 scoped_ptr<AnimationRegistrar> animation_registrar_;
532 528
533 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 529 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
534 530
535 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 531 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
536 }; 532 };
537 533
538 } // namespace cc 534 } // namespace cc
539 535
540 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 536 #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