blob: 0b886ebe2c98c780f70db2b1cbd2ce3aac426e1e [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CC_LAYERS_SURFACE_LAYER_H_
#define CC_LAYERS_SURFACE_LAYER_H_
#include "cc/base/cc_export.h"
#include "cc/layers/layer.h"
#include "cc/surfaces/surface_id.h"
namespace cc {
// A layer that renders a surface referencing the output of another compositor
// instance or client.
class CC_EXPORT SurfaceLayer : public Layer {
public:
static scoped_refptr<SurfaceLayer> Create();
void SetSurfaceId(SurfaceId surface_id);
// Layer overrides.
scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
void PushPropertiesTo(LayerImpl* layer) override;
protected:
SurfaceLayer();
bool HasDrawableContent() const override;
private:
~SurfaceLayer() override;
SurfaceId surface_id_;
DISALLOW_COPY_AND_ASSIGN(SurfaceLayer);
};
} // namespace cc
#endif // CC_LAYERS_SURFACE_LAYER_H_