blob: eace365b91b1a343f3c03334059ebf39f47a9b5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// 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.
virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
override;
virtual void PushPropertiesTo(LayerImpl* layer) override;
protected:
SurfaceLayer();
virtual bool HasDrawableContent() const override;
private:
virtual ~SurfaceLayer();
SurfaceId surface_id_;
DISALLOW_COPY_AND_ASSIGN(SurfaceLayer);
};
} // namespace cc
#endif // CC_LAYERS_SURFACE_LAYER_H_
|