OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 EGL10.EGL_NONE | 80 EGL10.EGL_NONE |
81 }; | 81 }; |
82 public static final int[] CONFIG_PIXEL_BUFFER = { | 82 public static final int[] CONFIG_PIXEL_BUFFER = { |
83 EGL10.EGL_RED_SIZE, 8, | 83 EGL10.EGL_RED_SIZE, 8, |
84 EGL10.EGL_GREEN_SIZE, 8, | 84 EGL10.EGL_GREEN_SIZE, 8, |
85 EGL10.EGL_BLUE_SIZE, 8, | 85 EGL10.EGL_BLUE_SIZE, 8, |
86 EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, | 86 EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, |
87 EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT, | 87 EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT, |
88 EGL10.EGL_NONE | 88 EGL10.EGL_NONE |
89 }; | 89 }; |
| 90 public static final int[] CONFIG_PIXEL_RGBA_BUFFER = { |
| 91 EGL10.EGL_RED_SIZE, 8, |
| 92 EGL10.EGL_GREEN_SIZE, 8, |
| 93 EGL10.EGL_BLUE_SIZE, 8, |
| 94 EGL10.EGL_ALPHA_SIZE, 8, |
| 95 EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, |
| 96 EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT, |
| 97 EGL10.EGL_NONE |
| 98 }; |
90 public static final int[] CONFIG_RECORDABLE = { | 99 public static final int[] CONFIG_RECORDABLE = { |
91 EGL10.EGL_RED_SIZE, 8, | 100 EGL10.EGL_RED_SIZE, 8, |
92 EGL10.EGL_GREEN_SIZE, 8, | 101 EGL10.EGL_GREEN_SIZE, 8, |
93 EGL10.EGL_BLUE_SIZE, 8, | 102 EGL10.EGL_BLUE_SIZE, 8, |
94 EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, | 103 EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, |
95 EGL_RECORDABLE_ANDROID, 1, | 104 EGL_RECORDABLE_ANDROID, 1, |
96 EGL10.EGL_NONE | 105 EGL10.EGL_NONE |
97 }; | 106 }; |
98 | 107 |
99 // Create a new context with the specified config attributes, sharing data wit
h sharedContext. | 108 // Create a new context with the specified config attributes, sharing data wit
h sharedContext. |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 EGLContext rootContext = | 358 EGLContext rootContext = |
350 sharedContext == null ? EGL10.EGL_NO_CONTEXT : sharedContext.eglContext; | 359 sharedContext == null ? EGL10.EGL_NO_CONTEXT : sharedContext.eglContext; |
351 EGLContext eglContext = | 360 EGLContext eglContext = |
352 egl.eglCreateContext(eglDisplay, eglConfig, rootContext, contextAttribut
es); | 361 egl.eglCreateContext(eglDisplay, eglConfig, rootContext, contextAttribut
es); |
353 if (eglContext == EGL10.EGL_NO_CONTEXT) { | 362 if (eglContext == EGL10.EGL_NO_CONTEXT) { |
354 throw new RuntimeException("Failed to create EGL context"); | 363 throw new RuntimeException("Failed to create EGL context"); |
355 } | 364 } |
356 return eglContext; | 365 return eglContext; |
357 } | 366 } |
358 } | 367 } |
OLD | NEW |