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

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

Issue 2317953002: cc: Merge the DrawLayer()/DrawFrame() and SwapBuffers() methods. (Closed)
Patch Set: merge-draw-swap-2: rebase Created 4 years, 3 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/layer_tree_test.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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <bitset> 10 #include <bitset>
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 gfx::ScrollOffset GetScrollOffsetForAnimation( 302 gfx::ScrollOffset GetScrollOffsetForAnimation(
303 ElementId element_id) const override; 303 ElementId element_id) const override;
304 304
305 virtual bool PrepareTiles(); 305 virtual bool PrepareTiles();
306 306
307 // Returns DRAW_SUCCESS unless problems occured preparing the frame, and we 307 // Returns DRAW_SUCCESS unless problems occured preparing the frame, and we
308 // should try to avoid displaying the frame. If PrepareToDraw is called, 308 // should try to avoid displaying the frame. If PrepareToDraw is called,
309 // DidDrawAllLayers must also be called, regardless of whether DrawLayers is 309 // DidDrawAllLayers must also be called, regardless of whether DrawLayers is
310 // called between the two. 310 // called between the two.
311 virtual DrawResult PrepareToDraw(FrameData* frame); 311 virtual DrawResult PrepareToDraw(FrameData* frame);
312 void DrawLayers(FrameData* frame); 312 virtual bool DrawLayers(FrameData* frame);
313 // Must be called if and only if PrepareToDraw was called. 313 // Must be called if and only if PrepareToDraw was called.
314 void DidDrawAllLayers(const FrameData& frame); 314 void DidDrawAllLayers(const FrameData& frame);
315 315
316 const LayerTreeSettings& settings() const { return settings_; } 316 const LayerTreeSettings& settings() const { return settings_; }
317 317
318 // Evict all textures by enforcing a memory policy with an allocation of 0. 318 // Evict all textures by enforcing a memory policy with an allocation of 0.
319 void EvictTexturesForTesting(); 319 void EvictTexturesForTesting();
320 320
321 // When blocking, this prevents client_->NotifyReadyToActivate() from being 321 // When blocking, this prevents client_->NotifyReadyToActivate() from being
322 // called. When disabled, it calls client_->NotifyReadyToActivate() 322 // called. When disabled, it calls client_->NotifyReadyToActivate()
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 413
414 bool create_low_res_tiling() const { 414 bool create_low_res_tiling() const {
415 return settings_.create_low_res_tiling && !use_gpu_rasterization_; 415 return settings_.create_low_res_tiling && !use_gpu_rasterization_;
416 } 416 }
417 ResourcePool* resource_pool() { return resource_pool_.get(); } 417 ResourcePool* resource_pool() { return resource_pool_.get(); }
418 DelegatingRenderer* renderer() { return renderer_.get(); } 418 DelegatingRenderer* renderer() { return renderer_.get(); }
419 ImageDecodeController* image_decode_controller() { 419 ImageDecodeController* image_decode_controller() {
420 return image_decode_controller_.get(); 420 return image_decode_controller_.get();
421 } 421 }
422 422
423 virtual bool SwapBuffers(const FrameData& frame);
424 virtual void WillBeginImplFrame(const BeginFrameArgs& args); 423 virtual void WillBeginImplFrame(const BeginFrameArgs& args);
425 virtual void DidFinishImplFrame(); 424 virtual void DidFinishImplFrame();
426 void DidModifyTilePriorities(); 425 void DidModifyTilePriorities();
427 426
428 LayerTreeImpl* active_tree() { return active_tree_.get(); } 427 LayerTreeImpl* active_tree() { return active_tree_.get(); }
429 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } 428 const LayerTreeImpl* active_tree() const { return active_tree_.get(); }
430 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } 429 LayerTreeImpl* pending_tree() { return pending_tree_.get(); }
431 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } 430 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); }
432 LayerTreeImpl* recycle_tree() { return recycle_tree_.get(); } 431 LayerTreeImpl* recycle_tree() { return recycle_tree_.get(); }
433 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } 432 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); }
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 851
853 std::unique_ptr<PendingTreeDurationHistogramTimer> 852 std::unique_ptr<PendingTreeDurationHistogramTimer>
854 pending_tree_duration_timer_; 853 pending_tree_duration_timer_;
855 854
856 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 855 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
857 }; 856 };
858 857
859 } // namespace cc 858 } // namespace cc
860 859
861 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 860 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698