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

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

Issue 2609253003: Remove ForceReclaimResources (Closed)
Patch Set: Make test cases / phases the same Created 3 years, 11 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.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 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // the local frame ids match, or creates a new surface with the given local 57 // the local frame ids match, or creates a new surface with the given local
58 // frame id, destroys the old one, and submits the frame to this new surface. 58 // frame id, destroys the old one, and submits the frame to this new surface.
59 // The frame can contain references to any surface, regardless of which 59 // The frame can contain references to any surface, regardless of which
60 // factory owns it. The callback is called the first time this frame is used 60 // factory owns it. The callback is called the first time this frame is used
61 // to draw, or if the frame is discarded. 61 // to draw, or if the frame is discarded.
62 void SubmitCompositorFrame(const LocalFrameId& local_frame_id, 62 void SubmitCompositorFrame(const LocalFrameId& local_frame_id,
63 CompositorFrame frame, 63 CompositorFrame frame,
64 const DrawCallback& callback); 64 const DrawCallback& callback);
65 void RequestCopyOfSurface(std::unique_ptr<CopyOutputRequest> copy_request); 65 void RequestCopyOfSurface(std::unique_ptr<CopyOutputRequest> copy_request);
66 66
67 // Evicts the current frame on the surface. All the resources
68 // will be released and Surface::HasFrame will return false.
69 void ClearSurface();
70
71 void WillDrawSurface(const LocalFrameId& id, const gfx::Rect& damage_rect); 67 void WillDrawSurface(const LocalFrameId& id, const gfx::Rect& damage_rect);
72 68
73 SurfaceFactoryClient* client() { return client_; } 69 SurfaceFactoryClient* client() { return client_; }
74 70
75 void ReceiveFromChild(const TransferableResourceArray& resources); 71 void ReceiveFromChild(const TransferableResourceArray& resources);
76 void RefResources(const TransferableResourceArray& resources); 72 void RefResources(const TransferableResourceArray& resources);
77 void UnrefResources(const ReturnedResourceArray& resources); 73 void UnrefResources(const ReturnedResourceArray& resources);
78 74
79 SurfaceManager* manager() { return manager_; } 75 SurfaceManager* manager() { return manager_; }
80 76
(...skipping 18 matching lines...) Expand all
99 bool needs_sync_points_; 95 bool needs_sync_points_;
100 std::unique_ptr<Surface> current_surface_; 96 std::unique_ptr<Surface> current_surface_;
101 base::WeakPtrFactory<SurfaceFactory> weak_factory_; 97 base::WeakPtrFactory<SurfaceFactory> weak_factory_;
102 98
103 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); 99 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory);
104 }; 100 };
105 101
106 } // namespace cc 102 } // namespace cc
107 103
108 #endif // CC_SURFACES_SURFACE_FACTORY_H_ 104 #endif // CC_SURFACES_SURFACE_FACTORY_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface.cc ('k') | cc/surfaces/surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698