Add intro to any Chrome app API with no overview docs.
[chromium-blink-merge.git] / cc / solid_color_layer.cc
blob29d3708c45972aa69171bc7f1b062f41bd54b5b0
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 #include "cc/solid_color_layer.h"
7 #include "cc/solid_color_layer_impl.h"
9 namespace cc {
11 scoped_ptr<LayerImpl> SolidColorLayer::createLayerImpl()
13 return SolidColorLayerImpl::create(id()).PassAs<LayerImpl>();
16 scoped_refptr<SolidColorLayer> SolidColorLayer::create()
18 return make_scoped_refptr(new SolidColorLayer());
21 SolidColorLayer::SolidColorLayer()
22 : Layer()
26 SolidColorLayer::~SolidColorLayer()
30 void SolidColorLayer::setBackgroundColor(SkColor color)
32 setContentsOpaque(SkColorGetA(color) == 255);
33 Layer::setBackgroundColor(color);
36 } // namespace cc