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

Side by Side Diff: cc/output/compositor_frame_metadata.h

Issue 2831213004: cc: Reject CompositorFrames to old child surfaces (Closed)
Patch Set: Updated comments as per danakj's suggestions Created 3 years, 7 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/output/compositor_frame.cc ('k') | cc/surfaces/compositor_frame_sink_support_unittest.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 CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_ 5 #ifndef CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_
6 #define CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_ 6 #define CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // determine which surfaces to retain and which to evict. It will likely 83 // determine which surfaces to retain and which to evict. It will likely
84 // be unnecessary for the embedder to explicitly specify which surfaces to 84 // be unnecessary for the embedder to explicitly specify which surfaces to
85 // retain. Thus, this field will likely go away. 85 // retain. Thus, this field will likely go away.
86 std::vector<SurfaceId> referenced_surfaces; 86 std::vector<SurfaceId> referenced_surfaces;
87 87
88 // This is the set of dependent SurfaceIds that should be active in the 88 // This is the set of dependent SurfaceIds that should be active in the
89 // display compositor before this CompositorFrame can be activated. Note 89 // display compositor before this CompositorFrame can be activated. Note
90 // that if |can_activate_before_dependencies| then the display compositor 90 // that if |can_activate_before_dependencies| then the display compositor
91 // can choose to activate a CompositorFrame before all dependencies are 91 // can choose to activate a CompositorFrame before all dependencies are
92 // available. 92 // available.
93 // Note: |activation_dependencies| and |referenced_surfaces| are disjointed
94 // sets of surface IDs. If a surface ID is known to exist and can be
95 // used without additional synchronization, then it is placed in
96 // |referenced_surfaces|. |activation_dependencies| is the set of
97 // surface IDs that this frame would like to block on until they
98 // become available or a deadline hits.
93 std::vector<SurfaceId> activation_dependencies; 99 std::vector<SurfaceId> activation_dependencies;
94 100
95 // This indicates whether this CompositorFrame can be activated before 101 // This indicates whether this CompositorFrame can be activated before
96 // dependencies have been resolved. 102 // dependencies have been resolved.
97 bool can_activate_before_dependencies = true; 103 bool can_activate_before_dependencies = true;
98 104
99 // This is a value that allows the browser to associate compositor frames 105 // This is a value that allows the browser to associate compositor frames
100 // with the content that they represent -- typically top-level page loads. 106 // with the content that they represent -- typically top-level page loads.
101 // TODO(kenrb, fsamuel): This should eventually by SurfaceID, when they 107 // TODO(kenrb, fsamuel): This should eventually by SurfaceID, when they
102 // become available in all renderer processes. See https://crbug.com/695579. 108 // become available in all renderer processes. See https://crbug.com/695579.
103 uint32_t content_source_id = 0; 109 uint32_t content_source_id = 0;
104 110
105 // BeginFrameAck for the BeginFrame that this CompositorFrame answers. 111 // BeginFrameAck for the BeginFrame that this CompositorFrame answers.
106 BeginFrameAck begin_frame_ack; 112 BeginFrameAck begin_frame_ack;
107 113
108 // Once the display compositor processes a frame containing a non-zero frame 114 // Once the display compositor processes a frame containing a non-zero frame
109 // token, the token is sent to embedder of the frame. This is helpful when 115 // token, the token is sent to embedder of the frame. This is helpful when
110 // the embedder wants to do something after a particular frame is processed. 116 // the embedder wants to do something after a particular frame is processed.
111 uint32_t frame_token = 0; 117 uint32_t frame_token = 0;
112 118
113 private: 119 private:
114 CompositorFrameMetadata(const CompositorFrameMetadata& other); 120 CompositorFrameMetadata(const CompositorFrameMetadata& other);
115 CompositorFrameMetadata operator=(const CompositorFrameMetadata&) = delete; 121 CompositorFrameMetadata operator=(const CompositorFrameMetadata&) = delete;
116 }; 122 };
117 123
118 } // namespace cc 124 } // namespace cc
119 125
120 #endif // CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_ 126 #endif // CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_
OLDNEW
« no previous file with comments | « cc/output/compositor_frame.cc ('k') | cc/surfaces/compositor_frame_sink_support_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698