Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1081)

Unified Diff: cc/picture_layer.cc

Issue 11265046: cc: Add some impl-side painting stub classes and APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/picture_layer.cc
diff --git a/cc/picture_layer.cc b/cc/picture_layer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2a3c0b49a08dc7b1ca9e81fbe0b17efe313d4de0
--- /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);
+ picture_.pushPropertiesTo(layerImpl->picture_);
+}
+
+} // namespace cc
« cc/picture.h ('K') | « cc/picture_layer.h ('k') | cc/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698