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

Unified Diff: cc/surfaces/surface_factory.h

Issue 2485473003: Remove SurfaceFactory::Create and SurfaceFactory::Destroy (Closed)
Patch Set: up 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..3afef774ec00ba5964de2c5fca8cbdb3ff797373 100644
--- a/cc/surfaces/surface_factory.h
+++ b/cc/surfaces/surface_factory.h
@@ -13,6 +13,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
+#include "base/optional.h"
#include "cc/output/compositor_frame.h"
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surface_resource_holder.h"
@@ -46,12 +47,6 @@ 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();
@@ -93,11 +88,15 @@ class CC_SURFACES_EXPORT SurfaceFactory {
private:
FrameSinkId frame_sink_id_;
+ base::Optional<LocalFrameId> last_local_frame_id_;
Fady Samuel 2016/11/10 23:33:37 Why is this optional? I don't think this needs to
danakj 2016/11/10 23:57:58 Same, just have an empty/default id?
Saman Sami 2016/11/11 17:49:59 Done.
SurfaceManager* manager_;
SurfaceFactoryClient* client_;
SurfaceResourceHolder holder_;
bool needs_sync_points_;
+ void Create(const LocalFrameId& local_frame_id);
+ void Destroy(const LocalFrameId& local_frame_id);
+ void DestroyAll();
using OwningSurfaceMap = std::
unordered_map<LocalFrameId, std::unique_ptr<Surface>, LocalFrameIdHash>;

Powered by Google App Engine
This is Rietveld 408576698