openATV enigma2
openATV is an open source SetTopBox Graphical user interface.
accel.h
Go to the documentation of this file.
1 #ifndef __lib_gdi_accel_h
2 #define __lib_gdi_accel_h
3 
4 #include <base/elock.h>
5 #include <list>
6 
7 struct gUnmanagedSurface;
8 class eRect;
9 class ePoint;
10 
11 class gAccel
12 {
13 public:
14  static gAccel* getInstance() { return instance; }
15  gAccel();
16  ~gAccel();
17 
19  void setAccelMemorySpace(void *addr, int phys_addr, int size);
20 
22  int blit(gUnmanagedSurface *dst, gUnmanagedSurface *src, const eRect &p, const eRect &area, int flags);
23  int fill(gUnmanagedSurface *dst, const eRect &area, unsigned long col);
24  int accumulate();
25  int sync();
26 
27  int accelAlloc(gUnmanagedSurface* surface);
28  void accelFree(gUnmanagedSurface* surface);
29 
30  void dumpDebug();
31 private:
32  struct MemoryBlock {
33  gUnmanagedSurface *surface;
34  int index;
35  int size;
36 
37  MemoryBlock(gUnmanagedSurface *o, int i, int s):
38  surface(o), index(i), size(s)
39  {}
40  MemoryBlock():
41  surface(0), index(0), size(0)
42  {}
43  };
44  typedef std::list<MemoryBlock> MemoryBlockList;
45 
46  eSingleLock m_allocation_lock;
47  void *m_accel_addr;
48  int m_accel_phys_addr;
49  int m_accel_size; // in blocks
50  MemoryBlockList m_accel_allocation;
51  int m_bcm_accel_state;
52 
53  static gAccel *instance;
54 };
55 
56 #endif
Definition: epoint.h:9
Definition: erect.h:11
Definition: elock.h:81
Definition: accel.h:12
bool hasAlphaBlendingSupport()
Definition: accel.cpp:189
gAccel()
Definition: accel.cpp:88
~gAccel()
Definition: accel.cpp:109
int blit(gUnmanagedSurface *dst, gUnmanagedSurface *src, const eRect &p, const eRect &area, int flags)
Definition: accel.cpp:201
void dumpDebug()
Definition: accel.cpp:148
static gAccel * getInstance()
Definition: accel.h:14
int accelAlloc(gUnmanagedSurface *surface)
Definition: accel.cpp:413
int sync()
Definition: accel.cpp:402
void accelFree(gUnmanagedSurface *surface)
Definition: accel.cpp:467
int accumulate()
Definition: accel.cpp:391
int fill(gUnmanagedSurface *dst, const eRect &area, unsigned long col)
Definition: accel.cpp:359
void setAccelMemorySpace(void *addr, int phys_addr, int size)
Definition: accel.cpp:176
void releaseAccelMemorySpace()
Definition: accel.cpp:151
size
Definition: Plugins/SystemPlugins/PositionerSetup/log.py:16
index
Definition: main.py:28
p
Definition: upgrade.py:63
Definition: gpixmap.h:163