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 "webkit/compositor_bindings/web_io_surface_layer_impl.h" | |
6 | |
7 #include "cc/io_surface_layer.h" | |
8 #include "webkit/compositor_bindings/web_layer_impl.h" | |
9 | |
10 using cc::IOSurfaceLayer; | |
11 | |
12 namespace WebKit { | |
13 | |
14 WebIOSurfaceLayerImpl::WebIOSurfaceLayerImpl() | |
15 : layer_(new WebLayerImpl(IOSurfaceLayer::create())) { | |
16 layer_->layer()->setIsDrawable(true); | |
17 } | |
18 | |
19 WebIOSurfaceLayerImpl::~WebIOSurfaceLayerImpl() {} | |
20 | |
21 void WebIOSurfaceLayerImpl::setIOSurfaceProperties(unsigned io_surface_id, | |
22 WebSize size) { | |
23 static_cast<IOSurfaceLayer*>(layer_->layer()) | |
24 ->setIOSurfaceProperties(io_surface_id, size); | |
25 } | |
26 | |
27 WebLayer* WebIOSurfaceLayerImpl::layer() { return layer_.get(); } | |
28 | |
29 } // namespace WebKit | |
OLD | NEW |