blob: 9d1e2c47ca5715e88fc9af22b05b4cbfc6f29681 [file] [log] [blame]
[email protected]0fb25002012-10-12 07:20:021// 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.
[email protected]cd57cc5a2012-10-12 22:43:414
[email protected]8fcbaa372012-11-05 04:12:415#ifndef CC_IO_SURFACE_LAYER_IMPL_H_
6#define CC_IO_SURFACE_LAYER_IMPL_H_
[email protected]cd57cc5a2012-10-12 22:43:417
[email protected]52347c842012-11-02 21:06:208#include "cc/cc_export.h"
[email protected]d50c6862012-10-23 02:08:319#include "cc/layer_impl.h"
[email protected]aad0a0072012-11-01 18:15:5810#include "ui/gfx/size.h"
[email protected]cd57cc5a2012-10-12 22:43:4111
12namespace cc {
13
[email protected]52347c842012-11-02 21:06:2014class CC_EXPORT IOSurfaceLayerImpl : public LayerImpl {
[email protected]cd57cc5a2012-10-12 22:43:4115public:
[email protected]8bef40572012-12-11 21:38:0816 static scoped_ptr<IOSurfaceLayerImpl> create(LayerTreeImpl* treeImpl, int id)
[email protected]cd57cc5a2012-10-12 22:43:4117 {
[email protected]8bef40572012-12-11 21:38:0818 return make_scoped_ptr(new IOSurfaceLayerImpl(treeImpl, id));
[email protected]cd57cc5a2012-10-12 22:43:4119 }
[email protected]96baf3e2012-10-22 23:09:5520 virtual ~IOSurfaceLayerImpl();
[email protected]cd57cc5a2012-10-12 22:43:4121
[email protected]aad0a0072012-11-01 18:15:5822 void setIOSurfaceProperties(unsigned ioSurfaceId, const gfx::Size&);
[email protected]cd57cc5a2012-10-12 22:43:4123
[email protected]48871fc2013-01-23 07:36:5124 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERRIDE;
25 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE;
26
[email protected]96baf3e2012-10-22 23:09:5527 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE;
[email protected]cd57cc5a2012-10-12 22:43:4128
[email protected]96baf3e2012-10-22 23:09:5529 virtual void willDraw(ResourceProvider*) OVERRIDE;
[email protected]3be2171d2012-12-06 06:13:2030 virtual void didLoseOutputSurface() OVERRIDE;
[email protected]cd57cc5a2012-10-12 22:43:4131
32 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE;
33
34private:
[email protected]8bef40572012-12-11 21:38:0835 IOSurfaceLayerImpl(LayerTreeImpl* treeImpl, int id);
[email protected]cd57cc5a2012-10-12 22:43:4136
37 virtual const char* layerTypeAsString() const OVERRIDE;
38
39 unsigned m_ioSurfaceId;
[email protected]aad0a0072012-11-01 18:15:5840 gfx::Size m_ioSurfaceSize;
[email protected]cd57cc5a2012-10-12 22:43:4141 bool m_ioSurfaceChanged;
42 unsigned m_ioSurfaceTextureId;
43};
44
45}
46
[email protected]8fcbaa372012-11-05 04:12:4147#endif // CC_IO_SURFACE_LAYER_IMPL_H_