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

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

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

Powered by Google App Engine
This is Rietveld 408576698