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

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

Issue 2449853004: Getting rid of DelegatedFrameData (Closed)
Patch Set: nit 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;
25 class ResourceProvider; 24 class ResourceProvider;
26 class Surface; 25 class Surface;
27 class SurfaceDrawQuad; 26 class SurfaceDrawQuad;
28 class SurfaceManager; 27 class SurfaceManager;
29 28
30 class CC_SURFACES_EXPORT SurfaceAggregator { 29 class CC_SURFACES_EXPORT SurfaceAggregator {
31 public: 30 public:
32 using SurfaceIndexMap = std::unordered_map<SurfaceId, int, SurfaceIdHash>; 31 using SurfaceIndexMap = std::unordered_map<SurfaceId, int, SurfaceIdHash>;
33 32
34 SurfaceAggregator(SurfaceManager* manager, 33 SurfaceAggregator(SurfaceManager* manager,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const std::unordered_map<ResourceId, ResourceId>& resource_to_child_map, 83 const std::unordered_map<ResourceId, ResourceId>& resource_to_child_map,
85 const gfx::Transform& target_transform, 84 const gfx::Transform& target_transform,
86 const ClipData& clip_rect, 85 const ClipData& clip_rect,
87 RenderPass* dest_pass, 86 RenderPass* dest_pass,
88 const SurfaceId& surface_id); 87 const SurfaceId& surface_id);
89 gfx::Rect PrewalkTree(const SurfaceId& surface_id, 88 gfx::Rect PrewalkTree(const SurfaceId& surface_id,
90 bool in_moved_pixel_pass, 89 bool in_moved_pixel_pass,
91 RenderPassId parent_pass, 90 RenderPassId parent_pass,
92 PrewalkResult* result); 91 PrewalkResult* result);
93 void CopyUndrawnSurfaces(PrewalkResult* prewalk); 92 void CopyUndrawnSurfaces(PrewalkResult* prewalk);
94 void CopyPasses(const DelegatedFrameData* frame_data, Surface* surface); 93 void CopyPasses(const CompositorFrame& frame, Surface* surface);
95 94
96 // Remove Surfaces that were referenced before but aren't currently 95 // Remove Surfaces that were referenced before but aren't currently
97 // referenced from the ResourceProvider. 96 // referenced from the ResourceProvider.
98 // Also notifies SurfaceAggregatorClient of newly added and removed 97 // Also notifies SurfaceAggregatorClient of newly added and removed
99 // child surfaces. 98 // child surfaces.
100 void ProcessAddedAndRemovedSurfaces(); 99 void ProcessAddedAndRemovedSurfaces();
101 100
102 void PropagateCopyRequestPasses(); 101 void PropagateCopyRequestPasses();
103 102
104 int ChildIdForSurface(Surface* surface); 103 int ChildIdForSurface(Surface* surface);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 TransferableResourceArray* dest_resource_list_; 168 TransferableResourceArray* dest_resource_list_;
170 169
171 base::WeakPtrFactory<SurfaceAggregator> weak_factory_; 170 base::WeakPtrFactory<SurfaceAggregator> weak_factory_;
172 171
173 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); 172 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator);
174 }; 173 };
175 174
176 } // namespace cc 175 } // namespace cc
177 176
178 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ 177 #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