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

Side by Side Diff: ui/compositor/layer.h

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Rebased to resolve conflict. Created 3 years, 4 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 | « components/viz/service/display/surface_aggregator_unittest.cc ('k') | ui/compositor/layer.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_COMPOSITOR_LAYER_H_ 5 #ifndef UI_COMPOSITOR_LAYER_H_
6 #define UI_COMPOSITOR_LAYER_H_ 6 #define UI_COMPOSITOR_LAYER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 void SwitchCCLayerForTest(); 411 void SwitchCCLayerForTest();
412 412
413 const cc::Region& damaged_region_for_testing() const { 413 const cc::Region& damaged_region_for_testing() const {
414 return damaged_region_; 414 return damaged_region_;
415 } 415 }
416 416
417 const gfx::Size& frame_size_in_dip_for_testing() const { 417 const gfx::Size& frame_size_in_dip_for_testing() const {
418 return frame_size_in_dip_; 418 return frame_size_in_dip_;
419 } 419 }
420 420
421 // Force use of and cache render surface. Note that this also disables
422 // occlusion culling in favor of efficient caching. This should
423 // only be used when paying the cost of creating a render
424 // surface even if layer is invisible is not a problem.
425 void SetCacheRenderSurface(bool cache_render_surface);
426
421 private: 427 private:
422 friend class LayerOwner; 428 friend class LayerOwner;
423 class LayerMirror; 429 class LayerMirror;
424 430
425 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); 431 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators);
426 432
427 // Stacks |child| above or below |other|. Helper method for StackAbove() and 433 // Stacks |child| above or below |other|. Helper method for StackAbove() and
428 // StackBelow(). 434 // StackBelow().
429 void StackRelativeTo(Layer* child, Layer* other, bool above); 435 void StackRelativeTo(Layer* child, Layer* other, bool above);
430 436
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 // The size of the frame or texture in DIP, set when SetShowDelegatedContent 588 // The size of the frame or texture in DIP, set when SetShowDelegatedContent
583 // or SetTextureMailbox was called. 589 // or SetTextureMailbox was called.
584 gfx::Size frame_size_in_dip_; 590 gfx::Size frame_size_in_dip_;
585 591
586 DISALLOW_COPY_AND_ASSIGN(Layer); 592 DISALLOW_COPY_AND_ASSIGN(Layer);
587 }; 593 };
588 594
589 } // namespace ui 595 } // namespace ui
590 596
591 #endif // UI_COMPOSITOR_LAYER_H_ 597 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW
« no previous file with comments | « components/viz/service/display/surface_aggregator_unittest.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698