blob: 7bc20188297666748e3d7ec50a3dd10751f44563 [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]91e89bc2012-11-29 12:58:1811#include "cc/picture_pile_impl.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;
[email protected]6ef21ffc2012-11-28 05:58:5432 virtual void didUpdateTransforms() OVERRIDE;
[email protected]3621e182012-11-09 22:37:0933
[email protected]9b18c102012-11-15 19:57:0334 // PictureLayerTilingClient overrides.
35 virtual scoped_refptr<Tile> CreateTile(PictureLayerTiling*,
36 gfx::Rect) OVERRIDE;
37
38 // PushPropertiesTo active tree => pending tree
39 void SyncFromActiveLayer(const PictureLayerImpl* other);
40
[email protected]d98c0242012-11-08 06:22:3541protected:
42 PictureLayerImpl(int id);
43
[email protected]cd696272012-11-21 19:15:2744 PictureLayerTilingSet tilings_;
[email protected]91e89bc2012-11-29 12:58:1845 scoped_refptr<PicturePileImpl> pile_;
[email protected]d98c0242012-11-08 06:22:3546
[email protected]4cbadc882012-12-04 08:52:5847 gfx::Transform last_screen_space_transform_;
48 double last_update_time_;
49 gfx::Size last_bounds_;
50 gfx::Size last_content_bounds_;
51 float last_content_scale_x_;
52 float last_content_scale_y_;
53
[email protected]d98c0242012-11-08 06:22:3554 friend class PictureLayer;
55 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
56};
57
58}
59
60#endif // CC_PICTURE_LAYER_IMPL_H_