Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / cc / layers / picture_image_layer_impl.h
1 // Copyright 2013 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.
4
5 #ifndef CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_
6 #define CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_
7
8 #include "cc/layers/picture_layer_impl.h"
9
10 namespace cc {
11
12 class CC_EXPORT PictureImageLayerImpl : public PictureLayerImpl {
13  public:
14   static scoped_ptr<PictureImageLayerImpl> Create(LayerTreeImpl* tree_impl,
15                                                   int id) {
16     return make_scoped_ptr(new PictureImageLayerImpl(tree_impl, id));
17   }
18   ~PictureImageLayerImpl() override;
19
20   // LayerImpl overrides.
21   const char* LayerTypeAsString() const override;
22   scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
23
24  protected:
25   PictureImageLayerImpl(LayerTreeImpl* tree_impl, int id);
26
27   bool ShouldAdjustRasterScale() const override;
28   void RecalculateRasterScales() override;
29   void GetDebugBorderProperties(SkColor* color, float* width) const override;
30
31   void UpdateIdealScales() override;
32
33  private:
34   DISALLOW_COPY_AND_ASSIGN(PictureImageLayerImpl);
35 };
36
37 }  // namespace cc
38
39 #endif  // CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_