update copyright date
[gnash.git] / libvaapi / VaapiSurfaceGLX.h
blobbabbec9eb1ce4aef7c97fff4b37ceed5f7a00820
1 // VaapiSurfaceGLX.h: VA/GLX surface abstraction
2 //
3 // Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef GNASH_VAAPISURFACEGLX_H
21 #define GNASH_VAAPISURFACEGLX_H
23 #include <GL/gl.h>
25 #include "dsodefs.h"
26 #include "vaapi_common.h"
27 #include "VaapiSurface.h"
29 namespace gnash {
31 /// VA/GLX surface abstraction
32 class DSOEXPORT VaapiSurfaceGLX
34 std::auto_ptr<VaapiSurfaceImplBase> _impl;
36 public:
37 VaapiSurfaceGLX(GLenum target, GLuint texture);
39 /// Return VA surface id
40 void *get() const { return reinterpret_cast<void *>(_impl->surface()); }
42 /// Get surface width
43 unsigned int width() const { return _impl->width(); }
45 /// Get surface height
46 unsigned int height() const { return _impl->height(); }
48 /// Update VA/GLX surface from VA surface
49 bool update(boost::shared_ptr<VaapiSurface> surface);
52 } // gnash namespace
54 #endif // GNASH_VAAPISURFACEGLX_H
56 // local Variables:
57 // mode: C++
58 // indent-tabs-mode: nil
59 // End: