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_
9 #include "cc/picture_pile.h"
10 #include "cc/occlusion_tracker.h"
14 class ContentLayerClient
;
15 class ResourceUpdateQueue
;
16 struct RenderingStats
;
18 class CC_EXPORT PictureLayer
: public Layer
{
20 static scoped_refptr
<PictureLayer
> create(ContentLayerClient
*);
22 void clearClient() { client_
= 0; }
24 // Implement Layer interface
25 virtual bool drawsContent() const OVERRIDE
;
26 virtual scoped_ptr
<LayerImpl
> createLayerImpl() OVERRIDE
;
27 virtual void pushPropertiesTo(LayerImpl
*) OVERRIDE
;
28 virtual void setNeedsDisplayRect(const gfx::RectF
& layerRect
) OVERRIDE
;
29 virtual void update(ResourceUpdateQueue
&, const OcclusionTracker
*,
30 RenderingStats
&) OVERRIDE
;
33 explicit PictureLayer(ContentLayerClient
*);
34 virtual ~PictureLayer();
37 ContentLayerClient
* client_
;
39 // Invalidation to use the next time update is called.
40 Region pending_invalidation_
;
41 // Invalidation from the last time update was called.
42 Region pile_invalidation_
;
47 #endif // CC_PICTURE_LAYER_H_