summaryrefslogtreecommitdiffstats
path: root/webkit/compositor_bindings/web_solid_color_layer_impl.cc
blob: 7e6085c15cbb15d7b118c5355c42ca33c73d0641 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// 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 "webkit/compositor_bindings/web_solid_color_layer_impl.h"

#include "cc/solid_color_layer.h"
#include "webkit/compositor_bindings/web_layer_impl.h"

using cc::SolidColorLayer;

namespace WebKit {

WebSolidColorLayerImpl::WebSolidColorLayerImpl()
    : m_layer(new WebLayerImpl(SolidColorLayer::create()))
{
    m_layer->layer()->setIsDrawable(true);
}

WebSolidColorLayerImpl::~WebSolidColorLayerImpl()
{
}

WebLayer* WebSolidColorLayerImpl::layer()
{
    return m_layer.get();
}

void WebSolidColorLayerImpl::setBackgroundColor(WebColor color)
{
    m_layer->setBackgroundColor(color);
}

} // namespace WebKit