Telemetry: More elegant histogram printing.
[chromium-blink-merge.git] / cc / picture_layer.h
blobfd330fba34e621f26f4300c4d9dece93f22fea78
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.
5 #ifndef CC_PICTURE_LAYER_H_
6 #define CC_PICTURE_LAYER_H_
8 #include "cc/contents_scaling_layer.h"
9 #include "cc/layer.h"
10 #include "cc/picture_pile.h"
11 #include "cc/occlusion_tracker.h"
13 namespace cc {
15 class ContentLayerClient;
16 class ResourceUpdateQueue;
17 struct RenderingStats;
19 class CC_EXPORT PictureLayer : public ContentsScalingLayer {
20 public:
21 static scoped_refptr<PictureLayer> create(ContentLayerClient*);
23 void clearClient() { client_ = 0; }
25 // Implement Layer interface
26 virtual bool drawsContent() const OVERRIDE;
27 virtual scoped_ptr<LayerImpl> createLayerImpl(
28 LayerTreeImpl* treeImpl) OVERRIDE;
29 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE;
30 virtual void setNeedsDisplayRect(const gfx::RectF& layerRect) OVERRIDE;
31 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*,
32 RenderingStats&) OVERRIDE;
34 protected:
35 explicit PictureLayer(ContentLayerClient*);
36 virtual ~PictureLayer();
38 private:
39 ContentLayerClient* client_;
40 PicturePile pile_;
41 // Invalidation to use the next time update is called.
42 Region pending_invalidation_;
43 // Invalidation from the last time update was called.
44 Region pile_invalidation_;
47 } // namespace cc
49 #endif // CC_PICTURE_LAYER_H_