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

Unified Diff: cc/surfaces/surface_factory.h

Issue 2485473003: Remove SurfaceFactory::Create and SurfaceFactory::Destroy (Closed)
Patch Set: SetPreviousFrame lint Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: cc/surfaces/surface_factory.h
diff --git a/cc/surfaces/surface_factory.h b/cc/surfaces/surface_factory.h
index 3a6431596bc9cc470e8ef4fdbae1520988543e14..77eaf499c782d7ff907288afa9f28c966b23a3b0 100644
--- a/cc/surfaces/surface_factory.h
+++ b/cc/surfaces/surface_factory.h
@@ -46,21 +46,10 @@ class CC_SURFACES_EXPORT SurfaceFactory {
const FrameSinkId& frame_sink_id() const { return frame_sink_id_; }
- void Create(const LocalFrameId& local_frame_id);
- void Destroy(const LocalFrameId& local_frame_id);
-
- // Destroys all surfaces.
- void DestroyAll();
-
// Destroys and disown all surfaces, and reset all resource references. This
// is useful when resources are invalid (e.g. lost context).
void Reset();
- // Set that the current frame on new_id is to be treated as the successor to
- // the current frame on old_id for the purposes of calculating damage.
- void SetPreviousFrameSurface(const LocalFrameId& new_id,
- const LocalFrameId& old_id);
-
// A frame can only be submitted to a surface created by this factory,
// although the frame may reference surfaces created by other factories.
// The callback is called the first time this frame is used to draw, or if
@@ -93,11 +82,20 @@ class CC_SURFACES_EXPORT SurfaceFactory {
private:
FrameSinkId frame_sink_id_;
Fady Samuel 2016/11/11 19:47:56 nit make const.
+ LocalFrameId current_local_frame_id_;
SurfaceManager* manager_;
SurfaceFactoryClient* client_;
SurfaceResourceHolder holder_;
bool needs_sync_points_;
+ void Create(const LocalFrameId& local_frame_id);
Fady Samuel 2016/11/11 19:47:57 nit: style, we usually put methods above class var
+ void Destroy(const LocalFrameId& local_frame_id);
+ void DestroyAll();
Fady Samuel 2016/11/11 19:47:57 Rename DestroyAll() => EvictFrame() and make publi
+
+ // Set that the current frame on new_id is to be treated as the successor to
+ // the current frame on old_id for the purposes of calculating damage.
+ void SetPreviousFrameSurface(const LocalFrameId& new_id,
Fady Samuel 2016/11/11 19:47:57 Try to make method order in the cc file match the
+ const LocalFrameId& old_id);
using OwningSurfaceMap = std::
unordered_map<LocalFrameId, std::unique_ptr<Surface>, LocalFrameIdHash>;

Powered by Google App Engine
This is Rietveld 408576698