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

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

Issue 1945533002: Add way to mark other Surface a predecessor for a Surface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | cc/surfaces/surface_factory.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_FACTORY_H_ 5 #ifndef CC_SURFACES_SURFACE_FACTORY_H_
6 #define CC_SURFACES_SURFACE_FACTORY_H_ 6 #define CC_SURFACES_SURFACE_FACTORY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 public: 42 public:
43 using DrawCallback = base::Callback<void(SurfaceDrawStatus)>; 43 using DrawCallback = base::Callback<void(SurfaceDrawStatus)>;
44 44
45 SurfaceFactory(SurfaceManager* manager, SurfaceFactoryClient* client); 45 SurfaceFactory(SurfaceManager* manager, SurfaceFactoryClient* client);
46 ~SurfaceFactory(); 46 ~SurfaceFactory();
47 47
48 void Create(SurfaceId surface_id); 48 void Create(SurfaceId surface_id);
49 void Destroy(SurfaceId surface_id); 49 void Destroy(SurfaceId surface_id);
50 void DestroyAll(); 50 void DestroyAll();
51 51
52 // Set that the current frame on new_id is to be treated as the successor to
53 // the current frame on old_id for the purposes of calculating damage.
54 void SetPreviousFrameSurface(SurfaceId new_id, SurfaceId old_id);
55
52 // A frame can only be submitted to a surface created by this factory, 56 // A frame can only be submitted to a surface created by this factory,
53 // although the frame may reference surfaces created by other factories. 57 // although the frame may reference surfaces created by other factories.
54 // The callback is called the first time this frame is used to draw, or if 58 // The callback is called the first time this frame is used to draw, or if
55 // the frame is discarded. 59 // the frame is discarded.
56 void SubmitCompositorFrame(SurfaceId surface_id, 60 void SubmitCompositorFrame(SurfaceId surface_id,
57 std::unique_ptr<CompositorFrame> frame, 61 std::unique_ptr<CompositorFrame> frame,
58 const DrawCallback& callback); 62 const DrawCallback& callback);
59 void RequestCopyOfSurface(SurfaceId surface_id, 63 void RequestCopyOfSurface(SurfaceId surface_id,
60 std::unique_ptr<CopyOutputRequest> copy_request); 64 std::unique_ptr<CopyOutputRequest> copy_request);
61 65
(...skipping 23 matching lines...) Expand all
85 using OwningSurfaceMap = 89 using OwningSurfaceMap =
86 std::unordered_map<SurfaceId, std::unique_ptr<Surface>, SurfaceIdHash>; 90 std::unordered_map<SurfaceId, std::unique_ptr<Surface>, SurfaceIdHash>;
87 OwningSurfaceMap surface_map_; 91 OwningSurfaceMap surface_map_;
88 92
89 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); 93 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory);
90 }; 94 };
91 95
92 } // namespace cc 96 } // namespace cc
93 97
94 #endif // CC_SURFACES_SURFACE_FACTORY_H_ 98 #endif // CC_SURFACES_SURFACE_FACTORY_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | cc/surfaces/surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698