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

Side by Side Diff: ppapi/lib/gl/include/EGL/eglplatform.h

Issue 5865002: Added native EGL types for pepper platform. (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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #ifndef __eglplatform_h_ 1 #ifndef __eglplatform_h_
2 #define __eglplatform_h_ 2 #define __eglplatform_h_
3 3
4 /* 4 /*
5 ** Copyright (c) 2007-2009 The Khronos Group Inc. 5 ** Copyright (c) 2007-2009 The Khronos Group Inc.
6 ** 6 **
7 ** Permission is hereby granted, free of charge, to any person obtaining a 7 ** Permission is hereby granted, free of charge, to any person obtaining a
8 ** copy of this software and/or associated documentation files (the 8 ** copy of this software and/or associated documentation files (the
9 ** "Materials"), to deal in the Materials without restriction, including 9 ** "Materials"), to deal in the Materials without restriction, including
10 ** without limitation the rights to use, copy, modify, merge, publish, 10 ** without limitation the rights to use, copy, modify, merge, publish,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 * Windows Device Context. They must be defined in platform-specific 60 * Windows Device Context. They must be defined in platform-specific
61 * code below. The EGL-prefixed versions of Native*Type are the same 61 * code below. The EGL-prefixed versions of Native*Type are the same
62 * types, renamed in EGL 1.3 so all types in the API start with "EGL". 62 * types, renamed in EGL 1.3 so all types in the API start with "EGL".
63 * 63 *
64 * Khronos STRONGLY RECOMMENDS that you use the default definitions 64 * Khronos STRONGLY RECOMMENDS that you use the default definitions
65 * provided below, since these changes affect both binary and source 65 * provided below, since these changes affect both binary and source
66 * portability of applications using EGL running on different EGL 66 * portability of applications using EGL running on different EGL
67 * implementations. 67 * implementations.
68 */ 68 */
69 69
70 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__S CITECH_SNAP__) /* Win32 and WinCE */ 70 #include "ppapi/c/pp_instance.h"
71 #ifndef WIN32_LEAN_AND_MEAN
72 #define WIN32_LEAN_AND_MEAN 1
73 #endif
74 #include <windows.h>
75 71
76 typedef HDC EGLNativeDisplayType; 72 typedef PP_Instance EGLNativeDisplayType;
77 typedef HBITMAP EGLNativePixmapType; 73 typedef PP_Instance EGLNativeWindowType;
78 typedef HWND EGLNativeWindowType; 74 typedef khronos_int32_t EGLNativePixmapType; // Not supported.
79
80 #elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
81
82 typedef int EGLNativeDisplayType;
83 typedef void *EGLNativeWindowType;
84 typedef void *EGLNativePixmapType;
85
86 #elif defined(__unix__)
87
88 /* X11 (tentative) */
89 #include <X11/Xlib.h>
90 #include <X11/Xutil.h>
91
92 typedef Display *EGLNativeDisplayType;
93 typedef Pixmap EGLNativePixmapType;
94 typedef Window EGLNativeWindowType;
95
96 #else
97 /* #error "Platform not recognized" */
98
99 typedef int EGLNativeDisplayType;
100 typedef int EGLNativePixmapType;
101 typedef int EGLNativeWindowType;
102
103 #endif
104 75
105 /* EGL 1.2 types, renamed for consistency in EGL 1.3 */ 76 /* EGL 1.2 types, renamed for consistency in EGL 1.3 */
106 typedef EGLNativeDisplayType NativeDisplayType; 77 typedef EGLNativeDisplayType NativeDisplayType;
107 typedef EGLNativePixmapType NativePixmapType; 78 typedef EGLNativePixmapType NativePixmapType;
108 typedef EGLNativeWindowType NativeWindowType; 79 typedef EGLNativeWindowType NativeWindowType;
109 80
110 81
111 /* Define EGLint. This must be a signed integral type large enough to contain 82 /* Define EGLint. This must be a signed integral type large enough to contain
112 * all legal attribute names and values passed into and out of EGL, whether 83 * all legal attribute names and values passed into and out of EGL, whether
113 * their type is boolean, bitmask, enumerant (symbolic constant), integer, 84 * their type is boolean, bitmask, enumerant (symbolic constant), integer,
114 * handle, or other. While in general a 32-bit integer will suffice, if 85 * handle, or other. While in general a 32-bit integer will suffice, if
115 * handles are 64 bit types, then EGLint should be defined as a signed 64-bit 86 * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
116 * integer type. 87 * integer type.
117 */ 88 */
118 typedef khronos_int32_t EGLint; 89 typedef khronos_int32_t EGLint;
119 90
120 #endif /* __eglplatform_h */ 91 #endif /* __eglplatform_h */
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698