Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: ppapi/lib/gl/egl/egldriver_ppapi.c

Issue 5717003: Added a stub driver implementation for Mesa EGL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/lib/gl/egl/egldriver.c ('k') | ppapi/lib/gl/include/EGL/egl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <stdlib.h>
6 #include "third_party/mesa/MesaLib/src/egl/main/egldriver.h"
7
8 /**
9 * This is an EGL driver that wraps PPAPI.
10 */
11
12 /** Subclass of _EGLDriver */
13 typedef struct _egl_driver_ppapi {
14 _EGLDriver Base; /* base class */
15 } _EGLDriverPPAPI;
16
17 static EGLBoolean _eglInitializePPAPI(_EGLDriver *drv,
18 _EGLDisplay *dpy,
19 EGLint *major,
20 EGLint *minor) {
21 return EGL_FALSE;
22 }
23
24 static EGLBoolean _eglTerminatePPAPI(_EGLDriver *drv,
25 _EGLDisplay *dpy) {
26 return EGL_FALSE;
27 }
28
29 static _EGLContext *_eglCreateContextPPAPI(_EGLDriver *drv,
30 _EGLDisplay *dpy,
31 _EGLConfig *config,
32 _EGLContext *share,
33 const EGLint *attrib_list) {
34 return NULL;
35 }
36
37 static EGLBoolean _eglDestroyContextPPAPI(_EGLDriver *drv,
38 _EGLDisplay *dpy,
39 _EGLContext *ctx) {
40 return EGL_FALSE;
41 }
42
43 static _EGLSurface *_eglCreateWindowSurfacePPAPI(_EGLDriver *drv,
44 _EGLDisplay *dpy,
45 _EGLConfig *config,
46 EGLNativeWindowType window,
47 const EGLint *attrib_list) {
48 return NULL;
49 }
50
51 static _EGLSurface *_eglCreatePbufferSurfacePPAPI(_EGLDriver *drv,
52 _EGLDisplay *dpy,
53 _EGLConfig *config,
54 const EGLint *attrib_list) {
55 return NULL;
56 }
57
58 static EGLBoolean _eglDestroySurfacePPAPI(_EGLDriver *drv,
59 _EGLDisplay *dpy,
60 _EGLSurface *surface) {
61 return EGL_FALSE;
62 }
63
64 static EGLBoolean _eglSwapBuffersPPAPI(_EGLDriver *drv,
65 _EGLDisplay *dpy,
66 _EGLSurface *draw) {
67 return EGL_FALSE;
68 }
69
70 static void _unloadPPAPI(_EGLDriver *drv) {
71 free(drv);
72 }
73
74 /**
75 * This is the main entrypoint into the driver, called by egl dispatch API.
76 * Create a new _EGLDriver object and init its dispatch table.
77 */
78 _EGLDriver* _eglMain(const char *args)
79 {
80 _EGLDriverPPAPI *drv = (_EGLDriverPPAPI *)
81 calloc(1, sizeof(_EGLDriverPPAPI));
82
83 if (!drv)
84 return NULL;
85
86 _eglInitDriverFallbacks(&drv->Base);
87 drv->Base.API.Initialize = _eglInitializePPAPI;
88 drv->Base.API.Terminate = _eglTerminatePPAPI;
89 drv->Base.API.CreateContext = _eglCreateContextPPAPI;
90 drv->Base.API.DestroyContext = _eglDestroyContextPPAPI;
91 drv->Base.API.CreateWindowSurface = _eglCreateWindowSurfacePPAPI;
92 drv->Base.API.CreatePbufferSurface = _eglCreatePbufferSurfacePPAPI;
93 drv->Base.API.DestroySurface = _eglDestroySurfacePPAPI;
94 drv->Base.API.SwapBuffers = _eglSwapBuffersPPAPI;
95
96 drv->Base.Name = "PPAPI";
97 drv->Base.Unload = _unloadPPAPI;
98
99 return &drv->Base;
100 }
101
OLDNEW
« no previous file with comments | « ppapi/lib/gl/egl/egldriver.c ('k') | ppapi/lib/gl/include/EGL/egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698