-
Notifications
You must be signed in to change notification settings - Fork 1
/
rrblitter.h
51 lines (42 loc) · 1.25 KB
/
rrblitter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* Copyright (C)2004 Landmark Graphics
* Copyright (C)2005-2008 Sun Microsystems, Inc.
*
* This library is free software and may be redistributed and/or modified under
* the terms of the wxWindows Library License, Version 3 or (at your option)
* any later version. The full license is in the LICENSE.txt file included
* with this distribution.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* wxWindows Library License for more details.
*/
#ifndef __RRBLITTER_H
#define __RRBLITTER_H
#include "rrthread.h"
#include "rrframe.h"
#include "genericQ.h"
#include "rrprofiler.h"
class rrblitter : public Runnable
{
public:
rrblitter(void);
virtual ~rrblitter(void)
{
_deadyet=true; _q.release();
if(_t) {_t->stop(); delete _t; _t=NULL;}
for(int i=0; i<NB; i++) {if(_bmp[i]) delete _bmp[i]; _bmp[i]=NULL;}
}
bool frameready(void);
void sendframe(rrfb *);
void run(void);
rrfb *getbitmap(HWND hwnd, int, int, bool spoil);
private:
static const int NB=3;
rrcs _bmpmutex; rrfb *_bmp[NB];
rrevent _ready;
genericQ _q;
Thread *_t; bool _deadyet;
rrprofiler _prof_blit, _prof_total;
};
#endif