[email protected] | 0fb2500 | 2012-10-12 07:20:02 | [diff] [blame] | 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. | ||||
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 4 | |
[email protected] | 8fcbaa37 | 2012-11-05 04:12:41 | [diff] [blame] | 5 | #ifndef CC_IO_SURFACE_LAYER_IMPL_H_ |
6 | #define CC_IO_SURFACE_LAYER_IMPL_H_ | ||||
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 7 | |
[email protected] | 52347c84 | 2012-11-02 21:06:20 | [diff] [blame] | 8 | #include "cc/cc_export.h" |
[email protected] | d50c686 | 2012-10-23 02:08:31 | [diff] [blame] | 9 | #include "cc/layer_impl.h" |
[email protected] | aad0a007 | 2012-11-01 18:15:58 | [diff] [blame] | 10 | #include "ui/gfx/size.h" |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 11 | |
12 | namespace cc { | ||||
13 | |||||
[email protected] | 52347c84 | 2012-11-02 21:06:20 | [diff] [blame] | 14 | class CC_EXPORT IOSurfaceLayerImpl : public LayerImpl { |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 15 | public: |
[email protected] | 8bef4057 | 2012-12-11 21:38:08 | [diff] [blame] | 16 | static scoped_ptr<IOSurfaceLayerImpl> create(LayerTreeImpl* treeImpl, int id) |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 17 | { |
[email protected] | 8bef4057 | 2012-12-11 21:38:08 | [diff] [blame] | 18 | return make_scoped_ptr(new IOSurfaceLayerImpl(treeImpl, id)); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 19 | } |
[email protected] | 96baf3e | 2012-10-22 23:09:55 | [diff] [blame] | 20 | virtual ~IOSurfaceLayerImpl(); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 21 | |
[email protected] | aad0a007 | 2012-11-01 18:15:58 | [diff] [blame] | 22 | void setIOSurfaceProperties(unsigned ioSurfaceId, const gfx::Size&); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 23 | |
[email protected] | 48871fc | 2013-01-23 07:36:51 | [diff] [blame] | 24 | virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERRIDE; |
25 | virtual void pushPropertiesTo(LayerImpl*) OVERRIDE; | ||||
26 | |||||
[email protected] | 96baf3e | 2012-10-22 23:09:55 | [diff] [blame] | 27 | virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 28 | |
[email protected] | 96baf3e | 2012-10-22 23:09:55 | [diff] [blame] | 29 | virtual void willDraw(ResourceProvider*) OVERRIDE; |
[email protected] | 3be2171d | 2012-12-06 06:13:20 | [diff] [blame] | 30 | virtual void didLoseOutputSurface() OVERRIDE; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 31 | |
32 | virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE; | ||||
33 | |||||
34 | private: | ||||
[email protected] | 8bef4057 | 2012-12-11 21:38:08 | [diff] [blame] | 35 | IOSurfaceLayerImpl(LayerTreeImpl* treeImpl, int id); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 36 | |
37 | virtual const char* layerTypeAsString() const OVERRIDE; | ||||
38 | |||||
39 | unsigned m_ioSurfaceId; | ||||
[email protected] | aad0a007 | 2012-11-01 18:15:58 | [diff] [blame] | 40 | gfx::Size m_ioSurfaceSize; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 41 | bool m_ioSurfaceChanged; |
42 | unsigned m_ioSurfaceTextureId; | ||||
43 | }; | ||||
44 | |||||
45 | } | ||||
46 | |||||
[email protected] | 8fcbaa37 | 2012-11-05 04:12:41 | [diff] [blame] | 47 | #endif // CC_IO_SURFACE_LAYER_IMPL_H_ |