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.
7 #include "cc/picture_layer.h"
8 #include "cc/picture_layer_impl.h"
12 scoped_refptr
<PictureLayer
> PictureLayer::create(ContentLayerClient
* client
) {
13 return make_scoped_refptr(new PictureLayer(client
));
16 PictureLayer::PictureLayer(ContentLayerClient
* client
) :
20 PictureLayer::~PictureLayer() {
23 bool PictureLayer::drawsContent() const {
24 return Layer::drawsContent() && client_
;
27 scoped_ptr
<LayerImpl
> PictureLayer::createLayerImpl() {
28 return PictureLayerImpl::create(id()).PassAs
<LayerImpl
>();
31 void PictureLayer::pushPropertiesTo(LayerImpl
* baseLayerImpl
) {
32 PictureLayerImpl
* layerImpl
= static_cast<PictureLayerImpl
*>(baseLayerImpl
);
33 pile_
.pushPropertiesTo(layerImpl
->pile_
);