Gnash
0.8.11dev
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
libbase
GnashVaapiImageProxy.h
Go to the documentation of this file.
1
// GnashVaapiImageProxy.h: GnashVaapiImage proxy class used for delayed rendering
2
//
3
// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
4
// Free Software Foundation, Inc.
5
//
6
// This program is free software; you can redistribute it and/or modify
7
// it under the terms of the GNU General Public License as published by
8
// the Free Software Foundation; either version 3 of the License, or
9
// (at your option) any later version.
10
//
11
// This program is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
// GNU General Public License for more details.
15
//
16
// You should have received a copy of the GNU General Public License
17
// along with this program; if not, write to the Free Software
18
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
//
20
21
#ifndef GNASH_GNASHVAAPIIMAGEPROXY_H
22
#define GNASH_GNASHVAAPIIMAGEPROXY_H
23
24
#include <boost/shared_ptr.hpp>
25
26
namespace
gnash {
27
28
// Forward declarations
29
class
GnashVaapiImage;
30
class
VaapiSurface;
31
34
class
DSOEXPORT
GnashVaapiImageProxy
35
{
36
/* XXX: Should Renderers use boost::shared_ptr<> we could simple
37
derive from a GnashImageProxy base that would itself contain a
38
shared pointer to the image */
39
boost::shared_ptr<VaapiSurface>
_surface
;
40
42
const
int
_x
;
43
45
const
int
_y
;
46
48
const
size_t
_width
;
49
51
const
size_t
_height
;
52
53
public
:
54
GnashVaapiImageProxy
(
GnashVaapiImage
*image,
int
x
,
int
y
,
size_t
w
,
size_t
h
)
55
:
_surface
(image->surface()),
_x
(x),
_y
(y),
_width
(w),
_height
(h)
56
{ }
57
58
GnashVaapiImageProxy
(
const
GnashVaapiImageProxy
&
o
)
59
:
_surface
(o.surface())
60
,
_x
(o.
x
()),
_y
(o.
y
()),
_width
(o.
width
()),
_height
(o.
height
())
61
{ }
62
64
//
66
boost::shared_ptr<VaapiSurface> surface()
const
67
{
return
_surface
; }
68
70
//
72
int
x
()
const
{
return
_x
; }
73
75
//
77
int
y
()
const
{
return
_y
; }
78
80
//
82
size_t
width
()
const
{
return
_width
; }
83
85
//
87
size_t
height
()
const
{
return
_height
; }
88
};
89
90
}
// gnash namespace
91
92
#endif // end of GNASH_GNASHVAAPIIMAGEPROXY_H
93
94
95
// local Variables:
96
// mode: C++
97
// indent-tabs-mode: t
98
// End:
Generated on Thu Apr 4 2013 16:43:47 for Gnash by
1.8.3.1