OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "config.h" |
| 6 #include "WebDecorationLayerImpl.h" |
| 7 |
| 8 #include "DecorationLayerChromium.h" |
| 9 #include "SkBitmap.h" |
| 10 #include "WebLayerImpl.h" |
| 11 #include "webcore_convert.h" |
| 12 |
| 13 using cc::DecorationLayerChromium; |
| 14 |
| 15 namespace WebKit { |
| 16 |
| 17 WebDecorationLayer* WebDecorationLayer::create() |
| 18 { |
| 19 return new WebDecorationLayerImpl(); |
| 20 } |
| 21 |
| 22 WebDecorationLayerImpl::WebDecorationLayerImpl() |
| 23 : m_layer(adoptPtr(new WebLayerImpl(DecorationLayerChromium::create()))) |
| 24 { |
| 25 m_layer->layer()->setIsDrawable(true); |
| 26 } |
| 27 |
| 28 WebDecorationLayerImpl::~WebDecorationLayerImpl() |
| 29 { |
| 30 } |
| 31 |
| 32 WebLayer* WebDecorationLayerImpl::layer() |
| 33 { |
| 34 return m_layer.get(); |
| 35 } |
| 36 |
| 37 void WebDecorationLayerImpl::setBitmap(const SkBitmap& bitmap, const WebRect& ap
erture) { |
| 38 static_cast<DecorationLayerChromium*>(m_layer->layer())->setBitmap(bitmap, c
onvert(aperture)); |
| 39 } |
| 40 |
| 41 } // namespace WebKit |
OLD | NEW |