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"
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()
26 SolidColorLayer::~SolidColorLayer()
30 void SolidColorLayer::setBackgroundColor(SkColor color
)
32 setContentsOpaque(SkColorGetA(color
) == 255);
33 Layer::setBackgroundColor(color
);