forked from mono/moon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontext-egl.h
More file actions
102 lines (81 loc) · 2.1 KB
/
context-egl.h
File metadata and controls
102 lines (81 loc) · 2.1 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* context-glx.h
*
* Copyright 2010 Novell, Inc. (http://www.novell.com)
*
* See the LICENSE file included with the distribution for details.
*
*/
#ifndef __MOON_CONTEXT_EGL_H__
#define __MOON_CONTEXT_EGL_H__
#include "context-gl.h"
#include "surface-egl.h"
namespace Moonlight {
class MOON_API MoonEGLContext : public GLContext {
public:
MoonEGLContext (MoonEGLSurface *surface);
virtual ~MoonEGLContext ();
bool Initialize ();
void MakeCurrent ();
void Push (Group extents);
cairo_t *Push (Cairo extents);
Rect Pop (MoonSurface **ref);
void Clear (Color *color);
void Blit (unsigned char *data,
int stride);
void BlitYV12 (unsigned char *data[],
int stride[]);
void Paint (Color *color);
void Paint (MoonSurface *src,
double alpha,
double x,
double y);
void Project (MoonSurface *src,
const double *matrix,
double alpha,
double x,
double y);
void Blur (MoonSurface *src,
double radius,
double x,
double y);
void DropShadow (MoonSurface *src,
double dx,
double dy,
double radius,
Color *color,
double x,
double y);
void ShaderEffect (MoonSurface *src,
PixelShader *shader,
Brush **sampler,
int *sampler_mode,
int n_sampler,
Color *constant,
int n_constant,
int *ddxUvDdyUvPtr,
double x,
double y);
void Flush ();
protected:
void SetupVertexData (const double *matrix,
double x,
double y,
double width,
double height);
const char *ProgramPrecisionString ();
void SetFramebuffer ();
void SetScissor ();
void ForceCurrent ();
gboolean HasDrawable ();
void SyncDrawable ();
Rect GroupBounds (Group extents);
private:
EGLDisplay display;
EGLSurface surface;
EGLContext context;
GLint maxTextureSize;
};
};
#endif /* __MOON_CONTEXT_EGL_H__ */