Add Sad Tab resources to the iOS build.
[chromium-blink-merge.git] / cc / io_surface_layer.cc
blob38fbdf4dbdcc9a5501884cd5c458e7754dd486fb
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 "config.h"
7 #include "cc/io_surface_layer.h"
9 #include "cc/io_surface_layer_impl.h"
11 namespace cc {
13 scoped_refptr<IOSurfaceLayer> IOSurfaceLayer::create()
15 return make_scoped_refptr(new IOSurfaceLayer());
18 IOSurfaceLayer::IOSurfaceLayer()
19 : Layer()
20 , m_ioSurfaceId(0)
24 IOSurfaceLayer::~IOSurfaceLayer()
28 void IOSurfaceLayer::setIOSurfaceProperties(uint32_t ioSurfaceId, const gfx::Size& size)
30 m_ioSurfaceId = ioSurfaceId;
31 m_ioSurfaceSize = size;
32 setNeedsCommit();
35 scoped_ptr<LayerImpl> IOSurfaceLayer::createLayerImpl()
37 return IOSurfaceLayerImpl::create(m_layerId).PassAs<LayerImpl>();
40 bool IOSurfaceLayer::drawsContent() const
42 return m_ioSurfaceId && Layer::drawsContent();
45 void IOSurfaceLayer::pushPropertiesTo(LayerImpl* layer)
47 Layer::pushPropertiesTo(layer);
49 IOSurfaceLayerImpl* ioSurfaceLayer = static_cast<IOSurfaceLayerImpl*>(layer);
50 ioSurfaceLayer->setIOSurfaceProperties(m_ioSurfaceId, m_ioSurfaceSize);
53 } // namespace cc