blob: 1ca671def7465730462b61ed43107ea2d87104dc [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]96baf3e2012-10-22 23:09:5524 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE;
[email protected]cd57cc5a2012-10-12 22:43:4125
[email protected]96baf3e2012-10-22 23:09:5526 virtual void willDraw(ResourceProvider*) OVERRIDE;
[email protected]3be2171d2012-12-06 06:13:2027 virtual void didLoseOutputSurface() OVERRIDE;
[email protected]cd57cc5a2012-10-12 22:43:4128
29 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE;
30
31private:
[email protected]8bef40572012-12-11 21:38:0832 IOSurfaceLayerImpl(LayerTreeImpl* treeImpl, int id);
[email protected]cd57cc5a2012-10-12 22:43:4133
34 virtual const char* layerTypeAsString() const OVERRIDE;
35
36 unsigned m_ioSurfaceId;
[email protected]aad0a0072012-11-01 18:15:5837 gfx::Size m_ioSurfaceSize;
[email protected]cd57cc5a2012-10-12 22:43:4138 bool m_ioSurfaceChanged;
39 unsigned m_ioSurfaceTextureId;
40};
41
42}
43
[email protected]8fcbaa372012-11-05 04:12:4144#endif // CC_IO_SURFACE_LAYER_IMPL_H_