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

Side by Side Diff: cc/surfaces/surface_aggregator.h

Issue 1968363002: SurfaceAggregator should check whether output is secure when drawin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/surfaces/display.cc ('k') | cc/surfaces/surface_aggregator.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SURFACES_SURFACE_AGGREGATOR_H_ 5 #ifndef CC_SURFACES_SURFACE_AGGREGATOR_H_
6 #define CC_SURFACES_SURFACE_AGGREGATOR_H_ 6 #define CC_SURFACES_SURFACE_AGGREGATOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 24 matching lines...) Expand all
35 ResourceProvider* provider, 35 ResourceProvider* provider,
36 bool aggregate_only_damaged); 36 bool aggregate_only_damaged);
37 ~SurfaceAggregator(); 37 ~SurfaceAggregator();
38 38
39 std::unique_ptr<CompositorFrame> Aggregate(SurfaceId surface_id); 39 std::unique_ptr<CompositorFrame> Aggregate(SurfaceId surface_id);
40 void ReleaseResources(SurfaceId surface_id); 40 void ReleaseResources(SurfaceId surface_id);
41 SurfaceIndexMap& previous_contained_surfaces() { 41 SurfaceIndexMap& previous_contained_surfaces() {
42 return previous_contained_surfaces_; 42 return previous_contained_surfaces_;
43 } 43 }
44 void SetFullDamageForSurface(SurfaceId surface_id); 44 void SetFullDamageForSurface(SurfaceId surface_id);
45 void set_output_is_secure(bool secure) { output_is_secure_ = secure; }
45 46
46 private: 47 private:
47 struct ClipData { 48 struct ClipData {
48 ClipData() : is_clipped(false) {} 49 ClipData() : is_clipped(false) {}
49 ClipData(bool is_clipped, const gfx::Rect& rect) 50 ClipData(bool is_clipped, const gfx::Rect& rect)
50 : is_clipped(is_clipped), rect(rect) {} 51 : is_clipped(is_clipped), rect(rect) {}
51 52
52 bool is_clipped; 53 bool is_clipped;
53 gfx::Rect rect; 54 gfx::Rect rect;
54 }; 55 };
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 ResourceProvider* provider_; 109 ResourceProvider* provider_;
109 110
110 class RenderPassIdAllocator; 111 class RenderPassIdAllocator;
111 using RenderPassIdAllocatorMap = 112 using RenderPassIdAllocatorMap =
112 std::unordered_map<SurfaceId, 113 std::unordered_map<SurfaceId,
113 std::unique_ptr<RenderPassIdAllocator>, 114 std::unique_ptr<RenderPassIdAllocator>,
114 SurfaceIdHash>; 115 SurfaceIdHash>;
115 RenderPassIdAllocatorMap render_pass_allocator_map_; 116 RenderPassIdAllocatorMap render_pass_allocator_map_;
116 int next_render_pass_id_; 117 int next_render_pass_id_;
117 const bool aggregate_only_damaged_; 118 const bool aggregate_only_damaged_;
119 bool output_is_secure_;
118 120
119 using SurfaceToResourceChildIdMap = 121 using SurfaceToResourceChildIdMap =
120 std::unordered_map<SurfaceId, int, SurfaceIdHash>; 122 std::unordered_map<SurfaceId, int, SurfaceIdHash>;
121 SurfaceToResourceChildIdMap surface_id_to_resource_child_id_; 123 SurfaceToResourceChildIdMap surface_id_to_resource_child_id_;
122 124
123 // The following state is only valid for the duration of one Aggregate call 125 // The following state is only valid for the duration of one Aggregate call
124 // and is only stored on the class to avoid having to pass through every 126 // and is only stored on the class to avoid having to pass through every
125 // function call. 127 // function call.
126 128
127 // This is the set of surfaces referenced in the aggregation so far, used to 129 // This is the set of surfaces referenced in the aggregation so far, used to
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 TransferableResourceArray* dest_resource_list_; 168 TransferableResourceArray* dest_resource_list_;
167 169
168 base::WeakPtrFactory<SurfaceAggregator> weak_factory_; 170 base::WeakPtrFactory<SurfaceAggregator> weak_factory_;
169 171
170 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); 172 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator);
171 }; 173 };
172 174
173 } // namespace cc 175 } // namespace cc
174 176
175 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ 177 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_
OLDNEW
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698