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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/lib/gl/egl/egldriver_ppapi.c
===================================================================
--- ppapi/lib/gl/egl/egldriver_ppapi.c (revision 0)
+++ ppapi/lib/gl/egl/egldriver_ppapi.c (revision 0)
@@ -0,0 +1,101 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <stdlib.h>
+#include "third_party/mesa/MesaLib/src/egl/main/egldriver.h"
+
+/**
+ * This is an EGL driver that wraps PPAPI.
+ */
+
+/** Subclass of _EGLDriver */
+typedef struct _egl_driver_ppapi {
+ _EGLDriver Base; /* base class */
+} _EGLDriverPPAPI;
+
+static EGLBoolean _eglInitializePPAPI(_EGLDriver *drv,
+ _EGLDisplay *dpy,
+ EGLint *major,
+ EGLint *minor) {
+ return EGL_FALSE;
+}
+
+static EGLBoolean _eglTerminatePPAPI(_EGLDriver *drv,
+ _EGLDisplay *dpy) {
+ return EGL_FALSE;
+}
+
+static _EGLContext *_eglCreateContextPPAPI(_EGLDriver *drv,
+ _EGLDisplay *dpy,
+ _EGLConfig *config,
+ _EGLContext *share,
+ const EGLint *attrib_list) {
+ return NULL;
+}
+
+static EGLBoolean _eglDestroyContextPPAPI(_EGLDriver *drv,
+ _EGLDisplay *dpy,
+ _EGLContext *ctx) {
+ return EGL_FALSE;
+}
+
+static _EGLSurface *_eglCreateWindowSurfacePPAPI(_EGLDriver *drv,
+ _EGLDisplay *dpy,
+ _EGLConfig *config,
+ EGLNativeWindowType window,
+ const EGLint *attrib_list) {
+ return NULL;
+}
+
+static _EGLSurface *_eglCreatePbufferSurfacePPAPI(_EGLDriver *drv,
+ _EGLDisplay *dpy,
+ _EGLConfig *config,
+ const EGLint *attrib_list) {
+ return NULL;
+}
+
+static EGLBoolean _eglDestroySurfacePPAPI(_EGLDriver *drv,
+ _EGLDisplay *dpy,
+ _EGLSurface *surface) {
+ return EGL_FALSE;
+}
+
+static EGLBoolean _eglSwapBuffersPPAPI(_EGLDriver *drv,
+ _EGLDisplay *dpy,
+ _EGLSurface *draw) {
+ return EGL_FALSE;
+}
+
+static void _unloadPPAPI(_EGLDriver *drv) {
+ free(drv);
+}
+
+/**
+ * This is the main entrypoint into the driver, called by egl dispatch API.
+ * Create a new _EGLDriver object and init its dispatch table.
+ */
+_EGLDriver* _eglMain(const char *args)
+{
+ _EGLDriverPPAPI *drv = (_EGLDriverPPAPI *)
+ calloc(1, sizeof(_EGLDriverPPAPI));
+
+ if (!drv)
+ return NULL;
+
+ _eglInitDriverFallbacks(&drv->Base);
+ drv->Base.API.Initialize = _eglInitializePPAPI;
+ drv->Base.API.Terminate = _eglTerminatePPAPI;
+ drv->Base.API.CreateContext = _eglCreateContextPPAPI;
+ drv->Base.API.DestroyContext = _eglDestroyContextPPAPI;
+ drv->Base.API.CreateWindowSurface = _eglCreateWindowSurfacePPAPI;
+ drv->Base.API.CreatePbufferSurface = _eglCreatePbufferSurfacePPAPI;
+ drv->Base.API.DestroySurface = _eglDestroySurfacePPAPI;
+ drv->Base.API.SwapBuffers = _eglSwapBuffersPPAPI;
+
+ drv->Base.Name = "PPAPI";
+ drv->Base.Unload = _unloadPPAPI;
+
+ return &drv->Base;
+}
+
Property changes on: ppapi\lib\gl\egl\egldriver_ppapi.c
___________________________________________________________________
Added: svn:eol-style
+ LF
« 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