| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/io_surface_layer.h" | 5 #include "cc/io_surface_layer.h" |
| 6 | 6 |
| 7 #include "cc/io_surface_layer_impl.h" | 7 #include "cc/io_surface_layer_impl.h" |
| 8 | 8 |
| 9 namespace cc { | 9 namespace cc { |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 { | 23 { |
| 24 } | 24 } |
| 25 | 25 |
| 26 void IOSurfaceLayer::setIOSurfaceProperties(uint32_t ioSurfaceId, const gfx::Siz
e& size) | 26 void IOSurfaceLayer::setIOSurfaceProperties(uint32_t ioSurfaceId, const gfx::Siz
e& size) |
| 27 { | 27 { |
| 28 m_ioSurfaceId = ioSurfaceId; | 28 m_ioSurfaceId = ioSurfaceId; |
| 29 m_ioSurfaceSize = size; | 29 m_ioSurfaceSize = size; |
| 30 setNeedsCommit(); | 30 setNeedsCommit(); |
| 31 } | 31 } |
| 32 | 32 |
| 33 scoped_ptr<LayerImpl> IOSurfaceLayer::createLayerImpl() | 33 scoped_ptr<LayerImpl> IOSurfaceLayer::createLayerImpl(LayerTreeHostImpl* hostImp
l) |
| 34 { | 34 { |
| 35 return IOSurfaceLayerImpl::create(m_layerId).PassAs<LayerImpl>(); | 35 return IOSurfaceLayerImpl::create(hostImpl, m_layerId).PassAs<LayerImpl>(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 bool IOSurfaceLayer::drawsContent() const | 38 bool IOSurfaceLayer::drawsContent() const |
| 39 { | 39 { |
| 40 return m_ioSurfaceId && Layer::drawsContent(); | 40 return m_ioSurfaceId && Layer::drawsContent(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void IOSurfaceLayer::pushPropertiesTo(LayerImpl* layer) | 43 void IOSurfaceLayer::pushPropertiesTo(LayerImpl* layer) |
| 44 { | 44 { |
| 45 Layer::pushPropertiesTo(layer); | 45 Layer::pushPropertiesTo(layer); |
| 46 | 46 |
| 47 IOSurfaceLayerImpl* ioSurfaceLayer = static_cast<IOSurfaceLayerImpl*>(layer)
; | 47 IOSurfaceLayerImpl* ioSurfaceLayer = static_cast<IOSurfaceLayerImpl*>(layer)
; |
| 48 ioSurfaceLayer->setIOSurfaceProperties(m_ioSurfaceId, m_ioSurfaceSize); | 48 ioSurfaceLayer->setIOSurfaceProperties(m_ioSurfaceId, m_ioSurfaceSize); |
| 49 } | 49 } |
| 50 | 50 |
| 51 } // namespace cc | 51 } // namespace cc |
| OLD | NEW |