[email protected] | d98c024 | 2012-11-08 06:22:35 | [diff] [blame] | 1 | // 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] | 9b18c10 | 2012-11-15 19:57:03 | [diff] [blame] | 9 | #include "cc/picture_layer_tiling.h" |
[email protected] | cd69627 | 2012-11-21 19:15:27 | [diff] [blame] | 10 | #include "cc/picture_layer_tiling_set.h" |
[email protected] | 91e89bc | 2012-11-29 12:58:18 | [diff] [blame] | 11 | #include "cc/picture_pile_impl.h" |
[email protected] | 9b18c10 | 2012-11-15 19:57:03 | [diff] [blame] | 12 | #include "cc/scoped_ptr_vector.h" |
[email protected] | d98c024 | 2012-11-08 06:22:35 | [diff] [blame] | 13 | |
14 | namespace cc { | ||||
15 | |||||
[email protected] | 3621e18 | 2012-11-09 22:37:09 | [diff] [blame] | 16 | struct AppendQuadsData; |
17 | class QuadSink; | ||||
18 | |||||
[email protected] | 9b18c10 | 2012-11-15 19:57:03 | [diff] [blame] | 19 | class CC_EXPORT PictureLayerImpl : public LayerImpl, |
20 | public PictureLayerTilingClient { | ||||
[email protected] | d98c024 | 2012-11-08 06:22:35 | [diff] [blame] | 21 | public: |
22 | static scoped_ptr<PictureLayerImpl> create(int id) | ||||
23 | { | ||||
24 | return make_scoped_ptr(new PictureLayerImpl(id)); | ||||
25 | } | ||||
26 | virtual ~PictureLayerImpl(); | ||||
27 | |||||
[email protected] | 3621e18 | 2012-11-09 22:37:09 | [diff] [blame] | 28 | // 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] | 6ef21ffc | 2012-11-28 05:58:54 | [diff] [blame] | 32 | virtual void didUpdateTransforms() OVERRIDE; |
[email protected] | 3621e18 | 2012-11-09 22:37:09 | [diff] [blame] | 33 | |
[email protected] | 9b18c10 | 2012-11-15 19:57:03 | [diff] [blame] | 34 | // 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] | d98c024 | 2012-11-08 06:22:35 | [diff] [blame] | 41 | protected: |
42 | PictureLayerImpl(int id); | ||||
43 | |||||
[email protected] | cd69627 | 2012-11-21 19:15:27 | [diff] [blame] | 44 | PictureLayerTilingSet tilings_; |
[email protected] | 91e89bc | 2012-11-29 12:58:18 | [diff] [blame] | 45 | scoped_refptr<PicturePileImpl> pile_; |
[email protected] | d98c024 | 2012-11-08 06:22:35 | [diff] [blame] | 46 | |
[email protected] | 4cbadc88 | 2012-12-04 08:52:58 | [diff] [blame^] | 47 | 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] | d98c024 | 2012-11-08 06:22:35 | [diff] [blame] | 54 | friend class PictureLayer; |
55 | DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | ||||
56 | }; | ||||
57 | |||||
58 | } | ||||
59 | |||||
60 | #endif // CC_PICTURE_LAYER_IMPL_H_ |