summaryrefslogtreecommitdiffstats
path: root/opengl/tools/glgen/src
Commit message (Collapse)AuthorAgeFilesLines
* Replace JNI primitive array critical calls with non-critical ones.Hiroshi Yamauchi2015-05-122-18/+136
| | | | | | | The glgen part. Bug: 19235243 Change-Id: I69dfa84f15366808b964517c1ba270ddeb3c5940
* opengl: Add GLES31 and GLES31Ext class templatesJesse Hall2014-05-201-1/+2
| | | | | Bug: 15028495 Change-Id: I276d04f029d441e092428fad72f09ca15e1d233a
* Merge "Use reinterpret_cast when an integer is cast to a pointer"Narayan Kamath2014-02-251-1/+3
|\
| * Use reinterpret_cast when an integer is cast to a pointerAshok Bhat2014-02-241-1/+3
| | | | | | | | | | Change-Id: I5adcd59f58c029f7b2b596f4826d8ea69fb9bba6 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
* | Use long for pointers in opengl/EGL classesAshok Bhat2014-02-241-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | EGL classes in frameworks/base have to be updated to support 64-bit platforms. Key changes in the EGL classes include [x] EGLObjectHandle class - EGLObjectHandle class has two public methods (constructor and getHandle) that assume handles are 32-bit. They have not been changed. Instead, two new hidden methods (EGLObjectHandle(long) and getNativeHandle) have been added. [x] EG14 class - Two public methods eglGetDisplay and eglCreatePbufferFromClientBuffer assume that handles are 32-bit. They have been changed to throw unsupported operation exception on non 32-bit machines. Two new methods eglGetDisplay(long) and eglCreatePbufferFromClientBuffer(...long buffer..) have been added to support 64-bit handles. To allow the above changes in frameworks/base EGL classes, corresponding code generation mechanism in frameworks/native has been updated. Change-Id: I5d0a62e10c20ccf05f610d6608b8dfb6414b5116 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
* Fix OpenGL stub exception handling.Elliott Hughes2013-09-241-0/+1
| | | | | Bug: https://code.google.com/p/android/issues/detail?id=60390 Change-Id: I2bdc22c5fe75f5e41ffb9dd9259ae92cf8a12917
* Generate new EGLExt classJesse Hall2013-05-021-21/+21
| | | | | | | | Initially populated with EGL_ANDROID_presentation_time (moved from the EGL14 class) and the ES-relevant parts of EGL_KHR_create_context. Bug: 8678160 Change-Id: Ifed2ee3da264ca701ae1f4b309a0758f7fcc3acc
* Add buffer object versions of several functionsJesse Hall2013-04-101-6/+16
| | | | | | | | | | | Some of these are new ES3 functions, some are existing ES2 functions that can now use the new pixel pack/unpack buffer bindings. glDrawElementsInstanced needs a special case since the pointer/offset arg isn't the last one like the generator assumes. Bug: 8566953 Change-Id: I638a36b0a31aefcb5bfee6f4d049348223045103
* Add *int64 and GLsync types and related functionsJesse Hall2013-04-102-1/+7
| | | | | | | | | | Return values are declared with the C return type, but the JNI function returns the JNI return type. In the case of GLsync/jlong as in glFenceSync(), this causes a compile error. So the generator now explicitly casts the return value to the JNI return type. Bug: 8566953 Change-Id: I814befe2e4cce745434cbc4e1c8639fc3ce8aeae
* Support "const GLChar*" and "const GLenum*" typesJesse Hall2013-04-102-1/+6
| | | | | Bug: 8566953 Change-Id: I349575e592e8b0d93d14237230b69bec4e04cf3e
* Generate GLES30 class, just a clone of GLES20 for nowJesse Hall2013-04-101-1/+1
| | | | | Bug: 8566953 Change-Id: I6fad880344b9c247de4018711ea7cb6eb1a609d6
* Add eglPresentationTimeANDROIDAndy McFadden2013-03-052-1/+2
| | | | | | | | | | Added EGL extension to set a timestamp on a surface. Also, fix JNI encoding of "long" in glgen. Bug 8191230 Change-Id: I38b7334bade3f8ff02bffe600bb74469ef22c164
* add some missing parameter validation in GLES java bindingsMathias Agopian2013-02-253-28/+39
| | | | | | | | | | | | | | | | | - added support for comments in checks.spec - added most missing checks - added and commented with // special-cased functions - added and commented with # functions that are still missing validation checks - moved glGet* to a special case and updated all the "pnames" from the khronos spec - changed ifcheck to default to 1 value. this allows us to simplify the checks.spec file and handle unknown pnames automatically (they'll be validated against 1 value, if it happens to need more, the call will go through but the validation will not happen). - refactored the cpp headers in to a common header + GLES version specific header Bug: 7402895 Change-Id: Ib5c68ca0ca416407b4cfa36e3a21901b2d6263ab
* Fixed bug in opengl es binding generationThomas Tafertshofer2012-07-231-1/+6
| | | | | | | | This fixes the glgen code generation for methods which have a buffer arg that can be NULL. Bug: 6845189 Change-Id: I5fb745b806601e5665f97bfd15fd865cd9c241ed
* Merge "OpenGL bindings fix for methods with iobuffer args"Mathias Agopian2012-07-181-6/+32
|\
| * OpenGL bindings fix for methods with iobuffer argsThomas Tafertshofer2012-07-121-6/+32
| | | | | | | | | | | | | | | | This changes generation of the OpenGL bindings to prevent crashes of methods with more then one nio buffer argument. Bug: 6772416 Change-Id: I4eff25c2f568dea78a6ffd3e95ff4620ab4b3b7d
* | Remove @hide from the generated EGL 1.4 APIThomas Tafertshofer2012-07-131-1/+1
|/ | | | Change-Id: Ia5707533fcf1186ef648b8a4e25987f5e7e7dea3
* improve glgen tool to support EGL1.4Thomas Tafertshofer2012-07-106-147/+581
| | | | | | | | - added EGL1.4 bindings generation - fixed bugs in GLES bindings Bug: 6709865 Change-Id: I04ac63f652e1968a51eb833f47e00336ea449980
* Kill the global references in the OpenGL wrappers.Elliott Hughes2011-04-111-117/+89
| | | | | | | | | | | | | | | Just use jniThrowException instead. Note that it would be trivial to throw seemingly more appropriate exceptions (NullPointerException and OutOfMemoryException in particular), but I'm only attempting to preserve existing behavior here. I also found shadowing bugs in some of the special-case functions, which would previously always have leaked memory. This also moves an accidental change to a generated file (ActivityThread -> AppGlobals) into the generator, so it won't be overwritten in future. Change-Id: Iab570310b568cb406c60dd0e2b8211f8a36ae590
* Add OpenGL ES 2.0 VBO versions glDrawElements and glVertexAttribPointer.Jack Palevich2010-06-221-1/+1
| | | | Change-Id: Id0069535e97fe96eef74e4d0c1d19b010061fe3b
* Add correct copyright headers to multiple filesKenny Root2010-03-1111-0/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Format for the list of changes shows the origin commit reference followed by the file name. 33931-p9 awt/org/apache/harmony/awt/gl/font/AndroidGlyphVector.java 33931-p9 awt/org/apache/harmony/awt/gl/image/PngDecoderJava.java 133776-p9 core/java/android/app/IntentService.java 127013-p9 core/java/android/appwidget/AppWidgetHost.java 27863-p9 core/java/android/bluetooth/BluetoothAudioGateway.java 60765-p9 core/java/android/content/SyncResult.java 43920-p9 core/java/android/content/pm/ActivityInfo.java 43920-p9 core/java/android/content/pm/ApplicationInfo.java 43920-p9 core/java/android/content/pm/InstrumentationInfo.java 43920-p9 core/java/android/content/pm/PackageInfo.java 44103-p9 core/java/android/content/pm/PackageItemInfo.java 68960-p9 core/java/android/content/pm/PackageStats.java 43920-p9 core/java/android/content/pm/ResolveInfo.java 43920-p9 core/java/android/content/pm/ServiceInfo.java 60641-p9 core/java/android/content/res/Configuration.java 60734-p9 core/java/android/content/res/TypedArray.java 137672-p9 core/java/android/inputmethodservice/ExtractButton.java 123112-p9 core/java/android/inputmethodservice/ExtractEditText.java 119291-p9 core/java/android/inputmethodservice/IInputMethodSessionWrapper.java 112946-p9 core/java/android/inputmethodservice/IInputMethodWrapper.java 115078-p9 core/java/android/os/BatteryStats.java 124790-p9 core/java/android/text/style/UpdateAppearance.java 45083-p9 core/java/android/view/RawInputEvent.java 101491-p9 core/java/android/view/inputmethod/EditorInfo.java 114701-p9 core/java/android/view/inputmethod/ExtractedText.java 123112-p9 core/java/android/view/inputmethod/ExtractedTextRequest.java 119291-p9 core/java/com/android/internal/os/HandlerCaller.java 129279-p9 core/java/com/android/internal/os/PkgUsageStats.java 114701-p9 core/java/com/android/internal/view/IInputConnectionWrapper.java 114701-p9 core/java/com/android/internal/view/InputConnectionWrapper.java 84364-p9 opengl/java/android/opengl/EGLLogWrapper.java 11355-p9 opengl/tools/glgen/src/CFunc.java 11355-p9 opengl/tools/glgen/src/CType.java 11355-p9 opengl/tools/glgen/src/CodeEmitter.java 11355-p9 opengl/tools/glgen/src/GenerateGL.java 11355-p9 opengl/tools/glgen/src/JFunc.java 11355-p9 opengl/tools/glgen/src/JType.java 11355-p9 opengl/tools/glgen/src/JniCodeEmitter.java 11355-p9 opengl/tools/glgen/src/ParameterChecker.java 57236-p9 services/java/com/android/server/status/AnimatedImageView.java 66754-p9 services/java/com/android/server/status/CloseDragHandle.java 57188-p9 services/java/com/android/server/status/DateView.java 46928-p9 services/java/com/android/server/status/ExpandedView.java 70590-p9 services/java/com/android/server/status/FixedSizeDrawable.java 45968-p9 services/java/com/android/server/status/IconData.java 57470-p9 services/java/com/android/server/status/IconMerger.java 82719-p9 services/java/com/android/server/status/LatestItemView.java 45968-p9 services/java/com/android/server/status/NotificationData.java 66754-p9 services/java/com/android/server/status/NotificationLinearLayout.java 57458-p9 services/java/com/android/server/status/NotificationViewList.java 45968-p9 services/java/com/android/server/status/StatusBarException.java 45968-p9 services/java/com/android/server/status/StatusBarIcon.java 46130-p9 services/java/com/android/server/status/StatusBarNotification.java 45968-p9 services/java/com/android/server/status/StatusBarView.java 46199-p9 services/java/com/android/server/status/Ticker.java 62286-p9 services/java/com/android/server/status/TickerView.java 57188-p9 services/java/com/android/server/status/TrackingView.java 86041-p9 telephony/java/android/telephony/PhoneStateListener.java 87020-p9 telephony/java/com/android/internal/telephony/TelephonyIntents.java 136269-p9 telephony/java/com/android/internal/telephony/gsm/SpnOverride.java 34409-p9 tests/FrameworkTest/src/com/android/frameworktest/FrameworkTestApplication.java 55717-p9 tests/FrameworkTest/src/com/android/frameworktest/performance/InvalidateCycle.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/AutoCompleteTextViewActivityLandscape.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/AutoCompleteTextViewActivityPortrait.java 129372-p9 tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityNonScrollablePanScan.java 129372-p9 tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityNonScrollableResize.java 129372-p9 tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityScrollablePanScan.java 129372-p9 tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityScrollableResize.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/BottomEditTextActivityPanScan.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/BottomEditTextActivityResize.java 127341-p9 tests/ImfTest/src/com/android/imftest/samples/ButtonActivity.java 129347-p9 tests/ImfTest/src/com/android/imftest/samples/DialogActivity.java 129372-p9 tests/ImfTest/src/com/android/imftest/samples/EditTextActivityDialog.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/ManyEditTextActivityNoScrollPanScan.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/ManyEditTextActivityScrollPanScan.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/ManyEditTextActivityScrollResize.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/OneEditTextActivityNotSelected.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/OneEditTextActivitySelected.java 25959-p9 tests/framework-tests/src/android/test/FrameworkTests.java 46162-p9 tests/framework-tests/src/com/android/internal/http/multipart/MultipartTest.java 77101-p9 tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/NinePatchTest.java 9788976b1465ce982b5ae7c741345edd0ecd9322 core/java/android/accounts/AuthenticatorDescription.java 53332883543868fb83e111a07306368b7772b340 core/java/android/app/UiModeManager.java 93e7e22ec91dbc641d10ca6d70423e1357a95bba core/java/android/app/FullBackupAgent.java 328c0e7986aa6bb7752ec6de3da9c999920bb55f core/java/android/content/CursorEntityIterator.java 307da1a46b4c9b711bafe8fbaaa6b98e8868c18e core/java/android/content/SyncQueue.java 307da1a46b4c9b711bafe8fbaaa6b98e8868c18e core/java/android/content/SyncOperation.java eb034652c2037a47ebfd99779e8383bb8bb528af core/java/android/content/pm/LabeledIntent.java 49237345d83e62fdb9eb8d50b13ad086636a04fa core/java/android/content/pm/FeatureInfo.java a2b6c3775ed6b8924232d6a01bae4a19740a15f8 core/java/android/content/pm/PackageInfoLite.java 3ecd5f437580e49d80beecd29489d5fb1f7a7db0 core/java/android/content/pm/RegisteredServicesCacheListener.java 5ebbb4a6b3e16f711735ae0615b9a9ea64faad38 core/java/android/content/pm/XmlSerializerAndParser.java c4516a7b62de525e3d6d5e76851bdfaf12c11f05 core/java/android/database/sqlite/SQLiteTransactionListener.java 9bbc21a773cbdfbef2876a75c32bda5839647751 core/java/com/android/internal/backup/LocalTransport.java 21f1bd17b2dfe361acbb28453b3f3b1a110932fa core/java/com/android/internal/content/PackageMonitor.java 4c62fc0e1e5ea9c69a12a7d1cf8b3ec8b2d114a3 core/java/com/android/internal/view/BaseSurfaceHolder.java 4c62fc0e1e5ea9c69a12a7d1cf8b3ec8b2d114a3 core/java/com/android/internal/view/BaseIWindow.java e540833fdff4d58e37c9ba859388e24e2945ed45 core/java/com/android/internal/os/SamplingProfilerIntegration.java 192ab903887bbb8e7c7b6da5c581573850e30f46 core/tests/coretests/src/android/widget/expandablelistview/PositionTesterContextMenuListener.java 1619367ab823150fa8856d419abe02ceb75886f1 media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java 27f8002e591b5c579f75b2580183b5d1c4219cd4 opengl/tools/glgen/stubs/gles11/glGetString.java 560814f6b11abe83ff0c4ed18cac015c276b3181 opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.java 560814f6b11abe83ff0c4ed18cac015c276b3181 opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.java 560814f6b11abe83ff0c4ed18cac015c276b3181 opengl/tools/glgen/stubs/gles11/glShaderSource.java 1c4907ee77392afb768c2f088e0dedbe4239f6fb opengl/tools/glgen/src/GenerateGLES.java 1c4907ee77392afb768c2f088e0dedbe4239f6fb opengl/tools/glgen/src/Jsr239CodeEmitter.java 1c4907ee77392afb768c2f088e0dedbe4239f6fb opengl/tools/glgen/src/GLESCodeEmitter.java 69e21f5f6e0d04539cd92848ea009dd615d88c2c opengl/tests/gldual/src/com/android/gldual/TriangleRenderer.java c028be4f3b8c7476b46859f66c3f33d528adf181 packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java 7c6efa13f129dbae5319f0981a430d4662f43354 tests/BrowserPowerTest/src/com/android/browserpowertest/PowerMeasurement.java 7c6efa13f129dbae5319f0981a430d4662f43354 tests/BrowserPowerTest/src/com/android/browserpowertest/PowerTestActivity.java 7c6efa13f129dbae5319f0981a430d4662f43354 tests/BrowserPowerTest/src/com/android/browserpowertest/PowerTestRunner.java df8a3f31d871db25e952972c2eb346a71186e9e3 tests/BrowserTestPlugin/src/com/android/testplugin/TestPlugin.java cfaef699e1dfb3a75d5b51f3b15816f13670fd51 tests/permission/src/com/android/framework/permission/tests/ActivityManagerPermissionTests.java cfaef699e1dfb3a75d5b51f3b15816f13670fd51 tests/permission/src/com/android/framework/permission/tests/ServiceManagerPermissionTests.java cfaef699e1dfb3a75d5b51f3b15816f13670fd51 tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java Copyright header moved to top in following file: core/tests/coretests/src/android/widget/ListViewTest.java Change-Id: I3c3198be5a0ba36e18679ed834170432bf0b8418
* Implement the GL11ExtensionPack APIs.Jack Palevich2010-01-281-2/+54
|
* Implement Matrix Palette extension.Jack Palevich2009-12-081-7/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for formerly-unimplemented methods: glCurrentPaletteMatrixOES glLoadPaletteFromModelViewMatrixOES glMatrixIndexPointerOES glWeightPointerOES The bulk of the changes are related to implementing the two PointerOES methods, which are implemented pretty much the same way as the existing Pointer methods were implemented. This change also changes the way glPointSizePointerOES is implemented, making it act like all the other Pointer methods. (Previously it was not handling non-direct-buffer arguments correctly.) Fixes bug 2308625 "Support matrix palette skinning in JSR239 and related APIs" Also updated GLLogWraper to fix two bugs in GLLogWrapper that were discovered while testing matrix palette skinning support: a) Handle trying to print the contents of null-but-enabled buffers. (It's not legal to draw with null-but-enabled buffers, and in fact some OpenGL drivers will crash if you try to render in this state, but there's no reason the GLLogWrapper should crash while trying to debug this situation. b) Don't read off the end of a vertex buffer with non-zero position when printing the entire contents of the vertex buffer. Now we only print from the current position to the end of the buffer.
* Add a Java API for OpenGL ES 2.0.Jack Palevich2009-11-194-11/+105
| | | | | | Currently this API is hidden. Add a test program.
* Add size checks for glBufferData and glBufferSubDataJack Palevich2009-10-211-5/+5
| | | | | | | | | | | | Without the size checks it's possible for calls to glBufferData and glBufferSubData to read off the end of the Buffer object's data, which can cause page faults. Fix end-of-line characters for the "spec" files. (That's why every line of these files is changed.) Enhance our code emitter to properly handle bounds checks for possibly-null pointers.
* Fix bug 1856713 gl Pointer functions should use Buffer positionJack Palevich2009-05-151-8/+2
| | | | | | | | JSR239 and android.opengl gl Pointer functions (glColorPointer, etc.) now respect the current setting of the Buffer position. This fixes a regression introduced when we started requiring the Buffers passed to the Pointer functions to be direct Buffers.
* Require native-order direct buffers for glXXXPointer APIs.Jack Palevich2009-05-071-19/+48
| | | | | | | | | | This was always a documented restriction, but was not enforced by the runtime until now. Until now, if you passed in some other kind of buffer, it would sometimes work, and sometimes fail. The failures happened when the Java VM moved the buffer data while OpenGL was still holding a pointer to it. Now we throw an exception rather than leaving the system in a potentially bad state.
* Add an Android-specific static OpenGL ES 1.1 Java API.Jack Palevich2009-04-167-44/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds four new public classes that expose a static OpenGL ES 1.1 API: android.opengl.GLES10 android.opengl.GLES10Ext android.opengl.GLES11 android.opengl.GLES11Ext Benefits: + The static API is slightly faster (1% to 4%) than the existing Interface based JSR239 API. + The static API is similar to the C API, which should make it easier to import C-based example code. + The static API provides a clear path for adding new OpenGL ES 1.1 extensions and OpenGL ES 2.0 APIs, neither of which currently have a JSR standard. Example: import static android.opengl.GLES10.*; ... glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); Note that it is possible to mix-and-match calls to both the static and JSR239 APIs. This works because neither API maintains state. They both call through to the same underlying C OpenGL ES APIs. Implementation details: This change enhances the "glgen" "gen" script to generate both the original JSR239 and new static OpenGL ES APIs. The contents of the generated JSR239 classes remained the same as before, so there is no need to check in new versions of the generated JSR239 classes. As part of this work the gen script was updated to be somewhat more robust, and to work with git instead of perforce. The script prints out commands to git add the generated files, but leaves it up to the script runner to actually execute those commands.
* Improve glgenJack Palevich2009-04-143-281/+275
| | | | | | | | | | | | | | | | | | | | | + gen script is really a bash script rather than a sh script, so declare that to be true. (For example, it uses pushd, which is a part of bash, but not a part of sh. Not sure how this worked until now. Possibly gen was only run in environments where /bin/sh was really bash. + Check the results of the java compile of the code generator, and abort the script if the compile fails. + Turn on the bash shell option that guards against using uninitialized variables in the script. + Remove the generated class files. Refactor JniCodeEmitter into two classes: a general-purpose JniCodeEmitter and a specific Jsr239CodeEmitter. The hope is to use JniCodeEmitter as a base for emitting static OpenGL ES bindings.
* Clean up trivial Eclipse warnings and fix whitespace.Jack Palevich2009-04-138-744/+753
| | | | | | | | | Added @Override to overridden methods. Removed unused imports. Converted tabs to spaces. Removed \r characters from end-of-lines. Add .gitignore file to ignore the .class files that are generated when the "gen" script is run.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-038-0/+1813
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-038-1813/+0
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-178-0/+1813