don't explicitly create SkDevice, as it is intended to be private. Skia now has ways...
[chromium-blink-merge.git] / cc / layers / surface_layer.h
blob8ff3151cdbffb76a5a96578126e9fef22639427c
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_LAYERS_SURFACE_LAYER_H_
6 #define CC_LAYERS_SURFACE_LAYER_H_
8 #include "cc/base/cc_export.h"
9 #include "cc/layers/layer.h"
11 namespace cc {
13 // A layer that renders a surface referencing the output of another compositor
14 // instance or client.
15 class CC_EXPORT SurfaceLayer : public Layer {
16 public:
17 static scoped_refptr<SurfaceLayer> Create();
19 void SetSurfaceId(int surface_id);
21 // Layer overrides.
22 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
23 OVERRIDE;
24 virtual bool DrawsContent() const OVERRIDE;
25 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
27 protected:
28 SurfaceLayer();
30 private:
31 virtual ~SurfaceLayer();
33 int surface_id_;
35 DISALLOW_COPY_AND_ASSIGN(SurfaceLayer);
38 } // namespace cc
40 #endif // CC_LAYERS_SURFACE_LAYER_H_