blob: 062cfb468b01b4d692d87035ebc09dd5d7b4991e [file] [log] [blame]
[email protected]d98c0242012-11-08 06:22:351// Copyright 2012 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_PICTURE_LAYER_IMPL_H_
6#define CC_PICTURE_LAYER_IMPL_H_
7
8#include "cc/layer_impl.h"
[email protected]9b18c102012-11-15 19:57:039#include "cc/picture_layer_tiling.h"
[email protected]cd696272012-11-21 19:15:2710#include "cc/picture_layer_tiling_set.h"
[email protected]d98c0242012-11-08 06:22:3511#include "cc/picture_pile.h"
[email protected]9b18c102012-11-15 19:57:0312#include "cc/scoped_ptr_vector.h"
[email protected]d98c0242012-11-08 06:22:3513
14namespace cc {
15
[email protected]3621e182012-11-09 22:37:0916struct AppendQuadsData;
17class QuadSink;
18
[email protected]9b18c102012-11-15 19:57:0319class CC_EXPORT PictureLayerImpl : public LayerImpl,
20 public PictureLayerTilingClient {
[email protected]d98c0242012-11-08 06:22:3521public:
22 static scoped_ptr<PictureLayerImpl> create(int id)
23 {
24 return make_scoped_ptr(new PictureLayerImpl(id));
25 }
26 virtual ~PictureLayerImpl();
27
[email protected]3621e182012-11-09 22:37:0928 // LayerImpl overrides.
29 virtual const char* layerTypeAsString() const OVERRIDE;
30 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE;
31 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE;
32
[email protected]9b18c102012-11-15 19:57:0333 // PictureLayerTilingClient overrides.
34 virtual scoped_refptr<Tile> CreateTile(PictureLayerTiling*,
35 gfx::Rect) OVERRIDE;
36
37 // PushPropertiesTo active tree => pending tree
38 void SyncFromActiveLayer(const PictureLayerImpl* other);
39
40 // Called post-calcDraw.
41 void Update();
42
[email protected]d98c0242012-11-08 06:22:3543protected:
44 PictureLayerImpl(int id);
45
[email protected]cd696272012-11-21 19:15:2746 PictureLayerTilingSet tilings_;
[email protected]d98c0242012-11-08 06:22:3547 PicturePile pile_;
48
49 friend class PictureLayer;
50 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
51};
52
53}
54
55#endif // CC_PICTURE_LAYER_IMPL_H_