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

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

Issue 1868003002: cc: Move RenderTarget Information to Effect Tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/trees/layer_tree_impl.cc ('k') | cc/trees/occlusion_tracker.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 CC_TREES_OCCLUSION_TRACKER_H_ 5 #ifndef CC_TREES_OCCLUSION_TRACKER_H_
6 #define CC_TREES_OCCLUSION_TRACKER_H_ 6 #define CC_TREES_OCCLUSION_TRACKER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 30 matching lines...) Expand all
41 const gfx::Transform& draw_transform) const; 41 const gfx::Transform& draw_transform) const;
42 42
43 // Called at the beginning of each step in the LayerIterator's front-to-back 43 // Called at the beginning of each step in the LayerIterator's front-to-back
44 // traversal. 44 // traversal.
45 void EnterLayer(const LayerIteratorPosition& layer_iterator); 45 void EnterLayer(const LayerIteratorPosition& layer_iterator);
46 // Called at the end of each step in the LayerIterator's front-to-back 46 // Called at the end of each step in the LayerIterator's front-to-back
47 // traversal. 47 // traversal.
48 void LeaveLayer(const LayerIteratorPosition& layer_iterator); 48 void LeaveLayer(const LayerIteratorPosition& layer_iterator);
49 49
50 // Gives the region of the screen that is not occluded by something opaque. 50 // Gives the region of the screen that is not occluded by something opaque.
51 Region ComputeVisibleRegionInScreen() const; 51 Region ComputeVisibleRegionInScreen(const LayerTreeImpl* layer_tree) const;
52 52
53 void set_minimum_tracking_size(const gfx::Size& size) { 53 void set_minimum_tracking_size(const gfx::Size& size) {
54 minimum_tracking_size_ = size; 54 minimum_tracking_size_ = size;
55 } 55 }
56 56
57 protected: 57 protected:
58 struct StackObject { 58 struct StackObject {
59 StackObject() : target(0) {} 59 StackObject() : target(0) {}
60 explicit StackObject(const LayerImpl* target) : target(target) {} 60 explicit StackObject(const RenderSurfaceImpl* target) : target(target) {}
61 const LayerImpl* target; 61 const RenderSurfaceImpl* target;
62 SimpleEnclosedRegion occlusion_from_outside_target; 62 SimpleEnclosedRegion occlusion_from_outside_target;
63 SimpleEnclosedRegion occlusion_from_inside_target; 63 SimpleEnclosedRegion occlusion_from_inside_target;
64 }; 64 };
65 65
66 // The stack holds occluded regions for subtrees in the 66 // The stack holds occluded regions for subtrees in the
67 // RenderSurfaceImpl-Layer tree, so that when we leave a subtree we may apply 67 // RenderSurfaceImpl-Layer tree, so that when we leave a subtree we may apply
68 // a mask to it, but not to the parts outside the subtree. 68 // a mask to it, but not to the parts outside the subtree.
69 // - The first time we see a new subtree under a target, we add that target to 69 // - The first time we see a new subtree under a target, we add that target to
70 // the top of the stack. This can happen as a layer representing itself, or as 70 // the top of the stack. This can happen as a layer representing itself, or as
71 // a target surface. 71 // a target surface.
(...skipping 29 matching lines...) Expand all
101 101
102 gfx::Rect screen_space_clip_rect_; 102 gfx::Rect screen_space_clip_rect_;
103 gfx::Size minimum_tracking_size_; 103 gfx::Size minimum_tracking_size_;
104 104
105 DISALLOW_COPY_AND_ASSIGN(OcclusionTracker); 105 DISALLOW_COPY_AND_ASSIGN(OcclusionTracker);
106 }; 106 };
107 107
108 } // namespace cc 108 } // namespace cc
109 109
110 #endif // CC_TREES_OCCLUSION_TRACKER_H_ 110 #endif // CC_TREES_OCCLUSION_TRACKER_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/occlusion_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698