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

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

Issue 376683004: Pass resourceless software mode in BeginFrameArgs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix accidental header modification Created 6 years, 5 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
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 <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // called. When disabled, it calls client_->NotifyReadyToActivate() 206 // called. When disabled, it calls client_->NotifyReadyToActivate()
207 // immediately if any notifications had been blocked while blocking. 207 // immediately if any notifications had been blocked while blocking.
208 virtual void BlockNotifyReadyToActivateForTesting(bool block); 208 virtual void BlockNotifyReadyToActivateForTesting(bool block);
209 209
210 // This allows us to inject DidInitializeVisibleTile events for testing. 210 // This allows us to inject DidInitializeVisibleTile events for testing.
211 void DidInitializeVisibleTileForTesting(); 211 void DidInitializeVisibleTileForTesting();
212 212
213 // Resets all of the trees to an empty state. 213 // Resets all of the trees to an empty state.
214 void ResetTreesForTesting(); 214 void ResetTreesForTesting();
215 215
216 bool device_viewport_valid_for_tile_management() const { 216 DrawMode GetDrawMode() const;
217 return device_viewport_valid_for_tile_management_;
218 }
219 217
220 // Viewport size in draw space: this size is in physical pixels and is used 218 // Viewport size in draw space: this size is in physical pixels and is used
221 // for draw properties, tilings, quads and render passes. 219 // for draw properties, tilings, quads and render passes.
222 gfx::Size DrawViewportSize() const; 220 gfx::Size DrawViewportSize() const;
223 221
224 // Viewport size for scrolling and fixed-position compensation. This value 222 // Viewport size for scrolling and fixed-position compensation. This value
225 // excludes the URL bar and non-overlay scrollbars and is in DIP (and 223 // excludes the URL bar and non-overlay scrollbars and is in DIP (and
226 // invariant relative to page scale). 224 // invariant relative to page scale).
227 gfx::SizeF UnscaledScrollableViewportSize() const; 225 gfx::SizeF UnscaledScrollableViewportSize() const;
228 float VerticalAdjust() const; 226 float VerticalAdjust() const;
(...skipping 16 matching lines...) Expand all
245 virtual void DeferredInitialize() OVERRIDE; 243 virtual void DeferredInitialize() OVERRIDE;
246 virtual void ReleaseGL() OVERRIDE; 244 virtual void ReleaseGL() OVERRIDE;
247 virtual void CommitVSyncParameters(base::TimeTicks timebase, 245 virtual void CommitVSyncParameters(base::TimeTicks timebase,
248 base::TimeDelta interval) OVERRIDE; 246 base::TimeDelta interval) OVERRIDE;
249 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; 247 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE;
250 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; 248 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE;
251 virtual void SetExternalDrawConstraints( 249 virtual void SetExternalDrawConstraints(
252 const gfx::Transform& transform, 250 const gfx::Transform& transform,
253 const gfx::Rect& viewport, 251 const gfx::Rect& viewport,
254 const gfx::Rect& clip, 252 const gfx::Rect& clip,
255 bool valid_for_tile_management) OVERRIDE; 253 bool resourceless_software_draw) OVERRIDE;
256 virtual void DidLoseOutputSurface() OVERRIDE; 254 virtual void DidLoseOutputSurface() OVERRIDE;
257 virtual void DidSwapBuffers() OVERRIDE; 255 virtual void DidSwapBuffers() OVERRIDE;
258 virtual void DidSwapBuffersComplete() OVERRIDE; 256 virtual void DidSwapBuffersComplete() OVERRIDE;
259 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; 257 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE;
260 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; 258 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE;
261 virtual void SetTreeActivationCallback(const base::Closure& callback) 259 virtual void SetTreeActivationCallback(const base::Closure& callback)
262 OVERRIDE; 260 OVERRIDE;
263 261
264 // Called from LayerTreeImpl. 262 // Called from LayerTreeImpl.
265 void OnCanDrawStateChangedForTree(); 263 void OnCanDrawStateChangedForTree();
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 float overdraw_bottom_height_; 650 float overdraw_bottom_height_;
653 651
654 // Optional top-level constraints that can be set by the OutputSurface. 652 // Optional top-level constraints that can be set by the OutputSurface.
655 // - external_transform_ applies a transform above the root layer 653 // - external_transform_ applies a transform above the root layer
656 // - external_viewport_ is used DrawProperties, tile management and 654 // - external_viewport_ is used DrawProperties, tile management and
657 // glViewport/window projection matrix. 655 // glViewport/window projection matrix.
658 // - external_clip_ specifies a top-level clip rect 656 // - external_clip_ specifies a top-level clip rect
659 gfx::Transform external_transform_; 657 gfx::Transform external_transform_;
660 gfx::Rect external_viewport_; 658 gfx::Rect external_viewport_;
661 gfx::Rect external_clip_; 659 gfx::Rect external_clip_;
662 bool device_viewport_valid_for_tile_management_; 660 bool resourceless_software_draw_;
663 661
664 gfx::Rect viewport_damage_rect_; 662 gfx::Rect viewport_damage_rect_;
665 663
666 base::TimeTicks current_frame_timeticks_; 664 base::TimeTicks current_frame_timeticks_;
667 665
668 // Expected time between two begin impl frame calls. 666 // Expected time between two begin impl frame calls.
669 base::TimeDelta begin_impl_frame_interval_; 667 base::TimeDelta begin_impl_frame_interval_;
670 668
671 scoped_ptr<AnimationRegistrar> animation_registrar_; 669 scoped_ptr<AnimationRegistrar> animation_registrar_;
672 670
(...skipping 16 matching lines...) Expand all
689 size_t transfer_buffer_memory_limit_; 687 size_t transfer_buffer_memory_limit_;
690 688
691 std::vector<PictureLayerImpl*> picture_layers_; 689 std::vector<PictureLayerImpl*> picture_layers_;
692 690
693 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 691 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
694 }; 692 };
695 693
696 } // namespace cc 694 } // namespace cc
697 695
698 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 696 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698