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

Unified Diff: cc/layers/surface_layer.h

Issue 666163006: Allow layers to signal that additional sequences are needed before surface destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/surface_layer.h
diff --git a/cc/layers/surface_layer.h b/cc/layers/surface_layer.h
index 0b886ebe2c98c780f70db2b1cbd2ce3aac426e1e..bf41dd1185d164919c63d85da1f711c5569fbf71 100644
--- a/cc/layers/surface_layer.h
+++ b/cc/layers/surface_layer.h
@@ -7,9 +7,11 @@
#include "cc/base/cc_export.h"
#include "cc/layers/layer.h"
+#include "cc/layers/surface_holder.h"
#include "cc/surfaces/surface_id.h"
namespace cc {
+class SatisfySwapPromise;
// A layer that renders a surface referencing the output of another compositor
// instance or client.
@@ -17,10 +19,11 @@ class CC_EXPORT SurfaceLayer : public Layer {
public:
static scoped_refptr<SurfaceLayer> Create();
- void SetSurfaceId(SurfaceId surface_id);
+ void SetSurfaceId(scoped_refptr<SurfaceHolder> surface_holder);
piman 2014/11/03 23:49:26 nit: SetSurfaceHolder?
// Layer overrides.
scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void SetLayerTreeHost(LayerTreeHost* host) override;
void PushPropertiesTo(LayerImpl* layer) override;
protected:
@@ -29,8 +32,12 @@ class CC_EXPORT SurfaceLayer : public Layer {
private:
~SurfaceLayer() override;
+ void CreateNewDestroySequence();
+ void SatisfyDestroySequence();
- SurfaceId surface_id_;
+ scoped_refptr<SurfaceHolder> surface_holder_;
+ SurfaceSequence destroy_sequence_;
+ base::WeakPtr<SatisfySwapPromise> last_swap_promise_;
DISALLOW_COPY_AND_ASSIGN(SurfaceLayer);
};

Powered by Google App Engine
This is Rietveld 408576698