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

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

Issue 1430363002: List all child surfaces (including occluded) in CompositorFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
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 <set> 8 #include <set>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 private: 53 private:
54 struct ClipData { 54 struct ClipData {
55 ClipData() : is_clipped(false) {} 55 ClipData() : is_clipped(false) {}
56 ClipData(bool is_clipped, const gfx::Rect& rect) 56 ClipData(bool is_clipped, const gfx::Rect& rect)
57 : is_clipped(is_clipped), rect(rect) {} 57 : is_clipped(is_clipped), rect(rect) {}
58 58
59 bool is_clipped; 59 bool is_clipped;
60 gfx::Rect rect; 60 gfx::Rect rect;
61 }; 61 };
62 62
63 struct PrewalkResult {
64 PrewalkResult();
danakj 2015/11/16 21:45:46 do you need a non-default constructor/destructor h
65 ~PrewalkResult();
66 bool has_copy_requests;
danakj 2015/11/16 21:45:46 could you just = false here instead of constructor
67 // This is the set of Surfaces that were referenced by another Surface, but
68 // not included in a SurfaceDrawQuad.
69 std::set<SurfaceId> undrawn_surfaces;
70 };
71
63 ClipData CalculateClipRect(const ClipData& surface_clip, 72 ClipData CalculateClipRect(const ClipData& surface_clip,
64 const ClipData& quad_clip, 73 const ClipData& quad_clip,
65 const gfx::Transform& target_transform); 74 const gfx::Transform& target_transform);
66 75
67 RenderPassId RemapPassId(RenderPassId surface_local_pass_id, 76 RenderPassId RemapPassId(RenderPassId surface_local_pass_id,
68 SurfaceId surface_id); 77 SurfaceId surface_id);
69 78
70 void HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad, 79 void HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad,
71 const gfx::Transform& target_transform, 80 const gfx::Transform& target_transform,
72 const ClipData& clip_rect, 81 const ClipData& clip_rect,
73 RenderPass* dest_pass); 82 RenderPass* dest_pass);
74 SharedQuadState* CopySharedQuadState(const SharedQuadState* source_sqs, 83 SharedQuadState* CopySharedQuadState(const SharedQuadState* source_sqs,
75 const gfx::Transform& target_transform, 84 const gfx::Transform& target_transform,
76 const ClipData& clip_rect, 85 const ClipData& clip_rect,
77 RenderPass* dest_render_pass); 86 RenderPass* dest_render_pass);
78 void CopyQuadsToPass( 87 void CopyQuadsToPass(
79 const QuadList& source_quad_list, 88 const QuadList& source_quad_list,
80 const SharedQuadStateList& source_shared_quad_state_list, 89 const SharedQuadStateList& source_shared_quad_state_list,
81 const base::hash_map<ResourceId, ResourceId>& resource_to_child_map, 90 const base::hash_map<ResourceId, ResourceId>& resource_to_child_map,
82 const gfx::Transform& target_transform, 91 const gfx::Transform& target_transform,
83 const ClipData& clip_rect, 92 const ClipData& clip_rect,
84 RenderPass* dest_pass, 93 RenderPass* dest_pass,
85 SurfaceId surface_id); 94 SurfaceId surface_id);
86 gfx::Rect PrewalkTree(SurfaceId surface_id); 95 gfx::Rect PrewalkTree(SurfaceId surface_id, PrewalkResult* result);
96 void CopyUnreferencedSurfaces(PrewalkResult* prewalk);
87 void CopyPasses(const DelegatedFrameData* frame_data, Surface* surface); 97 void CopyPasses(const DelegatedFrameData* frame_data, Surface* surface);
88 98
89 // Remove Surfaces that were referenced before but aren't currently 99 // Remove Surfaces that were referenced before but aren't currently
90 // referenced from the ResourceProvider. 100 // referenced from the ResourceProvider.
91 // Also notifies SurfaceAggregatorClient of newly added and removed 101 // Also notifies SurfaceAggregatorClient of newly added and removed
92 // child surfaces. 102 // child surfaces.
93 void ProcessAddedAndRemovedSurfaces(); 103 void ProcessAddedAndRemovedSurfaces();
94 104
95 int ChildIdForSurface(Surface* surface); 105 int ChildIdForSurface(Surface* surface);
96 gfx::Rect DamageRectForSurface(const Surface* surface, 106 gfx::Rect DamageRectForSurface(const Surface* surface,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 150
141 // Resource list for the aggregated frame. 151 // Resource list for the aggregated frame.
142 TransferableResourceArray* dest_resource_list_; 152 TransferableResourceArray* dest_resource_list_;
143 153
144 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); 154 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator);
145 }; 155 };
146 156
147 } // namespace cc 157 } // namespace cc
148 158
149 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ 159 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698