Use SCHEME_HTTP for HTTPS proxies on Android.
[chromium-blink-merge.git] / cc / io_surface_layer.cc
blobdd824bc9784189929c5358d3cb7a7fda74efa909
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 "cc/io_surface_layer.h"
7 #include "cc/io_surface_layer_impl.h"
9 namespace cc {
11 scoped_refptr<IOSurfaceLayer> IOSurfaceLayer::create()
13 return make_scoped_refptr(new IOSurfaceLayer());
16 IOSurfaceLayer::IOSurfaceLayer()
17 : Layer()
18 , m_ioSurfaceId(0)
22 IOSurfaceLayer::~IOSurfaceLayer()
26 void IOSurfaceLayer::setIOSurfaceProperties(uint32_t ioSurfaceId, const gfx::Size& size)
28 m_ioSurfaceId = ioSurfaceId;
29 m_ioSurfaceSize = size;
30 setNeedsCommit();
33 scoped_ptr<LayerImpl> IOSurfaceLayer::createLayerImpl(LayerTreeHostImpl* hostImpl)
35 return IOSurfaceLayerImpl::create(hostImpl, m_layerId).PassAs<LayerImpl>();
38 bool IOSurfaceLayer::drawsContent() const
40 return m_ioSurfaceId && Layer::drawsContent();
43 void IOSurfaceLayer::pushPropertiesTo(LayerImpl* layer)
45 Layer::pushPropertiesTo(layer);
47 IOSurfaceLayerImpl* ioSurfaceLayer = static_cast<IOSurfaceLayerImpl*>(layer);
48 ioSurfaceLayer->setIOSurfaceProperties(m_ioSurfaceId, m_ioSurfaceSize);
51 } // namespace cc