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

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

Issue 432093003: Enqueuing new frames in a Surface should cause Displays to reaggregate it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/surfaces/display_client.h ('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 <set> 8 #include <set>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 11 matching lines...) Expand all
22 class ResourceProvider; 22 class ResourceProvider;
23 class Surface; 23 class Surface;
24 class SurfaceDrawQuad; 24 class SurfaceDrawQuad;
25 class SurfaceManager; 25 class SurfaceManager;
26 26
27 class CC_SURFACES_EXPORT SurfaceAggregator { 27 class CC_SURFACES_EXPORT SurfaceAggregator {
28 public: 28 public:
29 SurfaceAggregator(SurfaceManager* manager, ResourceProvider* provider); 29 SurfaceAggregator(SurfaceManager* manager, ResourceProvider* provider);
30 ~SurfaceAggregator(); 30 ~SurfaceAggregator();
31 31
32 scoped_ptr<CompositorFrame> Aggregate(SurfaceId surface_id); 32 scoped_ptr<CompositorFrame> Aggregate(
33 SurfaceId surface_id,
34 std::set<SurfaceId>* contained_surfaces);
33 35
34 private: 36 private:
35 RenderPass::Id RemapPassId(RenderPass::Id surface_local_pass_id, 37 RenderPass::Id RemapPassId(RenderPass::Id surface_local_pass_id,
36 SurfaceId surface_id); 38 SurfaceId surface_id);
37 39
38 void HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad, 40 void HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad,
39 RenderPass* dest_pass); 41 RenderPass* dest_pass);
40 void CopySharedQuadState(const SharedQuadState* source_sqs, 42 void CopySharedQuadState(const SharedQuadState* source_sqs,
41 const gfx::Transform& content_to_target_transform, 43 const gfx::Transform& content_to_target_transform,
42 RenderPass* dest_render_pass); 44 RenderPass* dest_render_pass);
(...skipping 22 matching lines...) Expand all
65 67
66 // The following state is only valid for the duration of one Aggregate call 68 // The following state is only valid for the duration of one Aggregate call
67 // and is only stored on the class to avoid having to pass through every 69 // and is only stored on the class to avoid having to pass through every
68 // function call. 70 // function call.
69 71
70 // This is the set of surfaces referenced in the aggregation so far, used to 72 // This is the set of surfaces referenced in the aggregation so far, used to
71 // detect cycles. 73 // detect cycles.
72 typedef std::set<SurfaceId> SurfaceSet; 74 typedef std::set<SurfaceId> SurfaceSet;
73 SurfaceSet referenced_surfaces_; 75 SurfaceSet referenced_surfaces_;
74 76
77 // This is the set of surfaces that were used in the last draw.
78 SurfaceSet* contained_surfaces_;
79
75 // This is the pass list for the aggregated frame. 80 // This is the pass list for the aggregated frame.
76 RenderPassList* dest_pass_list_; 81 RenderPassList* dest_pass_list_;
77 82
78 // Resource list for the aggregated frame. 83 // Resource list for the aggregated frame.
79 TransferableResourceArray* dest_resource_list_; 84 TransferableResourceArray* dest_resource_list_;
80 85
81 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); 86 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator);
82 }; 87 };
83 88
84 } // namespace cc 89 } // namespace cc
85 90
86 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ 91 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_
OLDNEW
« no previous file with comments | « cc/surfaces/display_client.h ('k') | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698