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

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

Issue 2822143003: Remove ForceReclaimResources (Closed)
Patch Set: Rebase. Created 3 years, 8 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_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 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // the local frame ids match, or creates a new surface with the given local 54 // the local frame ids match, or creates a new surface with the given local
55 // frame id, destroys the old one, and submits the frame to this new surface. 55 // frame id, destroys the old one, and submits the frame to this new surface.
56 // The frame can contain references to any surface, regardless of which 56 // The frame can contain references to any surface, regardless of which
57 // factory owns it. The callback is called the first time this frame is used 57 // factory owns it. The callback is called the first time this frame is used
58 // to draw, or if the frame is discarded. 58 // to draw, or if the frame is discarded.
59 void SubmitCompositorFrame(const LocalSurfaceId& local_surface_id, 59 void SubmitCompositorFrame(const LocalSurfaceId& local_surface_id,
60 CompositorFrame frame, 60 CompositorFrame frame,
61 const DrawCallback& callback); 61 const DrawCallback& callback);
62 void RequestCopyOfSurface(std::unique_ptr<CopyOutputRequest> copy_request); 62 void RequestCopyOfSurface(std::unique_ptr<CopyOutputRequest> copy_request);
63 63
64 // Evicts the current frame on the surface. All the resources
65 // will be released and Surface::HasFrame will return false.
66 void ClearSurface();
67
68 void WillDrawSurface(const LocalSurfaceId& id, const gfx::Rect& damage_rect); 64 void WillDrawSurface(const LocalSurfaceId& id, const gfx::Rect& damage_rect);
69 65
70 SurfaceFactoryClient* client() { return client_; } 66 SurfaceFactoryClient* client() { return client_; }
71 67
72 void ReceiveFromChild(const TransferableResourceArray& resources); 68 void ReceiveFromChild(const TransferableResourceArray& resources);
73 void RefResources(const TransferableResourceArray& resources); 69 void RefResources(const TransferableResourceArray& resources);
74 void UnrefResources(const ReturnedResourceArray& resources); 70 void UnrefResources(const ReturnedResourceArray& resources);
75 71
76 SurfaceManager* manager() { return manager_; } 72 SurfaceManager* manager() { return manager_; }
77 73
(...skipping 25 matching lines...) Expand all
103 bool seen_first_frame_activation_ = false; 99 bool seen_first_frame_activation_ = false;
104 std::unique_ptr<Surface> current_surface_; 100 std::unique_ptr<Surface> current_surface_;
105 base::WeakPtrFactory<SurfaceFactory> weak_factory_; 101 base::WeakPtrFactory<SurfaceFactory> weak_factory_;
106 102
107 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); 103 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory);
108 }; 104 };
109 105
110 } // namespace cc 106 } // namespace cc
111 107
112 #endif // CC_SURFACES_SURFACE_FACTORY_H_ 108 #endif // CC_SURFACES_SURFACE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698