Gnash  0.8.11dev
GnashVaapiImage.h
Go to the documentation of this file.
1 // GnashVaapiImage.h: GnashImage class used with VA API
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_GNASHVAAPIIMAGE_H
22 #define GNASH_GNASHVAAPIIMAGE_H
23 
24 
25 #include "GnashImage.h"
26 #include "dsodefs.h"
27 
28 namespace gnash {
29 
30 // Forward declarations
31 class VaapiSurface;
32 class VaapiSurfaceProxy;
33 
36 {
37  std::shared_ptr<VaapiSurface> _surface;
38  std::uint64_t _creation_time;
39 
41  bool transfer();
42 
43 public:
44  GnashVaapiImage(std::shared_ptr<VaapiSurface> surface,
47  ~GnashVaapiImage();
48 
49  virtual void update(std::shared_ptr<VaapiSurface> surface);
50  virtual void update(std::uint8_t* data);
51  virtual void update(const image::GnashImage& from);
52 
54  //
56  std::shared_ptr<VaapiSurface> surface() const
57  { return _surface; }
58 
60  //
62  //
64  virtual iterator begin();
65 
67  //
69  virtual const_iterator begin() const;
70 };
71 
72 } // gnash namespace
73 
74 #endif // GNASH_GNASHVAAPIIMAGE_H
75 
76 // local Variables:
77 // mode: C++
78 // indent-tabs-mode: t
79 // End:
pixel_iterator< T > begin(GnashImage &im)
Definition: ImageIterators.h:191
GnashImage implementation using a VA surface.
Definition: GnashVaapiImage.h:35
SimpleBuffer data
Definition: LocalConnection_as.cpp:151
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
type
Definition: GnashKey.h:329
Definition: GnashKey.h:161
ImageType
The types of images handled in Gnash.
Definition: GnashImage.h:46
#define DSOEXPORT
Definition: dsodefs.h:55
value_type * iterator
Definition: GnashImage.h:83
Base class for different types of bitmaps.
Definition: GnashImage.h:77
const value_type * const_iterator
Definition: GnashImage.h:84
std::shared_ptr< VaapiSurface > surface() const
Get access to the underlying surface.
Definition: GnashVaapiImage.h:56