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

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

Issue 2802023002: Remove SurfaceFactory And SurfaceFactoryClient (Closed)
Patch Set: Address Comments 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
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 9
10 #include "base/containers/flat_map.h" 10 #include "base/containers/flat_map.h"
11 #include "base/containers/flat_set.h" 11 #include "base/containers/flat_set.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "cc/quads/draw_quad.h" 14 #include "cc/quads/draw_quad.h"
15 #include "cc/quads/render_pass.h" 15 #include "cc/quads/render_pass.h"
16 #include "cc/resources/transferable_resource.h" 16 #include "cc/resources/transferable_resource.h"
17 #include "cc/surfaces/surface_id.h" 17 #include "cc/surfaces/surface_id.h"
18 #include "cc/surfaces/surfaces_export.h" 18 #include "cc/surfaces/surfaces_export.h"
19 #include "ui/gfx/color_space.h" 19 #include "ui/gfx/color_space.h"
20 20
21 namespace cc { 21 namespace cc {
22 22
23 class BlockingTaskRunner;
23 class CompositorFrame; 24 class CompositorFrame;
25 class CompositorFrameSinkSupport;
24 class ResourceProvider; 26 class ResourceProvider;
25 class Surface; 27 class Surface;
26 class SurfaceDrawQuad; 28 class SurfaceDrawQuad;
27 class SurfaceManager; 29 class SurfaceManager;
28 30
29 class CC_SURFACES_EXPORT SurfaceAggregator { 31 class CC_SURFACES_EXPORT SurfaceAggregator {
30 public: 32 public:
31 using SurfaceIndexMap = base::flat_map<SurfaceId, int>; 33 using SurfaceIndexMap = base::flat_map<SurfaceId, int>;
32 34
33 SurfaceAggregator(SurfaceManager* manager, 35 SurfaceAggregator(SurfaceManager* manager,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 84 }
83 85
84 // The surface exists and has an active frame. 86 // The surface exists and has an active frame.
85 int valid_surface; 87 int valid_surface;
86 // The surface doesn't exist. 88 // The surface doesn't exist.
87 int missing_surface; 89 int missing_surface;
88 // The surface exists but doesn't have an active frame. 90 // The surface exists but doesn't have an active frame.
89 int no_active_frame; 91 int no_active_frame;
90 }; 92 };
91 93
94 static void UnrefHelper(
95 base::WeakPtr<CompositorFrameSinkSupport> compositor_frame_sink_support,
96 const ReturnedResourceArray& resources,
97 BlockingTaskRunner* main_thread_task_runner);
98
92 ClipData CalculateClipRect(const ClipData& surface_clip, 99 ClipData CalculateClipRect(const ClipData& surface_clip,
93 const ClipData& quad_clip, 100 const ClipData& quad_clip,
94 const gfx::Transform& target_transform); 101 const gfx::Transform& target_transform);
95 102
96 int RemapPassId(int surface_local_pass_id, const SurfaceId& surface_id); 103 int RemapPassId(int surface_local_pass_id, const SurfaceId& surface_id);
97 104
98 void HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad, 105 void HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad,
99 const gfx::Transform& target_transform, 106 const gfx::Transform& target_transform,
100 const ClipData& clip_rect, 107 const ClipData& clip_rect,
101 RenderPass* dest_pass, 108 RenderPass* dest_pass,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 SurfaceDrawQuadUmaStats uma_stats_; 213 SurfaceDrawQuadUmaStats uma_stats_;
207 214
208 base::WeakPtrFactory<SurfaceAggregator> weak_factory_; 215 base::WeakPtrFactory<SurfaceAggregator> weak_factory_;
209 216
210 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); 217 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator);
211 }; 218 };
212 219
213 } // namespace cc 220 } // namespace cc
214 221
215 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ 222 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698