Index: cc/picture_layer.cc |
diff --git a/cc/picture_layer.cc b/cc/picture_layer.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ff69a2c886953671125a9a9102aa7c07ff9c72ca |
--- /dev/null |
+++ b/cc/picture_layer.cc |
@@ -0,0 +1,36 @@ |
+// Copyright 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "config.h" |
+ |
+#include "cc/picture_layer.h" |
+#include "cc/picture_layer_impl.h" |
+ |
+namespace cc { |
+ |
+scoped_refptr<PictureLayer> PictureLayer::create(ContentLayerClient* client) { |
+ return make_scoped_refptr(new PictureLayer(client)); |
+} |
+ |
+PictureLayer::PictureLayer(ContentLayerClient* client) : |
+ client_(client) { |
+} |
+ |
+PictureLayer::~PictureLayer() { |
+} |
+ |
+bool PictureLayer::drawsContent() const { |
+ return Layer::drawsContent() && client_; |
+} |
+ |
+scoped_ptr<LayerImpl> PictureLayer::createLayerImpl() { |
+ return PictureLayerImpl::create(id()).PassAs<LayerImpl>(); |
+} |
+ |
+void PictureLayer::pushPropertiesTo(LayerImpl* baseLayerImpl) { |
+ PictureLayerImpl* layerImpl = static_cast<PictureLayerImpl*>(baseLayerImpl); |
+ pile_.pushPropertiesTo(layerImpl->pile_); |
+} |
+ |
+} // namespace cc |