blob: 5353a2140c02048e29e2ff846594d63ee0e0773c (
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
42
43
44
45
46
47
48
|
// 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_IMPL_H_
#define CC_LAYERS_SURFACE_LAYER_IMPL_H_
#include "base/memory/scoped_ptr.h"
#include "cc/base/cc_export.h"
#include "cc/layers/layer_impl.h"
#include "cc/surfaces/surface_id.h"
namespace cc {
class CC_EXPORT SurfaceLayerImpl : public LayerImpl {
public:
static scoped_ptr<SurfaceLayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
return make_scoped_ptr(new SurfaceLayerImpl(tree_impl, id));
}
virtual ~SurfaceLayerImpl();
void SetSurfaceId(SurfaceId surface_id);
// LayerImpl overrides.
virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
override;
virtual void PushPropertiesTo(LayerImpl* layer) override;
virtual void AppendQuads(RenderPass* render_pass,
const Occlusion& occlusion_in_content_space,
AppendQuadsData* append_quads_data) override;
protected:
SurfaceLayerImpl(LayerTreeImpl* tree_impl, int id);
private:
virtual void GetDebugBorderProperties(SkColor* color,
float* width) const override;
virtual void AsValueInto(base::debug::TracedValue* dict) const override;
virtual const char* LayerTypeAsString() const override;
SurfaceId surface_id_;
DISALLOW_COPY_AND_ASSIGN(SurfaceLayerImpl);
};
} // namespace cc
#endif // CC_LAYERS_SURFACE_LAYER_IMPL_H_
|