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

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

Issue 2503203002: Revert "Getting rid of DelegatedFrameData" (Closed)
Patch Set: Created 4 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
« no previous file with comments | « cc/surfaces/surface.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>
11 #include <unordered_set> 11 #include <unordered_set>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "cc/quads/draw_quad.h" 15 #include "cc/quads/draw_quad.h"
16 #include "cc/quads/render_pass.h" 16 #include "cc/quads/render_pass.h"
17 #include "cc/resources/transferable_resource.h" 17 #include "cc/resources/transferable_resource.h"
18 #include "cc/surfaces/surface_id.h" 18 #include "cc/surfaces/surface_id.h"
19 #include "cc/surfaces/surfaces_export.h" 19 #include "cc/surfaces/surfaces_export.h"
20 20
21 namespace cc { 21 namespace cc {
22 22
23 class CompositorFrame; 23 class CompositorFrame;
24 class DelegatedFrameData;
24 class ResourceProvider; 25 class ResourceProvider;
25 class Surface; 26 class Surface;
26 class SurfaceDrawQuad; 27 class SurfaceDrawQuad;
27 class SurfaceManager; 28 class SurfaceManager;
28 29
29 class CC_SURFACES_EXPORT SurfaceAggregator { 30 class CC_SURFACES_EXPORT SurfaceAggregator {
30 public: 31 public:
31 using SurfaceIndexMap = std::unordered_map<SurfaceId, int, SurfaceIdHash>; 32 using SurfaceIndexMap = std::unordered_map<SurfaceId, int, SurfaceIdHash>;
32 33
33 SurfaceAggregator(SurfaceManager* manager, 34 SurfaceAggregator(SurfaceManager* manager,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 const std::unordered_map<ResourceId, ResourceId>& resource_to_child_map, 84 const std::unordered_map<ResourceId, ResourceId>& resource_to_child_map,
84 const gfx::Transform& target_transform, 85 const gfx::Transform& target_transform,
85 const ClipData& clip_rect, 86 const ClipData& clip_rect,
86 RenderPass* dest_pass, 87 RenderPass* dest_pass,
87 const SurfaceId& surface_id); 88 const SurfaceId& surface_id);
88 gfx::Rect PrewalkTree(const SurfaceId& surface_id, 89 gfx::Rect PrewalkTree(const SurfaceId& surface_id,
89 bool in_moved_pixel_pass, 90 bool in_moved_pixel_pass,
90 RenderPassId parent_pass, 91 RenderPassId parent_pass,
91 PrewalkResult* result); 92 PrewalkResult* result);
92 void CopyUndrawnSurfaces(PrewalkResult* prewalk); 93 void CopyUndrawnSurfaces(PrewalkResult* prewalk);
93 void CopyPasses(const CompositorFrame& frame, Surface* surface); 94 void CopyPasses(const DelegatedFrameData* frame_data, Surface* surface);
94 95
95 // Remove Surfaces that were referenced before but aren't currently 96 // Remove Surfaces that were referenced before but aren't currently
96 // referenced from the ResourceProvider. 97 // referenced from the ResourceProvider.
97 // Also notifies SurfaceAggregatorClient of newly added and removed 98 // Also notifies SurfaceAggregatorClient of newly added and removed
98 // child surfaces. 99 // child surfaces.
99 void ProcessAddedAndRemovedSurfaces(); 100 void ProcessAddedAndRemovedSurfaces();
100 101
101 void PropagateCopyRequestPasses(); 102 void PropagateCopyRequestPasses();
102 103
103 int ChildIdForSurface(Surface* surface); 104 int ChildIdForSurface(Surface* surface);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 TransferableResourceArray* dest_resource_list_; 169 TransferableResourceArray* dest_resource_list_;
169 170
170 base::WeakPtrFactory<SurfaceAggregator> weak_factory_; 171 base::WeakPtrFactory<SurfaceAggregator> weak_factory_;
171 172
172 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); 173 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator);
173 }; 174 };
174 175
175 } // namespace cc 176 } // namespace cc
176 177
177 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ 178 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface.cc ('k') | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698