Merge "Import translations. DO NOT MERGE"
diff --git a/api/current.txt b/api/current.txt
index 6a69e687..6610e37 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -26854,6 +26854,279 @@
method public abstract void onMessage(int, int, int, int, java.lang.String);
}
+ public class GLES32 extends android.opengl.GLES31 {
+ method public static void glBlendBarrier();
+ method public static void glBlendEquationSeparatei(int, int, int);
+ method public static void glBlendEquationi(int, int);
+ method public static void glBlendFuncSeparatei(int, int, int, int, int);
+ method public static void glBlendFunci(int, int, int);
+ method public static void glColorMaski(int, boolean, boolean, boolean, boolean);
+ method public static void glCopyImageSubData(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
+ method public static void glDebugMessageCallback(android.opengl.GLES32.DebugProc);
+ method public static void glDebugMessageControl(int, int, int, int, int[], int, boolean);
+ method public static void glDebugMessageControl(int, int, int, int, java.nio.IntBuffer, boolean);
+ method public static void glDebugMessageInsert(int, int, int, int, int, java.lang.String);
+ method public static void glDisablei(int, int);
+ method public static void glDrawElementsBaseVertex(int, int, int, java.nio.Buffer, int);
+ method public static void glDrawElementsInstancedBaseVertex(int, int, int, java.nio.Buffer, int, int);
+ method public static void glDrawElementsInstancedBaseVertex(int, int, int, int, int, int);
+ method public static void glDrawRangeElementsBaseVertex(int, int, int, int, int, java.nio.Buffer, int);
+ method public static void glEnablei(int, int);
+ method public static void glFramebufferTexture(int, int, int, int);
+ method public static int glGetDebugMessageLog(int, int, int[], int, int[], int, int[], int, int[], int, int[], int, byte[], int);
+ method public static int glGetDebugMessageLog(int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.ByteBuffer);
+ method public static java.lang.String[] glGetDebugMessageLog(int, int[], int, int[], int, int[], int, int[], int);
+ method public static java.lang.String[] glGetDebugMessageLog(int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer);
+ method public static int glGetGraphicsResetStatus();
+ method public static java.lang.String glGetObjectLabel(int, int);
+ method public static java.lang.String glGetObjectPtrLabel(long);
+ method public static long glGetPointerv(int);
+ method public static void glGetSamplerParameterIiv(int, int, int[], int);
+ method public static void glGetSamplerParameterIiv(int, int, java.nio.IntBuffer);
+ method public static void glGetSamplerParameterIuiv(int, int, int[], int);
+ method public static void glGetSamplerParameterIuiv(int, int, java.nio.IntBuffer);
+ method public static void glGetTexParameterIiv(int, int, int[], int);
+ method public static void glGetTexParameterIiv(int, int, java.nio.IntBuffer);
+ method public static void glGetTexParameterIuiv(int, int, int[], int);
+ method public static void glGetTexParameterIuiv(int, int, java.nio.IntBuffer);
+ method public static void glGetnUniformfv(int, int, int, float[], int);
+ method public static void glGetnUniformfv(int, int, int, java.nio.FloatBuffer);
+ method public static void glGetnUniformiv(int, int, int, int[], int);
+ method public static void glGetnUniformiv(int, int, int, java.nio.IntBuffer);
+ method public static void glGetnUniformuiv(int, int, int, int[], int);
+ method public static void glGetnUniformuiv(int, int, int, java.nio.IntBuffer);
+ method public static boolean glIsEnabledi(int, int);
+ method public static void glMinSampleShading(float);
+ method public static void glObjectLabel(int, int, int, java.lang.String);
+ method public static void glObjectPtrLabel(long, java.lang.String);
+ method public static void glPatchParameteri(int, int);
+ method public static void glPopDebugGroup();
+ method public static void glPrimitiveBoundingBox(float, float, float, float, float, float, float, float);
+ method public static void glPushDebugGroup(int, int, int, java.lang.String);
+ method public static void glReadnPixels(int, int, int, int, int, int, int, java.nio.Buffer);
+ method public static void glSamplerParameterIiv(int, int, int[], int);
+ method public static void glSamplerParameterIiv(int, int, java.nio.IntBuffer);
+ method public static void glSamplerParameterIuiv(int, int, int[], int);
+ method public static void glSamplerParameterIuiv(int, int, java.nio.IntBuffer);
+ method public static void glTexBuffer(int, int, int);
+ method public static void glTexBufferRange(int, int, int, int, int);
+ method public static void glTexParameterIiv(int, int, int[], int);
+ method public static void glTexParameterIiv(int, int, java.nio.IntBuffer);
+ method public static void glTexParameterIuiv(int, int, int[], int);
+ method public static void glTexParameterIuiv(int, int, java.nio.IntBuffer);
+ method public static void glTexStorage3DMultisample(int, int, int, int, int, int, boolean);
+ field public static final int GL_BUFFER = 33504; // 0x82e0
+ field public static final int GL_CLAMP_TO_BORDER = 33069; // 0x812d
+ field public static final int GL_COLORBURN = 37530; // 0x929a
+ field public static final int GL_COLORDODGE = 37529; // 0x9299
+ field public static final int GL_COMPRESSED_RGBA_ASTC_10x10 = 37819; // 0x93bb
+ field public static final int GL_COMPRESSED_RGBA_ASTC_10x5 = 37816; // 0x93b8
+ field public static final int GL_COMPRESSED_RGBA_ASTC_10x6 = 37817; // 0x93b9
+ field public static final int GL_COMPRESSED_RGBA_ASTC_10x8 = 37818; // 0x93ba
+ field public static final int GL_COMPRESSED_RGBA_ASTC_12x10 = 37820; // 0x93bc
+ field public static final int GL_COMPRESSED_RGBA_ASTC_12x12 = 37821; // 0x93bd
+ field public static final int GL_COMPRESSED_RGBA_ASTC_4x4 = 37808; // 0x93b0
+ field public static final int GL_COMPRESSED_RGBA_ASTC_5x4 = 37809; // 0x93b1
+ field public static final int GL_COMPRESSED_RGBA_ASTC_5x5 = 37810; // 0x93b2
+ field public static final int GL_COMPRESSED_RGBA_ASTC_6x5 = 37811; // 0x93b3
+ field public static final int GL_COMPRESSED_RGBA_ASTC_6x6 = 37812; // 0x93b4
+ field public static final int GL_COMPRESSED_RGBA_ASTC_8x5 = 37813; // 0x93b5
+ field public static final int GL_COMPRESSED_RGBA_ASTC_8x6 = 37814; // 0x93b6
+ field public static final int GL_COMPRESSED_RGBA_ASTC_8x8 = 37815; // 0x93b7
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10 = 37851; // 0x93db
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5 = 37848; // 0x93d8
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6 = 37849; // 0x93d9
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8 = 37850; // 0x93da
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10 = 37852; // 0x93dc
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12 = 37853; // 0x93dd
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4 = 37840; // 0x93d0
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4 = 37841; // 0x93d1
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5 = 37842; // 0x93d2
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5 = 37843; // 0x93d3
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6 = 37844; // 0x93d4
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5 = 37845; // 0x93d5
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6 = 37846; // 0x93d6
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8 = 37847; // 0x93d7
+ field public static final int GL_CONTEXT_FLAGS = 33310; // 0x821e
+ field public static final int GL_CONTEXT_FLAG_DEBUG_BIT = 2; // 0x2
+ field public static final int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT = 4; // 0x4
+ field public static final int GL_CONTEXT_LOST = 1287; // 0x507
+ field public static final int GL_DARKEN = 37527; // 0x9297
+ field public static final int GL_DEBUG_CALLBACK_FUNCTION = 33348; // 0x8244
+ field public static final int GL_DEBUG_CALLBACK_USER_PARAM = 33349; // 0x8245
+ field public static final int GL_DEBUG_GROUP_STACK_DEPTH = 33389; // 0x826d
+ field public static final int GL_DEBUG_LOGGED_MESSAGES = 37189; // 0x9145
+ field public static final int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 33347; // 0x8243
+ field public static final int GL_DEBUG_OUTPUT = 37600; // 0x92e0
+ field public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS = 33346; // 0x8242
+ field public static final int GL_DEBUG_SEVERITY_HIGH = 37190; // 0x9146
+ field public static final int GL_DEBUG_SEVERITY_LOW = 37192; // 0x9148
+ field public static final int GL_DEBUG_SEVERITY_MEDIUM = 37191; // 0x9147
+ field public static final int GL_DEBUG_SEVERITY_NOTIFICATION = 33387; // 0x826b
+ field public static final int GL_DEBUG_SOURCE_API = 33350; // 0x8246
+ field public static final int GL_DEBUG_SOURCE_APPLICATION = 33354; // 0x824a
+ field public static final int GL_DEBUG_SOURCE_OTHER = 33355; // 0x824b
+ field public static final int GL_DEBUG_SOURCE_SHADER_COMPILER = 33352; // 0x8248
+ field public static final int GL_DEBUG_SOURCE_THIRD_PARTY = 33353; // 0x8249
+ field public static final int GL_DEBUG_SOURCE_WINDOW_SYSTEM = 33351; // 0x8247
+ field public static final int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 33357; // 0x824d
+ field public static final int GL_DEBUG_TYPE_ERROR = 33356; // 0x824c
+ field public static final int GL_DEBUG_TYPE_MARKER = 33384; // 0x8268
+ field public static final int GL_DEBUG_TYPE_OTHER = 33361; // 0x8251
+ field public static final int GL_DEBUG_TYPE_PERFORMANCE = 33360; // 0x8250
+ field public static final int GL_DEBUG_TYPE_POP_GROUP = 33386; // 0x826a
+ field public static final int GL_DEBUG_TYPE_PORTABILITY = 33359; // 0x824f
+ field public static final int GL_DEBUG_TYPE_PUSH_GROUP = 33385; // 0x8269
+ field public static final int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 33358; // 0x824e
+ field public static final int GL_DIFFERENCE = 37534; // 0x929e
+ field public static final int GL_EXCLUSION = 37536; // 0x92a0
+ field public static final int GL_FIRST_VERTEX_CONVENTION = 36429; // 0x8e4d
+ field public static final int GL_FRACTIONAL_EVEN = 36476; // 0x8e7c
+ field public static final int GL_FRACTIONAL_ODD = 36475; // 0x8e7b
+ field public static final int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 36445; // 0x8e5d
+ field public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 36263; // 0x8da7
+ field public static final int GL_FRAMEBUFFER_DEFAULT_LAYERS = 37650; // 0x9312
+ field public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 36264; // 0x8da8
+ field public static final int GL_GEOMETRY_INPUT_TYPE = 35095; // 0x8917
+ field public static final int GL_GEOMETRY_OUTPUT_TYPE = 35096; // 0x8918
+ field public static final int GL_GEOMETRY_SHADER = 36313; // 0x8dd9
+ field public static final int GL_GEOMETRY_SHADER_BIT = 4; // 0x4
+ field public static final int GL_GEOMETRY_SHADER_INVOCATIONS = 34943; // 0x887f
+ field public static final int GL_GEOMETRY_VERTICES_OUT = 35094; // 0x8916
+ field public static final int GL_GUILTY_CONTEXT_RESET = 33363; // 0x8253
+ field public static final int GL_HARDLIGHT = 37531; // 0x929b
+ field public static final int GL_HSL_COLOR = 37551; // 0x92af
+ field public static final int GL_HSL_HUE = 37549; // 0x92ad
+ field public static final int GL_HSL_LUMINOSITY = 37552; // 0x92b0
+ field public static final int GL_HSL_SATURATION = 37550; // 0x92ae
+ field public static final int GL_IMAGE_BUFFER = 36945; // 0x9051
+ field public static final int GL_IMAGE_CUBE_MAP_ARRAY = 36948; // 0x9054
+ field public static final int GL_INNOCENT_CONTEXT_RESET = 33364; // 0x8254
+ field public static final int GL_INT_IMAGE_BUFFER = 36956; // 0x905c
+ field public static final int GL_INT_IMAGE_CUBE_MAP_ARRAY = 36959; // 0x905f
+ field public static final int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 37132; // 0x910c
+ field public static final int GL_INT_SAMPLER_BUFFER = 36304; // 0x8dd0
+ field public static final int GL_INT_SAMPLER_CUBE_MAP_ARRAY = 36878; // 0x900e
+ field public static final int GL_ISOLINES = 36474; // 0x8e7a
+ field public static final int GL_IS_PER_PATCH = 37607; // 0x92e7
+ field public static final int GL_LAST_VERTEX_CONVENTION = 36430; // 0x8e4e
+ field public static final int GL_LAYER_PROVOKING_VERTEX = 33374; // 0x825e
+ field public static final int GL_LIGHTEN = 37528; // 0x9298
+ field public static final int GL_LINES_ADJACENCY = 10; // 0xa
+ field public static final int GL_LINE_STRIP_ADJACENCY = 11; // 0xb
+ field public static final int GL_LOSE_CONTEXT_ON_RESET = 33362; // 0x8252
+ field public static final int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 35378; // 0x8a32
+ field public static final int GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 36382; // 0x8e1e
+ field public static final int GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 36383; // 0x8e1f
+ field public static final int GL_MAX_DEBUG_GROUP_STACK_DEPTH = 33388; // 0x826c
+ field public static final int GL_MAX_DEBUG_LOGGED_MESSAGES = 37188; // 0x9144
+ field public static final int GL_MAX_DEBUG_MESSAGE_LENGTH = 37187; // 0x9143
+ field public static final int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 36444; // 0x8e5c
+ field public static final int GL_MAX_FRAMEBUFFER_LAYERS = 37655; // 0x9317
+ field public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 37589; // 0x92d5
+ field public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 37583; // 0x92cf
+ field public static final int GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 37069; // 0x90cd
+ field public static final int GL_MAX_GEOMETRY_INPUT_COMPONENTS = 37155; // 0x9123
+ field public static final int GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 37156; // 0x9124
+ field public static final int GL_MAX_GEOMETRY_OUTPUT_VERTICES = 36320; // 0x8de0
+ field public static final int GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 36442; // 0x8e5a
+ field public static final int GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 37079; // 0x90d7
+ field public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 35881; // 0x8c29
+ field public static final int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 36321; // 0x8de1
+ field public static final int GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 35372; // 0x8a2c
+ field public static final int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 36319; // 0x8ddf
+ field public static final int GL_MAX_LABEL_LENGTH = 33512; // 0x82e8
+ field public static final int GL_MAX_PATCH_VERTICES = 36477; // 0x8e7d
+ field public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 37587; // 0x92d3
+ field public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 37581; // 0x92cd
+ field public static final int GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 37067; // 0x90cb
+ field public static final int GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 34924; // 0x886c
+ field public static final int GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 36483; // 0x8e83
+ field public static final int GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 37080; // 0x90d8
+ field public static final int GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 36481; // 0x8e81
+ field public static final int GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 36485; // 0x8e85
+ field public static final int GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 36489; // 0x8e89
+ field public static final int GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 36479; // 0x8e7f
+ field public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 37588; // 0x92d4
+ field public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 37582; // 0x92ce
+ field public static final int GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 37068; // 0x90cc
+ field public static final int GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 34925; // 0x886d
+ field public static final int GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 36486; // 0x8e86
+ field public static final int GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 37081; // 0x90d9
+ field public static final int GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 36482; // 0x8e82
+ field public static final int GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 36490; // 0x8e8a
+ field public static final int GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 36480; // 0x8e80
+ field public static final int GL_MAX_TESS_GEN_LEVEL = 36478; // 0x8e7e
+ field public static final int GL_MAX_TESS_PATCH_COMPONENTS = 36484; // 0x8e84
+ field public static final int GL_MAX_TEXTURE_BUFFER_SIZE = 35883; // 0x8c2b
+ field public static final int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 36443; // 0x8e5b
+ field public static final int GL_MIN_SAMPLE_SHADING_VALUE = 35895; // 0x8c37
+ field public static final int GL_MULTIPLY = 37524; // 0x9294
+ field public static final int GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY = 37762; // 0x9382
+ field public static final int GL_MULTISAMPLE_LINE_WIDTH_RANGE = 37761; // 0x9381
+ field public static final int GL_NO_RESET_NOTIFICATION = 33377; // 0x8261
+ field public static final int GL_OVERLAY = 37526; // 0x9296
+ field public static final int GL_PATCHES = 14; // 0xe
+ field public static final int GL_PATCH_VERTICES = 36466; // 0x8e72
+ field public static final int GL_PRIMITIVES_GENERATED = 35975; // 0x8c87
+ field public static final int GL_PRIMITIVE_BOUNDING_BOX = 37566; // 0x92be
+ field public static final int GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED = 33313; // 0x8221
+ field public static final int GL_PROGRAM = 33506; // 0x82e2
+ field public static final int GL_PROGRAM_PIPELINE = 33508; // 0x82e4
+ field public static final int GL_QUADS = 7; // 0x7
+ field public static final int GL_QUERY = 33507; // 0x82e3
+ field public static final int GL_REFERENCED_BY_GEOMETRY_SHADER = 37641; // 0x9309
+ field public static final int GL_REFERENCED_BY_TESS_CONTROL_SHADER = 37639; // 0x9307
+ field public static final int GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 37640; // 0x9308
+ field public static final int GL_RESET_NOTIFICATION_STRATEGY = 33366; // 0x8256
+ field public static final int GL_SAMPLER = 33510; // 0x82e6
+ field public static final int GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 37131; // 0x910b
+ field public static final int GL_SAMPLER_BUFFER = 36290; // 0x8dc2
+ field public static final int GL_SAMPLER_CUBE_MAP_ARRAY = 36876; // 0x900c
+ field public static final int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 36877; // 0x900d
+ field public static final int GL_SAMPLE_SHADING = 35894; // 0x8c36
+ field public static final int GL_SCREEN = 37525; // 0x9295
+ field public static final int GL_SHADER = 33505; // 0x82e1
+ field public static final int GL_SOFTLIGHT = 37532; // 0x929c
+ field public static final int GL_STACK_OVERFLOW = 1283; // 0x503
+ field public static final int GL_STACK_UNDERFLOW = 1284; // 0x504
+ field public static final int GL_TESS_CONTROL_OUTPUT_VERTICES = 36469; // 0x8e75
+ field public static final int GL_TESS_CONTROL_SHADER = 36488; // 0x8e88
+ field public static final int GL_TESS_CONTROL_SHADER_BIT = 8; // 0x8
+ field public static final int GL_TESS_EVALUATION_SHADER = 36487; // 0x8e87
+ field public static final int GL_TESS_EVALUATION_SHADER_BIT = 16; // 0x10
+ field public static final int GL_TESS_GEN_MODE = 36470; // 0x8e76
+ field public static final int GL_TESS_GEN_POINT_MODE = 36473; // 0x8e79
+ field public static final int GL_TESS_GEN_SPACING = 36471; // 0x8e77
+ field public static final int GL_TESS_GEN_VERTEX_ORDER = 36472; // 0x8e78
+ field public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 37122; // 0x9102
+ field public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 37125; // 0x9105
+ field public static final int GL_TEXTURE_BINDING_BUFFER = 35884; // 0x8c2c
+ field public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 36874; // 0x900a
+ field public static final int GL_TEXTURE_BORDER_COLOR = 4100; // 0x1004
+ field public static final int GL_TEXTURE_BUFFER = 35882; // 0x8c2a
+ field public static final int GL_TEXTURE_BUFFER_BINDING = 35882; // 0x8c2a
+ field public static final int GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 35885; // 0x8c2d
+ field public static final int GL_TEXTURE_BUFFER_OFFSET = 37277; // 0x919d
+ field public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 37279; // 0x919f
+ field public static final int GL_TEXTURE_BUFFER_SIZE = 37278; // 0x919e
+ field public static final int GL_TEXTURE_CUBE_MAP_ARRAY = 36873; // 0x9009
+ field public static final int GL_TRIANGLES_ADJACENCY = 12; // 0xc
+ field public static final int GL_TRIANGLE_STRIP_ADJACENCY = 13; // 0xd
+ field public static final int GL_UNDEFINED_VERTEX = 33376; // 0x8260
+ field public static final int GL_UNKNOWN_CONTEXT_RESET = 33365; // 0x8255
+ field public static final int GL_UNSIGNED_INT_IMAGE_BUFFER = 36967; // 0x9067
+ field public static final int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 36970; // 0x906a
+ field public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 37133; // 0x910d
+ field public static final int GL_UNSIGNED_INT_SAMPLER_BUFFER = 36312; // 0x8dd8
+ field public static final int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 36879; // 0x900f
+ field public static final int GL_VERTEX_ARRAY = 32884; // 0x8074
+ }
+
+ public static abstract interface GLES32.DebugProc {
+ method public abstract void onMessage(int, int, int, int, java.lang.String);
+ }
+
public class GLException extends java.lang.RuntimeException {
ctor public GLException(int);
ctor public GLException(int, java.lang.String);
diff --git a/api/system-current.txt b/api/system-current.txt
index 1e1d4e5..ff37365 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -28851,6 +28851,279 @@
method public abstract void onMessage(int, int, int, int, java.lang.String);
}
+ public class GLES32 extends android.opengl.GLES31 {
+ method public static void glBlendBarrier();
+ method public static void glBlendEquationSeparatei(int, int, int);
+ method public static void glBlendEquationi(int, int);
+ method public static void glBlendFuncSeparatei(int, int, int, int, int);
+ method public static void glBlendFunci(int, int, int);
+ method public static void glColorMaski(int, boolean, boolean, boolean, boolean);
+ method public static void glCopyImageSubData(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
+ method public static void glDebugMessageCallback(android.opengl.GLES32.DebugProc);
+ method public static void glDebugMessageControl(int, int, int, int, int[], int, boolean);
+ method public static void glDebugMessageControl(int, int, int, int, java.nio.IntBuffer, boolean);
+ method public static void glDebugMessageInsert(int, int, int, int, int, java.lang.String);
+ method public static void glDisablei(int, int);
+ method public static void glDrawElementsBaseVertex(int, int, int, java.nio.Buffer, int);
+ method public static void glDrawElementsInstancedBaseVertex(int, int, int, java.nio.Buffer, int, int);
+ method public static void glDrawElementsInstancedBaseVertex(int, int, int, int, int, int);
+ method public static void glDrawRangeElementsBaseVertex(int, int, int, int, int, java.nio.Buffer, int);
+ method public static void glEnablei(int, int);
+ method public static void glFramebufferTexture(int, int, int, int);
+ method public static int glGetDebugMessageLog(int, int, int[], int, int[], int, int[], int, int[], int, int[], int, byte[], int);
+ method public static int glGetDebugMessageLog(int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.ByteBuffer);
+ method public static java.lang.String[] glGetDebugMessageLog(int, int[], int, int[], int, int[], int, int[], int);
+ method public static java.lang.String[] glGetDebugMessageLog(int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer);
+ method public static int glGetGraphicsResetStatus();
+ method public static java.lang.String glGetObjectLabel(int, int);
+ method public static java.lang.String glGetObjectPtrLabel(long);
+ method public static long glGetPointerv(int);
+ method public static void glGetSamplerParameterIiv(int, int, int[], int);
+ method public static void glGetSamplerParameterIiv(int, int, java.nio.IntBuffer);
+ method public static void glGetSamplerParameterIuiv(int, int, int[], int);
+ method public static void glGetSamplerParameterIuiv(int, int, java.nio.IntBuffer);
+ method public static void glGetTexParameterIiv(int, int, int[], int);
+ method public static void glGetTexParameterIiv(int, int, java.nio.IntBuffer);
+ method public static void glGetTexParameterIuiv(int, int, int[], int);
+ method public static void glGetTexParameterIuiv(int, int, java.nio.IntBuffer);
+ method public static void glGetnUniformfv(int, int, int, float[], int);
+ method public static void glGetnUniformfv(int, int, int, java.nio.FloatBuffer);
+ method public static void glGetnUniformiv(int, int, int, int[], int);
+ method public static void glGetnUniformiv(int, int, int, java.nio.IntBuffer);
+ method public static void glGetnUniformuiv(int, int, int, int[], int);
+ method public static void glGetnUniformuiv(int, int, int, java.nio.IntBuffer);
+ method public static boolean glIsEnabledi(int, int);
+ method public static void glMinSampleShading(float);
+ method public static void glObjectLabel(int, int, int, java.lang.String);
+ method public static void glObjectPtrLabel(long, java.lang.String);
+ method public static void glPatchParameteri(int, int);
+ method public static void glPopDebugGroup();
+ method public static void glPrimitiveBoundingBox(float, float, float, float, float, float, float, float);
+ method public static void glPushDebugGroup(int, int, int, java.lang.String);
+ method public static void glReadnPixels(int, int, int, int, int, int, int, java.nio.Buffer);
+ method public static void glSamplerParameterIiv(int, int, int[], int);
+ method public static void glSamplerParameterIiv(int, int, java.nio.IntBuffer);
+ method public static void glSamplerParameterIuiv(int, int, int[], int);
+ method public static void glSamplerParameterIuiv(int, int, java.nio.IntBuffer);
+ method public static void glTexBuffer(int, int, int);
+ method public static void glTexBufferRange(int, int, int, int, int);
+ method public static void glTexParameterIiv(int, int, int[], int);
+ method public static void glTexParameterIiv(int, int, java.nio.IntBuffer);
+ method public static void glTexParameterIuiv(int, int, int[], int);
+ method public static void glTexParameterIuiv(int, int, java.nio.IntBuffer);
+ method public static void glTexStorage3DMultisample(int, int, int, int, int, int, boolean);
+ field public static final int GL_BUFFER = 33504; // 0x82e0
+ field public static final int GL_CLAMP_TO_BORDER = 33069; // 0x812d
+ field public static final int GL_COLORBURN = 37530; // 0x929a
+ field public static final int GL_COLORDODGE = 37529; // 0x9299
+ field public static final int GL_COMPRESSED_RGBA_ASTC_10x10 = 37819; // 0x93bb
+ field public static final int GL_COMPRESSED_RGBA_ASTC_10x5 = 37816; // 0x93b8
+ field public static final int GL_COMPRESSED_RGBA_ASTC_10x6 = 37817; // 0x93b9
+ field public static final int GL_COMPRESSED_RGBA_ASTC_10x8 = 37818; // 0x93ba
+ field public static final int GL_COMPRESSED_RGBA_ASTC_12x10 = 37820; // 0x93bc
+ field public static final int GL_COMPRESSED_RGBA_ASTC_12x12 = 37821; // 0x93bd
+ field public static final int GL_COMPRESSED_RGBA_ASTC_4x4 = 37808; // 0x93b0
+ field public static final int GL_COMPRESSED_RGBA_ASTC_5x4 = 37809; // 0x93b1
+ field public static final int GL_COMPRESSED_RGBA_ASTC_5x5 = 37810; // 0x93b2
+ field public static final int GL_COMPRESSED_RGBA_ASTC_6x5 = 37811; // 0x93b3
+ field public static final int GL_COMPRESSED_RGBA_ASTC_6x6 = 37812; // 0x93b4
+ field public static final int GL_COMPRESSED_RGBA_ASTC_8x5 = 37813; // 0x93b5
+ field public static final int GL_COMPRESSED_RGBA_ASTC_8x6 = 37814; // 0x93b6
+ field public static final int GL_COMPRESSED_RGBA_ASTC_8x8 = 37815; // 0x93b7
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10 = 37851; // 0x93db
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5 = 37848; // 0x93d8
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6 = 37849; // 0x93d9
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8 = 37850; // 0x93da
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10 = 37852; // 0x93dc
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12 = 37853; // 0x93dd
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4 = 37840; // 0x93d0
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4 = 37841; // 0x93d1
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5 = 37842; // 0x93d2
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5 = 37843; // 0x93d3
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6 = 37844; // 0x93d4
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5 = 37845; // 0x93d5
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6 = 37846; // 0x93d6
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8 = 37847; // 0x93d7
+ field public static final int GL_CONTEXT_FLAGS = 33310; // 0x821e
+ field public static final int GL_CONTEXT_FLAG_DEBUG_BIT = 2; // 0x2
+ field public static final int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT = 4; // 0x4
+ field public static final int GL_CONTEXT_LOST = 1287; // 0x507
+ field public static final int GL_DARKEN = 37527; // 0x9297
+ field public static final int GL_DEBUG_CALLBACK_FUNCTION = 33348; // 0x8244
+ field public static final int GL_DEBUG_CALLBACK_USER_PARAM = 33349; // 0x8245
+ field public static final int GL_DEBUG_GROUP_STACK_DEPTH = 33389; // 0x826d
+ field public static final int GL_DEBUG_LOGGED_MESSAGES = 37189; // 0x9145
+ field public static final int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 33347; // 0x8243
+ field public static final int GL_DEBUG_OUTPUT = 37600; // 0x92e0
+ field public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS = 33346; // 0x8242
+ field public static final int GL_DEBUG_SEVERITY_HIGH = 37190; // 0x9146
+ field public static final int GL_DEBUG_SEVERITY_LOW = 37192; // 0x9148
+ field public static final int GL_DEBUG_SEVERITY_MEDIUM = 37191; // 0x9147
+ field public static final int GL_DEBUG_SEVERITY_NOTIFICATION = 33387; // 0x826b
+ field public static final int GL_DEBUG_SOURCE_API = 33350; // 0x8246
+ field public static final int GL_DEBUG_SOURCE_APPLICATION = 33354; // 0x824a
+ field public static final int GL_DEBUG_SOURCE_OTHER = 33355; // 0x824b
+ field public static final int GL_DEBUG_SOURCE_SHADER_COMPILER = 33352; // 0x8248
+ field public static final int GL_DEBUG_SOURCE_THIRD_PARTY = 33353; // 0x8249
+ field public static final int GL_DEBUG_SOURCE_WINDOW_SYSTEM = 33351; // 0x8247
+ field public static final int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 33357; // 0x824d
+ field public static final int GL_DEBUG_TYPE_ERROR = 33356; // 0x824c
+ field public static final int GL_DEBUG_TYPE_MARKER = 33384; // 0x8268
+ field public static final int GL_DEBUG_TYPE_OTHER = 33361; // 0x8251
+ field public static final int GL_DEBUG_TYPE_PERFORMANCE = 33360; // 0x8250
+ field public static final int GL_DEBUG_TYPE_POP_GROUP = 33386; // 0x826a
+ field public static final int GL_DEBUG_TYPE_PORTABILITY = 33359; // 0x824f
+ field public static final int GL_DEBUG_TYPE_PUSH_GROUP = 33385; // 0x8269
+ field public static final int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 33358; // 0x824e
+ field public static final int GL_DIFFERENCE = 37534; // 0x929e
+ field public static final int GL_EXCLUSION = 37536; // 0x92a0
+ field public static final int GL_FIRST_VERTEX_CONVENTION = 36429; // 0x8e4d
+ field public static final int GL_FRACTIONAL_EVEN = 36476; // 0x8e7c
+ field public static final int GL_FRACTIONAL_ODD = 36475; // 0x8e7b
+ field public static final int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 36445; // 0x8e5d
+ field public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 36263; // 0x8da7
+ field public static final int GL_FRAMEBUFFER_DEFAULT_LAYERS = 37650; // 0x9312
+ field public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 36264; // 0x8da8
+ field public static final int GL_GEOMETRY_INPUT_TYPE = 35095; // 0x8917
+ field public static final int GL_GEOMETRY_OUTPUT_TYPE = 35096; // 0x8918
+ field public static final int GL_GEOMETRY_SHADER = 36313; // 0x8dd9
+ field public static final int GL_GEOMETRY_SHADER_BIT = 4; // 0x4
+ field public static final int GL_GEOMETRY_SHADER_INVOCATIONS = 34943; // 0x887f
+ field public static final int GL_GEOMETRY_VERTICES_OUT = 35094; // 0x8916
+ field public static final int GL_GUILTY_CONTEXT_RESET = 33363; // 0x8253
+ field public static final int GL_HARDLIGHT = 37531; // 0x929b
+ field public static final int GL_HSL_COLOR = 37551; // 0x92af
+ field public static final int GL_HSL_HUE = 37549; // 0x92ad
+ field public static final int GL_HSL_LUMINOSITY = 37552; // 0x92b0
+ field public static final int GL_HSL_SATURATION = 37550; // 0x92ae
+ field public static final int GL_IMAGE_BUFFER = 36945; // 0x9051
+ field public static final int GL_IMAGE_CUBE_MAP_ARRAY = 36948; // 0x9054
+ field public static final int GL_INNOCENT_CONTEXT_RESET = 33364; // 0x8254
+ field public static final int GL_INT_IMAGE_BUFFER = 36956; // 0x905c
+ field public static final int GL_INT_IMAGE_CUBE_MAP_ARRAY = 36959; // 0x905f
+ field public static final int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 37132; // 0x910c
+ field public static final int GL_INT_SAMPLER_BUFFER = 36304; // 0x8dd0
+ field public static final int GL_INT_SAMPLER_CUBE_MAP_ARRAY = 36878; // 0x900e
+ field public static final int GL_ISOLINES = 36474; // 0x8e7a
+ field public static final int GL_IS_PER_PATCH = 37607; // 0x92e7
+ field public static final int GL_LAST_VERTEX_CONVENTION = 36430; // 0x8e4e
+ field public static final int GL_LAYER_PROVOKING_VERTEX = 33374; // 0x825e
+ field public static final int GL_LIGHTEN = 37528; // 0x9298
+ field public static final int GL_LINES_ADJACENCY = 10; // 0xa
+ field public static final int GL_LINE_STRIP_ADJACENCY = 11; // 0xb
+ field public static final int GL_LOSE_CONTEXT_ON_RESET = 33362; // 0x8252
+ field public static final int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 35378; // 0x8a32
+ field public static final int GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 36382; // 0x8e1e
+ field public static final int GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 36383; // 0x8e1f
+ field public static final int GL_MAX_DEBUG_GROUP_STACK_DEPTH = 33388; // 0x826c
+ field public static final int GL_MAX_DEBUG_LOGGED_MESSAGES = 37188; // 0x9144
+ field public static final int GL_MAX_DEBUG_MESSAGE_LENGTH = 37187; // 0x9143
+ field public static final int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 36444; // 0x8e5c
+ field public static final int GL_MAX_FRAMEBUFFER_LAYERS = 37655; // 0x9317
+ field public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 37589; // 0x92d5
+ field public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 37583; // 0x92cf
+ field public static final int GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 37069; // 0x90cd
+ field public static final int GL_MAX_GEOMETRY_INPUT_COMPONENTS = 37155; // 0x9123
+ field public static final int GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 37156; // 0x9124
+ field public static final int GL_MAX_GEOMETRY_OUTPUT_VERTICES = 36320; // 0x8de0
+ field public static final int GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 36442; // 0x8e5a
+ field public static final int GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 37079; // 0x90d7
+ field public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 35881; // 0x8c29
+ field public static final int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 36321; // 0x8de1
+ field public static final int GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 35372; // 0x8a2c
+ field public static final int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 36319; // 0x8ddf
+ field public static final int GL_MAX_LABEL_LENGTH = 33512; // 0x82e8
+ field public static final int GL_MAX_PATCH_VERTICES = 36477; // 0x8e7d
+ field public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 37587; // 0x92d3
+ field public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 37581; // 0x92cd
+ field public static final int GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 37067; // 0x90cb
+ field public static final int GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 34924; // 0x886c
+ field public static final int GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 36483; // 0x8e83
+ field public static final int GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 37080; // 0x90d8
+ field public static final int GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 36481; // 0x8e81
+ field public static final int GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 36485; // 0x8e85
+ field public static final int GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 36489; // 0x8e89
+ field public static final int GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 36479; // 0x8e7f
+ field public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 37588; // 0x92d4
+ field public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 37582; // 0x92ce
+ field public static final int GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 37068; // 0x90cc
+ field public static final int GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 34925; // 0x886d
+ field public static final int GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 36486; // 0x8e86
+ field public static final int GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 37081; // 0x90d9
+ field public static final int GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 36482; // 0x8e82
+ field public static final int GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 36490; // 0x8e8a
+ field public static final int GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 36480; // 0x8e80
+ field public static final int GL_MAX_TESS_GEN_LEVEL = 36478; // 0x8e7e
+ field public static final int GL_MAX_TESS_PATCH_COMPONENTS = 36484; // 0x8e84
+ field public static final int GL_MAX_TEXTURE_BUFFER_SIZE = 35883; // 0x8c2b
+ field public static final int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 36443; // 0x8e5b
+ field public static final int GL_MIN_SAMPLE_SHADING_VALUE = 35895; // 0x8c37
+ field public static final int GL_MULTIPLY = 37524; // 0x9294
+ field public static final int GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY = 37762; // 0x9382
+ field public static final int GL_MULTISAMPLE_LINE_WIDTH_RANGE = 37761; // 0x9381
+ field public static final int GL_NO_RESET_NOTIFICATION = 33377; // 0x8261
+ field public static final int GL_OVERLAY = 37526; // 0x9296
+ field public static final int GL_PATCHES = 14; // 0xe
+ field public static final int GL_PATCH_VERTICES = 36466; // 0x8e72
+ field public static final int GL_PRIMITIVES_GENERATED = 35975; // 0x8c87
+ field public static final int GL_PRIMITIVE_BOUNDING_BOX = 37566; // 0x92be
+ field public static final int GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED = 33313; // 0x8221
+ field public static final int GL_PROGRAM = 33506; // 0x82e2
+ field public static final int GL_PROGRAM_PIPELINE = 33508; // 0x82e4
+ field public static final int GL_QUADS = 7; // 0x7
+ field public static final int GL_QUERY = 33507; // 0x82e3
+ field public static final int GL_REFERENCED_BY_GEOMETRY_SHADER = 37641; // 0x9309
+ field public static final int GL_REFERENCED_BY_TESS_CONTROL_SHADER = 37639; // 0x9307
+ field public static final int GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 37640; // 0x9308
+ field public static final int GL_RESET_NOTIFICATION_STRATEGY = 33366; // 0x8256
+ field public static final int GL_SAMPLER = 33510; // 0x82e6
+ field public static final int GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 37131; // 0x910b
+ field public static final int GL_SAMPLER_BUFFER = 36290; // 0x8dc2
+ field public static final int GL_SAMPLER_CUBE_MAP_ARRAY = 36876; // 0x900c
+ field public static final int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 36877; // 0x900d
+ field public static final int GL_SAMPLE_SHADING = 35894; // 0x8c36
+ field public static final int GL_SCREEN = 37525; // 0x9295
+ field public static final int GL_SHADER = 33505; // 0x82e1
+ field public static final int GL_SOFTLIGHT = 37532; // 0x929c
+ field public static final int GL_STACK_OVERFLOW = 1283; // 0x503
+ field public static final int GL_STACK_UNDERFLOW = 1284; // 0x504
+ field public static final int GL_TESS_CONTROL_OUTPUT_VERTICES = 36469; // 0x8e75
+ field public static final int GL_TESS_CONTROL_SHADER = 36488; // 0x8e88
+ field public static final int GL_TESS_CONTROL_SHADER_BIT = 8; // 0x8
+ field public static final int GL_TESS_EVALUATION_SHADER = 36487; // 0x8e87
+ field public static final int GL_TESS_EVALUATION_SHADER_BIT = 16; // 0x10
+ field public static final int GL_TESS_GEN_MODE = 36470; // 0x8e76
+ field public static final int GL_TESS_GEN_POINT_MODE = 36473; // 0x8e79
+ field public static final int GL_TESS_GEN_SPACING = 36471; // 0x8e77
+ field public static final int GL_TESS_GEN_VERTEX_ORDER = 36472; // 0x8e78
+ field public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 37122; // 0x9102
+ field public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 37125; // 0x9105
+ field public static final int GL_TEXTURE_BINDING_BUFFER = 35884; // 0x8c2c
+ field public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 36874; // 0x900a
+ field public static final int GL_TEXTURE_BORDER_COLOR = 4100; // 0x1004
+ field public static final int GL_TEXTURE_BUFFER = 35882; // 0x8c2a
+ field public static final int GL_TEXTURE_BUFFER_BINDING = 35882; // 0x8c2a
+ field public static final int GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 35885; // 0x8c2d
+ field public static final int GL_TEXTURE_BUFFER_OFFSET = 37277; // 0x919d
+ field public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 37279; // 0x919f
+ field public static final int GL_TEXTURE_BUFFER_SIZE = 37278; // 0x919e
+ field public static final int GL_TEXTURE_CUBE_MAP_ARRAY = 36873; // 0x9009
+ field public static final int GL_TRIANGLES_ADJACENCY = 12; // 0xc
+ field public static final int GL_TRIANGLE_STRIP_ADJACENCY = 13; // 0xd
+ field public static final int GL_UNDEFINED_VERTEX = 33376; // 0x8260
+ field public static final int GL_UNKNOWN_CONTEXT_RESET = 33365; // 0x8255
+ field public static final int GL_UNSIGNED_INT_IMAGE_BUFFER = 36967; // 0x9067
+ field public static final int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 36970; // 0x906a
+ field public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 37133; // 0x910d
+ field public static final int GL_UNSIGNED_INT_SAMPLER_BUFFER = 36312; // 0x8dd8
+ field public static final int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 36879; // 0x900f
+ field public static final int GL_VERTEX_ARRAY = 32884; // 0x8074
+ }
+
+ public static abstract interface GLES32.DebugProc {
+ method public abstract void onMessage(int, int, int, int, java.lang.String);
+ }
+
public class GLException extends java.lang.RuntimeException {
ctor public GLException(int);
ctor public GLException(int, java.lang.String);
diff --git a/api/test-current.txt b/api/test-current.txt
index 8d35e47..883dd31 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -26854,6 +26854,279 @@
method public abstract void onMessage(int, int, int, int, java.lang.String);
}
+ public class GLES32 extends android.opengl.GLES31 {
+ method public static void glBlendBarrier();
+ method public static void glBlendEquationSeparatei(int, int, int);
+ method public static void glBlendEquationi(int, int);
+ method public static void glBlendFuncSeparatei(int, int, int, int, int);
+ method public static void glBlendFunci(int, int, int);
+ method public static void glColorMaski(int, boolean, boolean, boolean, boolean);
+ method public static void glCopyImageSubData(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
+ method public static void glDebugMessageCallback(android.opengl.GLES32.DebugProc);
+ method public static void glDebugMessageControl(int, int, int, int, int[], int, boolean);
+ method public static void glDebugMessageControl(int, int, int, int, java.nio.IntBuffer, boolean);
+ method public static void glDebugMessageInsert(int, int, int, int, int, java.lang.String);
+ method public static void glDisablei(int, int);
+ method public static void glDrawElementsBaseVertex(int, int, int, java.nio.Buffer, int);
+ method public static void glDrawElementsInstancedBaseVertex(int, int, int, java.nio.Buffer, int, int);
+ method public static void glDrawElementsInstancedBaseVertex(int, int, int, int, int, int);
+ method public static void glDrawRangeElementsBaseVertex(int, int, int, int, int, java.nio.Buffer, int);
+ method public static void glEnablei(int, int);
+ method public static void glFramebufferTexture(int, int, int, int);
+ method public static int glGetDebugMessageLog(int, int, int[], int, int[], int, int[], int, int[], int, int[], int, byte[], int);
+ method public static int glGetDebugMessageLog(int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.ByteBuffer);
+ method public static java.lang.String[] glGetDebugMessageLog(int, int[], int, int[], int, int[], int, int[], int);
+ method public static java.lang.String[] glGetDebugMessageLog(int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer);
+ method public static int glGetGraphicsResetStatus();
+ method public static java.lang.String glGetObjectLabel(int, int);
+ method public static java.lang.String glGetObjectPtrLabel(long);
+ method public static long glGetPointerv(int);
+ method public static void glGetSamplerParameterIiv(int, int, int[], int);
+ method public static void glGetSamplerParameterIiv(int, int, java.nio.IntBuffer);
+ method public static void glGetSamplerParameterIuiv(int, int, int[], int);
+ method public static void glGetSamplerParameterIuiv(int, int, java.nio.IntBuffer);
+ method public static void glGetTexParameterIiv(int, int, int[], int);
+ method public static void glGetTexParameterIiv(int, int, java.nio.IntBuffer);
+ method public static void glGetTexParameterIuiv(int, int, int[], int);
+ method public static void glGetTexParameterIuiv(int, int, java.nio.IntBuffer);
+ method public static void glGetnUniformfv(int, int, int, float[], int);
+ method public static void glGetnUniformfv(int, int, int, java.nio.FloatBuffer);
+ method public static void glGetnUniformiv(int, int, int, int[], int);
+ method public static void glGetnUniformiv(int, int, int, java.nio.IntBuffer);
+ method public static void glGetnUniformuiv(int, int, int, int[], int);
+ method public static void glGetnUniformuiv(int, int, int, java.nio.IntBuffer);
+ method public static boolean glIsEnabledi(int, int);
+ method public static void glMinSampleShading(float);
+ method public static void glObjectLabel(int, int, int, java.lang.String);
+ method public static void glObjectPtrLabel(long, java.lang.String);
+ method public static void glPatchParameteri(int, int);
+ method public static void glPopDebugGroup();
+ method public static void glPrimitiveBoundingBox(float, float, float, float, float, float, float, float);
+ method public static void glPushDebugGroup(int, int, int, java.lang.String);
+ method public static void glReadnPixels(int, int, int, int, int, int, int, java.nio.Buffer);
+ method public static void glSamplerParameterIiv(int, int, int[], int);
+ method public static void glSamplerParameterIiv(int, int, java.nio.IntBuffer);
+ method public static void glSamplerParameterIuiv(int, int, int[], int);
+ method public static void glSamplerParameterIuiv(int, int, java.nio.IntBuffer);
+ method public static void glTexBuffer(int, int, int);
+ method public static void glTexBufferRange(int, int, int, int, int);
+ method public static void glTexParameterIiv(int, int, int[], int);
+ method public static void glTexParameterIiv(int, int, java.nio.IntBuffer);
+ method public static void glTexParameterIuiv(int, int, int[], int);
+ method public static void glTexParameterIuiv(int, int, java.nio.IntBuffer);
+ method public static void glTexStorage3DMultisample(int, int, int, int, int, int, boolean);
+ field public static final int GL_BUFFER = 33504; // 0x82e0
+ field public static final int GL_CLAMP_TO_BORDER = 33069; // 0x812d
+ field public static final int GL_COLORBURN = 37530; // 0x929a
+ field public static final int GL_COLORDODGE = 37529; // 0x9299
+ field public static final int GL_COMPRESSED_RGBA_ASTC_10x10 = 37819; // 0x93bb
+ field public static final int GL_COMPRESSED_RGBA_ASTC_10x5 = 37816; // 0x93b8
+ field public static final int GL_COMPRESSED_RGBA_ASTC_10x6 = 37817; // 0x93b9
+ field public static final int GL_COMPRESSED_RGBA_ASTC_10x8 = 37818; // 0x93ba
+ field public static final int GL_COMPRESSED_RGBA_ASTC_12x10 = 37820; // 0x93bc
+ field public static final int GL_COMPRESSED_RGBA_ASTC_12x12 = 37821; // 0x93bd
+ field public static final int GL_COMPRESSED_RGBA_ASTC_4x4 = 37808; // 0x93b0
+ field public static final int GL_COMPRESSED_RGBA_ASTC_5x4 = 37809; // 0x93b1
+ field public static final int GL_COMPRESSED_RGBA_ASTC_5x5 = 37810; // 0x93b2
+ field public static final int GL_COMPRESSED_RGBA_ASTC_6x5 = 37811; // 0x93b3
+ field public static final int GL_COMPRESSED_RGBA_ASTC_6x6 = 37812; // 0x93b4
+ field public static final int GL_COMPRESSED_RGBA_ASTC_8x5 = 37813; // 0x93b5
+ field public static final int GL_COMPRESSED_RGBA_ASTC_8x6 = 37814; // 0x93b6
+ field public static final int GL_COMPRESSED_RGBA_ASTC_8x8 = 37815; // 0x93b7
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10 = 37851; // 0x93db
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5 = 37848; // 0x93d8
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6 = 37849; // 0x93d9
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8 = 37850; // 0x93da
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10 = 37852; // 0x93dc
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12 = 37853; // 0x93dd
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4 = 37840; // 0x93d0
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4 = 37841; // 0x93d1
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5 = 37842; // 0x93d2
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5 = 37843; // 0x93d3
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6 = 37844; // 0x93d4
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5 = 37845; // 0x93d5
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6 = 37846; // 0x93d6
+ field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8 = 37847; // 0x93d7
+ field public static final int GL_CONTEXT_FLAGS = 33310; // 0x821e
+ field public static final int GL_CONTEXT_FLAG_DEBUG_BIT = 2; // 0x2
+ field public static final int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT = 4; // 0x4
+ field public static final int GL_CONTEXT_LOST = 1287; // 0x507
+ field public static final int GL_DARKEN = 37527; // 0x9297
+ field public static final int GL_DEBUG_CALLBACK_FUNCTION = 33348; // 0x8244
+ field public static final int GL_DEBUG_CALLBACK_USER_PARAM = 33349; // 0x8245
+ field public static final int GL_DEBUG_GROUP_STACK_DEPTH = 33389; // 0x826d
+ field public static final int GL_DEBUG_LOGGED_MESSAGES = 37189; // 0x9145
+ field public static final int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 33347; // 0x8243
+ field public static final int GL_DEBUG_OUTPUT = 37600; // 0x92e0
+ field public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS = 33346; // 0x8242
+ field public static final int GL_DEBUG_SEVERITY_HIGH = 37190; // 0x9146
+ field public static final int GL_DEBUG_SEVERITY_LOW = 37192; // 0x9148
+ field public static final int GL_DEBUG_SEVERITY_MEDIUM = 37191; // 0x9147
+ field public static final int GL_DEBUG_SEVERITY_NOTIFICATION = 33387; // 0x826b
+ field public static final int GL_DEBUG_SOURCE_API = 33350; // 0x8246
+ field public static final int GL_DEBUG_SOURCE_APPLICATION = 33354; // 0x824a
+ field public static final int GL_DEBUG_SOURCE_OTHER = 33355; // 0x824b
+ field public static final int GL_DEBUG_SOURCE_SHADER_COMPILER = 33352; // 0x8248
+ field public static final int GL_DEBUG_SOURCE_THIRD_PARTY = 33353; // 0x8249
+ field public static final int GL_DEBUG_SOURCE_WINDOW_SYSTEM = 33351; // 0x8247
+ field public static final int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 33357; // 0x824d
+ field public static final int GL_DEBUG_TYPE_ERROR = 33356; // 0x824c
+ field public static final int GL_DEBUG_TYPE_MARKER = 33384; // 0x8268
+ field public static final int GL_DEBUG_TYPE_OTHER = 33361; // 0x8251
+ field public static final int GL_DEBUG_TYPE_PERFORMANCE = 33360; // 0x8250
+ field public static final int GL_DEBUG_TYPE_POP_GROUP = 33386; // 0x826a
+ field public static final int GL_DEBUG_TYPE_PORTABILITY = 33359; // 0x824f
+ field public static final int GL_DEBUG_TYPE_PUSH_GROUP = 33385; // 0x8269
+ field public static final int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 33358; // 0x824e
+ field public static final int GL_DIFFERENCE = 37534; // 0x929e
+ field public static final int GL_EXCLUSION = 37536; // 0x92a0
+ field public static final int GL_FIRST_VERTEX_CONVENTION = 36429; // 0x8e4d
+ field public static final int GL_FRACTIONAL_EVEN = 36476; // 0x8e7c
+ field public static final int GL_FRACTIONAL_ODD = 36475; // 0x8e7b
+ field public static final int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 36445; // 0x8e5d
+ field public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 36263; // 0x8da7
+ field public static final int GL_FRAMEBUFFER_DEFAULT_LAYERS = 37650; // 0x9312
+ field public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 36264; // 0x8da8
+ field public static final int GL_GEOMETRY_INPUT_TYPE = 35095; // 0x8917
+ field public static final int GL_GEOMETRY_OUTPUT_TYPE = 35096; // 0x8918
+ field public static final int GL_GEOMETRY_SHADER = 36313; // 0x8dd9
+ field public static final int GL_GEOMETRY_SHADER_BIT = 4; // 0x4
+ field public static final int GL_GEOMETRY_SHADER_INVOCATIONS = 34943; // 0x887f
+ field public static final int GL_GEOMETRY_VERTICES_OUT = 35094; // 0x8916
+ field public static final int GL_GUILTY_CONTEXT_RESET = 33363; // 0x8253
+ field public static final int GL_HARDLIGHT = 37531; // 0x929b
+ field public static final int GL_HSL_COLOR = 37551; // 0x92af
+ field public static final int GL_HSL_HUE = 37549; // 0x92ad
+ field public static final int GL_HSL_LUMINOSITY = 37552; // 0x92b0
+ field public static final int GL_HSL_SATURATION = 37550; // 0x92ae
+ field public static final int GL_IMAGE_BUFFER = 36945; // 0x9051
+ field public static final int GL_IMAGE_CUBE_MAP_ARRAY = 36948; // 0x9054
+ field public static final int GL_INNOCENT_CONTEXT_RESET = 33364; // 0x8254
+ field public static final int GL_INT_IMAGE_BUFFER = 36956; // 0x905c
+ field public static final int GL_INT_IMAGE_CUBE_MAP_ARRAY = 36959; // 0x905f
+ field public static final int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 37132; // 0x910c
+ field public static final int GL_INT_SAMPLER_BUFFER = 36304; // 0x8dd0
+ field public static final int GL_INT_SAMPLER_CUBE_MAP_ARRAY = 36878; // 0x900e
+ field public static final int GL_ISOLINES = 36474; // 0x8e7a
+ field public static final int GL_IS_PER_PATCH = 37607; // 0x92e7
+ field public static final int GL_LAST_VERTEX_CONVENTION = 36430; // 0x8e4e
+ field public static final int GL_LAYER_PROVOKING_VERTEX = 33374; // 0x825e
+ field public static final int GL_LIGHTEN = 37528; // 0x9298
+ field public static final int GL_LINES_ADJACENCY = 10; // 0xa
+ field public static final int GL_LINE_STRIP_ADJACENCY = 11; // 0xb
+ field public static final int GL_LOSE_CONTEXT_ON_RESET = 33362; // 0x8252
+ field public static final int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 35378; // 0x8a32
+ field public static final int GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 36382; // 0x8e1e
+ field public static final int GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 36383; // 0x8e1f
+ field public static final int GL_MAX_DEBUG_GROUP_STACK_DEPTH = 33388; // 0x826c
+ field public static final int GL_MAX_DEBUG_LOGGED_MESSAGES = 37188; // 0x9144
+ field public static final int GL_MAX_DEBUG_MESSAGE_LENGTH = 37187; // 0x9143
+ field public static final int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 36444; // 0x8e5c
+ field public static final int GL_MAX_FRAMEBUFFER_LAYERS = 37655; // 0x9317
+ field public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 37589; // 0x92d5
+ field public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 37583; // 0x92cf
+ field public static final int GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 37069; // 0x90cd
+ field public static final int GL_MAX_GEOMETRY_INPUT_COMPONENTS = 37155; // 0x9123
+ field public static final int GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 37156; // 0x9124
+ field public static final int GL_MAX_GEOMETRY_OUTPUT_VERTICES = 36320; // 0x8de0
+ field public static final int GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 36442; // 0x8e5a
+ field public static final int GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 37079; // 0x90d7
+ field public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 35881; // 0x8c29
+ field public static final int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 36321; // 0x8de1
+ field public static final int GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 35372; // 0x8a2c
+ field public static final int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 36319; // 0x8ddf
+ field public static final int GL_MAX_LABEL_LENGTH = 33512; // 0x82e8
+ field public static final int GL_MAX_PATCH_VERTICES = 36477; // 0x8e7d
+ field public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 37587; // 0x92d3
+ field public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 37581; // 0x92cd
+ field public static final int GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 37067; // 0x90cb
+ field public static final int GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 34924; // 0x886c
+ field public static final int GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 36483; // 0x8e83
+ field public static final int GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 37080; // 0x90d8
+ field public static final int GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 36481; // 0x8e81
+ field public static final int GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 36485; // 0x8e85
+ field public static final int GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 36489; // 0x8e89
+ field public static final int GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 36479; // 0x8e7f
+ field public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 37588; // 0x92d4
+ field public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 37582; // 0x92ce
+ field public static final int GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 37068; // 0x90cc
+ field public static final int GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 34925; // 0x886d
+ field public static final int GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 36486; // 0x8e86
+ field public static final int GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 37081; // 0x90d9
+ field public static final int GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 36482; // 0x8e82
+ field public static final int GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 36490; // 0x8e8a
+ field public static final int GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 36480; // 0x8e80
+ field public static final int GL_MAX_TESS_GEN_LEVEL = 36478; // 0x8e7e
+ field public static final int GL_MAX_TESS_PATCH_COMPONENTS = 36484; // 0x8e84
+ field public static final int GL_MAX_TEXTURE_BUFFER_SIZE = 35883; // 0x8c2b
+ field public static final int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 36443; // 0x8e5b
+ field public static final int GL_MIN_SAMPLE_SHADING_VALUE = 35895; // 0x8c37
+ field public static final int GL_MULTIPLY = 37524; // 0x9294
+ field public static final int GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY = 37762; // 0x9382
+ field public static final int GL_MULTISAMPLE_LINE_WIDTH_RANGE = 37761; // 0x9381
+ field public static final int GL_NO_RESET_NOTIFICATION = 33377; // 0x8261
+ field public static final int GL_OVERLAY = 37526; // 0x9296
+ field public static final int GL_PATCHES = 14; // 0xe
+ field public static final int GL_PATCH_VERTICES = 36466; // 0x8e72
+ field public static final int GL_PRIMITIVES_GENERATED = 35975; // 0x8c87
+ field public static final int GL_PRIMITIVE_BOUNDING_BOX = 37566; // 0x92be
+ field public static final int GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED = 33313; // 0x8221
+ field public static final int GL_PROGRAM = 33506; // 0x82e2
+ field public static final int GL_PROGRAM_PIPELINE = 33508; // 0x82e4
+ field public static final int GL_QUADS = 7; // 0x7
+ field public static final int GL_QUERY = 33507; // 0x82e3
+ field public static final int GL_REFERENCED_BY_GEOMETRY_SHADER = 37641; // 0x9309
+ field public static final int GL_REFERENCED_BY_TESS_CONTROL_SHADER = 37639; // 0x9307
+ field public static final int GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 37640; // 0x9308
+ field public static final int GL_RESET_NOTIFICATION_STRATEGY = 33366; // 0x8256
+ field public static final int GL_SAMPLER = 33510; // 0x82e6
+ field public static final int GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 37131; // 0x910b
+ field public static final int GL_SAMPLER_BUFFER = 36290; // 0x8dc2
+ field public static final int GL_SAMPLER_CUBE_MAP_ARRAY = 36876; // 0x900c
+ field public static final int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 36877; // 0x900d
+ field public static final int GL_SAMPLE_SHADING = 35894; // 0x8c36
+ field public static final int GL_SCREEN = 37525; // 0x9295
+ field public static final int GL_SHADER = 33505; // 0x82e1
+ field public static final int GL_SOFTLIGHT = 37532; // 0x929c
+ field public static final int GL_STACK_OVERFLOW = 1283; // 0x503
+ field public static final int GL_STACK_UNDERFLOW = 1284; // 0x504
+ field public static final int GL_TESS_CONTROL_OUTPUT_VERTICES = 36469; // 0x8e75
+ field public static final int GL_TESS_CONTROL_SHADER = 36488; // 0x8e88
+ field public static final int GL_TESS_CONTROL_SHADER_BIT = 8; // 0x8
+ field public static final int GL_TESS_EVALUATION_SHADER = 36487; // 0x8e87
+ field public static final int GL_TESS_EVALUATION_SHADER_BIT = 16; // 0x10
+ field public static final int GL_TESS_GEN_MODE = 36470; // 0x8e76
+ field public static final int GL_TESS_GEN_POINT_MODE = 36473; // 0x8e79
+ field public static final int GL_TESS_GEN_SPACING = 36471; // 0x8e77
+ field public static final int GL_TESS_GEN_VERTEX_ORDER = 36472; // 0x8e78
+ field public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 37122; // 0x9102
+ field public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 37125; // 0x9105
+ field public static final int GL_TEXTURE_BINDING_BUFFER = 35884; // 0x8c2c
+ field public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 36874; // 0x900a
+ field public static final int GL_TEXTURE_BORDER_COLOR = 4100; // 0x1004
+ field public static final int GL_TEXTURE_BUFFER = 35882; // 0x8c2a
+ field public static final int GL_TEXTURE_BUFFER_BINDING = 35882; // 0x8c2a
+ field public static final int GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 35885; // 0x8c2d
+ field public static final int GL_TEXTURE_BUFFER_OFFSET = 37277; // 0x919d
+ field public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 37279; // 0x919f
+ field public static final int GL_TEXTURE_BUFFER_SIZE = 37278; // 0x919e
+ field public static final int GL_TEXTURE_CUBE_MAP_ARRAY = 36873; // 0x9009
+ field public static final int GL_TRIANGLES_ADJACENCY = 12; // 0xc
+ field public static final int GL_TRIANGLE_STRIP_ADJACENCY = 13; // 0xd
+ field public static final int GL_UNDEFINED_VERTEX = 33376; // 0x8260
+ field public static final int GL_UNKNOWN_CONTEXT_RESET = 33365; // 0x8255
+ field public static final int GL_UNSIGNED_INT_IMAGE_BUFFER = 36967; // 0x9067
+ field public static final int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 36970; // 0x906a
+ field public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 37133; // 0x910d
+ field public static final int GL_UNSIGNED_INT_SAMPLER_BUFFER = 36312; // 0x8dd8
+ field public static final int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 36879; // 0x900f
+ field public static final int GL_VERTEX_ARRAY = 32884; // 0x8074
+ }
+
+ public static abstract interface GLES32.DebugProc {
+ method public abstract void onMessage(int, int, int, int, java.lang.String);
+ }
+
public class GLException extends java.lang.RuntimeException {
ctor public GLException(int);
ctor public GLException(int, java.lang.String);
diff --git a/core/java/android/security/FrameworkNetworkSecurityPolicy.java b/core/java/android/security/FrameworkNetworkSecurityPolicy.java
index e3dac5e..83f173ec 100644
--- a/core/java/android/security/FrameworkNetworkSecurityPolicy.java
+++ b/core/java/android/security/FrameworkNetworkSecurityPolicy.java
@@ -32,4 +32,9 @@
public boolean isCleartextTrafficPermitted() {
return mCleartextTrafficPermitted;
}
+
+ @Override
+ public boolean isCleartextTrafficPermitted(String hostname) {
+ return isCleartextTrafficPermitted();
+ }
}
diff --git a/core/java/android/security/NetworkSecurityPolicy.java b/core/java/android/security/NetworkSecurityPolicy.java
index 7991d37..46aa1af 100644
--- a/core/java/android/security/NetworkSecurityPolicy.java
+++ b/core/java/android/security/NetworkSecurityPolicy.java
@@ -43,7 +43,7 @@
/**
* Returns whether cleartext network traffic (e.g. HTTP, FTP, WebSockets, XMPP, IMAP, SMTP --
- * without TLS or STARTTLS) is permitted for this process.
+ * without TLS or STARTTLS) is permitted for all network communication from this process.
*
* <p>When cleartext network traffic is not permitted, the platform's components (e.g. HTTP and
* FTP stacks, {@link android.app.DownloadManager}, {@link android.media.MediaPlayer}) will
@@ -64,6 +64,18 @@
}
/**
+ * Returns whether cleartext network traffic (e.g. HTTP, FTP, XMPP, IMAP, SMTP -- without
+ * TLS or STARTTLS) is permitted for communicating with {@code hostname} for this process.
+ *
+ * @see #isCleartextTrafficPermitted()
+ * @hide
+ */
+ public boolean isCleartextTrafficPermitted(String hostname) {
+ return libcore.net.NetworkSecurityPolicy.getInstance()
+ .isCleartextTrafficPermitted(hostname);
+ }
+
+ /**
* Sets whether cleartext network traffic is permitted for this process.
*
* <p>This method is used by the platform early on in the application's initialization to set
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 3bde6b3..bc3ac5f 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -43,6 +43,7 @@
android_opengl_GLES30.cpp \
android_opengl_GLES31.cpp \
android_opengl_GLES31Ext.cpp \
+ android_opengl_GLES32.cpp \
android_database_CursorWindow.cpp \
android_database_SQLiteCommon.cpp \
android_database_SQLiteConnection.cpp \
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index f6f45b5..c44a62c 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -80,6 +80,7 @@
extern int register_android_opengl_jni_GLES30(JNIEnv* env);
extern int register_android_opengl_jni_GLES31(JNIEnv* env);
extern int register_android_opengl_jni_GLES31Ext(JNIEnv* env);
+extern int register_android_opengl_jni_GLES32(JNIEnv* env);
extern int register_android_hardware_Camera(JNIEnv *env);
extern int register_android_hardware_camera2_CameraMetadata(JNIEnv *env);
@@ -1280,6 +1281,7 @@
REG_JNI(register_android_opengl_jni_GLES30),
REG_JNI(register_android_opengl_jni_GLES31),
REG_JNI(register_android_opengl_jni_GLES31Ext),
+ REG_JNI(register_android_opengl_jni_GLES32),
REG_JNI(register_android_graphics_Bitmap),
REG_JNI(register_android_graphics_BitmapFactory),
diff --git a/core/jni/android_opengl_GLES32.cpp b/core/jni/android_opengl_GLES32.cpp
new file mode 100644
index 0000000..f9a1a8e
--- /dev/null
+++ b/core/jni/android_opengl_GLES32.cpp
@@ -0,0 +1,1999 @@
+/*
+ * Copyright 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// This source file is automatically generated
+
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
+#include <stdint.h>
+#include <GLES3/gl32.h>
+#include <jni.h>
+#include <JNIHelp.h>
+#include <android_runtime/AndroidRuntime.h>
+#include <utils/misc.h>
+#include <assert.h>
+
+static int initialized = 0;
+
+static jclass nioAccessClass;
+static jclass bufferClass;
+static jmethodID getBasePointerID;
+static jmethodID getBaseArrayID;
+static jmethodID getBaseArrayOffsetID;
+static jfieldID positionID;
+static jfieldID limitID;
+static jfieldID elementSizeShiftID;
+
+
+/* special calls implemented in Android's GLES wrapper used to more
+ * efficiently bound-check passed arrays */
+extern "C" {
+#ifdef GL_VERSION_ES_CM_1_1
+GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
+ const GLvoid *ptr, GLsizei count);
+GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
+ const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+#endif
+#ifdef GL_ES_VERSION_2_0
+static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
+ GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
+}
+#endif
+#ifdef GL_ES_VERSION_3_0
+static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ glVertexAttribIPointer(indx, size, type, stride, pointer);
+}
+#endif
+}
+
+/* Cache method IDs each time the class is loaded. */
+
+static void
+nativeClassInit(JNIEnv *_env, jclass glImplClass)
+{
+ jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
+ nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
+
+ jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
+ bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
+
+ getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
+ "getBasePointer", "(Ljava/nio/Buffer;)J");
+ getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
+ "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
+ getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
+ "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
+
+ positionID = _env->GetFieldID(bufferClass, "position", "I");
+ limitID = _env->GetFieldID(bufferClass, "limit", "I");
+ elementSizeShiftID =
+ _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
+}
+
+static void *
+getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
+{
+ jint position;
+ jint limit;
+ jint elementSizeShift;
+ jlong pointer;
+
+ position = _env->GetIntField(buffer, positionID);
+ limit = _env->GetIntField(buffer, limitID);
+ elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
+ *remaining = (limit - position) << elementSizeShift;
+ pointer = _env->CallStaticLongMethod(nioAccessClass,
+ getBasePointerID, buffer);
+ if (pointer != 0L) {
+ *array = NULL;
+ return reinterpret_cast<void*>(pointer);
+ }
+
+ *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
+ getBaseArrayID, buffer);
+ *offset = _env->CallStaticIntMethod(nioAccessClass,
+ getBaseArrayOffsetID, buffer);
+
+ return NULL;
+}
+
+class ByteArrayGetter {
+public:
+ static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
+ return _env->GetByteArrayElements(array, is_copy);
+ }
+};
+class BooleanArrayGetter {
+public:
+ static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
+ return _env->GetBooleanArrayElements(array, is_copy);
+ }
+};
+class CharArrayGetter {
+public:
+ static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
+ return _env->GetCharArrayElements(array, is_copy);
+ }
+};
+class ShortArrayGetter {
+public:
+ static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
+ return _env->GetShortArrayElements(array, is_copy);
+ }
+};
+class IntArrayGetter {
+public:
+ static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
+ return _env->GetIntArrayElements(array, is_copy);
+ }
+};
+class LongArrayGetter {
+public:
+ static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
+ return _env->GetLongArrayElements(array, is_copy);
+ }
+};
+class FloatArrayGetter {
+public:
+ static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
+ return _env->GetFloatArrayElements(array, is_copy);
+ }
+};
+class DoubleArrayGetter {
+public:
+ static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
+ return _env->GetDoubleArrayElements(array, is_copy);
+ }
+};
+
+template<typename JTYPEARRAY, typename ARRAYGETTER>
+static void*
+getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
+ return ARRAYGETTER::Get(_env, array, is_copy);
+}
+
+class ByteArrayReleaser {
+public:
+ static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
+ _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
+ }
+};
+class BooleanArrayReleaser {
+public:
+ static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
+ _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
+ }
+};
+class CharArrayReleaser {
+public:
+ static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
+ _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
+ }
+};
+class ShortArrayReleaser {
+public:
+ static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
+ _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
+ }
+};
+class IntArrayReleaser {
+public:
+ static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
+ _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
+ }
+};
+class LongArrayReleaser {
+public:
+ static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
+ _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
+ }
+};
+class FloatArrayReleaser {
+public:
+ static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
+ _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
+ }
+};
+class DoubleArrayReleaser {
+public:
+ static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
+ _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
+ }
+};
+
+template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
+static void
+releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
+ ARRAYRELEASER::Release(_env, array, data, commit);
+}
+
+static void
+releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
+{
+ _env->ReleasePrimitiveArrayCritical(array, data,
+ commit ? 0 : JNI_ABORT);
+}
+
+static void *
+getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
+ char* buf = (char*) _env->GetDirectBufferAddress(buffer);
+ if (buf) {
+ jint position = _env->GetIntField(buffer, positionID);
+ jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
+ buf += position << elementSizeShift;
+ } else {
+ jniThrowException(_env, "java/lang/IllegalArgumentException",
+ "Must use a native order direct Buffer");
+ }
+ return (void*) buf;
+}
+
+// --------------------------------------------------------------------------
+
+/*
+ * returns the number of values glGet returns for a given pname.
+ *
+ * The code below is written such that pnames requiring only one values
+ * are the default (and are not explicitely tested for). This makes the
+ * checking code much shorter/readable/efficient.
+ *
+ * This means that unknown pnames (e.g.: extensions) will default to 1. If
+ * that unknown pname needs more than 1 value, then the validation check
+ * is incomplete and the app may crash if it passed the wrong number params.
+ */
+static int getNeededCount(GLint pname) {
+ int needed = 1;
+#ifdef GL_ES_VERSION_2_0
+ // GLES 2.x pnames
+ switch (pname) {
+ case GL_ALIASED_LINE_WIDTH_RANGE:
+ case GL_ALIASED_POINT_SIZE_RANGE:
+ needed = 2;
+ break;
+
+ case GL_BLEND_COLOR:
+ case GL_COLOR_CLEAR_VALUE:
+ case GL_COLOR_WRITEMASK:
+ case GL_SCISSOR_BOX:
+ case GL_VIEWPORT:
+ needed = 4;
+ break;
+
+ case GL_COMPRESSED_TEXTURE_FORMATS:
+ glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
+ break;
+
+ case GL_SHADER_BINARY_FORMATS:
+ glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
+ break;
+ }
+#endif
+
+#ifdef GL_VERSION_ES_CM_1_1
+ // GLES 1.x pnames
+ switch (pname) {
+ case GL_ALIASED_LINE_WIDTH_RANGE:
+ case GL_ALIASED_POINT_SIZE_RANGE:
+ case GL_DEPTH_RANGE:
+ case GL_SMOOTH_LINE_WIDTH_RANGE:
+ case GL_SMOOTH_POINT_SIZE_RANGE:
+ needed = 2;
+ break;
+
+ case GL_CURRENT_NORMAL:
+ case GL_POINT_DISTANCE_ATTENUATION:
+ needed = 3;
+ break;
+
+ case GL_COLOR_CLEAR_VALUE:
+ case GL_COLOR_WRITEMASK:
+ case GL_CURRENT_COLOR:
+ case GL_CURRENT_TEXTURE_COORDS:
+ case GL_FOG_COLOR:
+ case GL_LIGHT_MODEL_AMBIENT:
+ case GL_SCISSOR_BOX:
+ case GL_VIEWPORT:
+ needed = 4;
+ break;
+
+ case GL_MODELVIEW_MATRIX:
+ case GL_PROJECTION_MATRIX:
+ case GL_TEXTURE_MATRIX:
+ needed = 16;
+ break;
+
+ case GL_COMPRESSED_TEXTURE_FORMATS:
+ glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
+ break;
+ }
+#endif
+ return needed;
+}
+
+template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
+ typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
+static void
+get
+ (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ CTYPE *params_base = (CTYPE *) 0;
+ jint _remaining;
+ CTYPE *params = (CTYPE *) 0;
+ int _needed = 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ _needed = getNeededCount(pname);
+ // if we didn't find this pname, we just assume the user passed
+ // an array of the right size -- this might happen with extensions
+ // or if we forget an enum here.
+ if (_remaining < _needed) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
+ goto exit;
+ }
+ params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
+ _env, params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ GET(
+ (GLenum)pname,
+ (CTYPE *)params
+ );
+
+exit:
+ if (params_base) {
+ releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
+ _env, params_ref, params_base, !_exception);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+
+template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
+ typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
+static void
+getarray
+ (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ JTYPEARRAY _array = (JTYPEARRAY) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ CTYPE *params = (CTYPE *) 0;
+ int _needed = 0;
+
+ params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ _remaining /= sizeof(CTYPE); // convert from bytes to item count
+ _needed = getNeededCount(pname);
+ // if we didn't find this pname, we just assume the user passed
+ // an array of the right size -- this might happen with extensions
+ // or if we forget an enum here.
+ if (_needed>0 && _remaining < _needed) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
+ goto exit;
+ }
+ if (params == NULL) {
+ char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
+ _env, _array, (jboolean *) 0);
+ params = (CTYPE *) (_paramsBase + _bufferOffset);
+ }
+ GET(
+ (GLenum)pname,
+ (CTYPE *)params
+ );
+
+exit:
+ if (_array) {
+ releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
+ _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+// --------------------------------------------------------------------------
+/* void glBlendBarrier ( void ) */
+static void
+android_glBlendBarrier__
+ (JNIEnv *_env, jobject _this) {
+ glBlendBarrier();
+}
+
+/* void glCopyImageSubData ( GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth ) */
+static void
+android_glCopyImageSubData__IIIIIIIIIIIIIII
+ (JNIEnv *_env, jobject _this, jint srcName, jint srcTarget, jint srcLevel, jint srcX, jint srcY, jint srcZ, jint dstName, jint dstTarget, jint dstLevel, jint dstX, jint dstY, jint dstZ, jint srcWidth, jint srcHeight, jint srcDepth) {
+ glCopyImageSubData(
+ (GLuint)srcName,
+ (GLenum)srcTarget,
+ (GLint)srcLevel,
+ (GLint)srcX,
+ (GLint)srcY,
+ (GLint)srcZ,
+ (GLuint)dstName,
+ (GLenum)dstTarget,
+ (GLint)dstLevel,
+ (GLint)dstX,
+ (GLint)dstY,
+ (GLint)dstZ,
+ (GLsizei)srcWidth,
+ (GLsizei)srcHeight,
+ (GLsizei)srcDepth
+ );
+}
+
+/* void glDebugMessageControl ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */
+static void
+android_glDebugMessageControl__IIII_3IIZ
+ (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jintArray ids_ref, jint offset, jboolean enabled) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *ids_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *ids = (GLuint *) 0;
+
+ if (!ids_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "ids == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(ids_ref) - offset;
+ if (_remaining < count) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < count < needed";
+ goto exit;
+ }
+ ids_base = (GLuint *)
+ _env->GetIntArrayElements(ids_ref, (jboolean *)0);
+ ids = ids_base + offset;
+
+ glDebugMessageControl(
+ (GLenum)source,
+ (GLenum)type,
+ (GLenum)severity,
+ (GLsizei)count,
+ (GLuint *)ids,
+ (GLboolean)enabled
+ );
+
+exit:
+ if (ids_base) {
+ _env->ReleaseIntArrayElements(ids_ref, (jint*)ids_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glDebugMessageControl ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */
+static void
+android_glDebugMessageControl__IIIILjava_nio_IntBuffer_2Z
+ (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jobject ids_buf, jboolean enabled) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ jintArray _array = (jintArray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *ids = (GLuint *) 0;
+
+ ids = (GLuint *)getPointer(_env, ids_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (_remaining < count) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < count < needed";
+ goto exit;
+ }
+ if (ids == NULL) {
+ char * _idsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
+ ids = (GLuint *) (_idsBase + _bufferOffset);
+ }
+ glDebugMessageControl(
+ (GLenum)source,
+ (GLenum)type,
+ (GLenum)severity,
+ (GLsizei)count,
+ (GLuint *)ids,
+ (GLboolean)enabled
+ );
+
+exit:
+ if (_array) {
+ _env->ReleaseIntArrayElements(_array, (jint*)ids, JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glDebugMessageInsert ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf ) */
+static void
+android_glDebugMessageInsert__IIIIILjava_lang_String_2
+ (JNIEnv *_env, jobject _this, jint source, jint type, jint id, jint severity, jint length, jstring buf) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ const char* _nativebuf = 0;
+
+ if (!buf) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "buf == null";
+ goto exit;
+ }
+ _nativebuf = _env->GetStringUTFChars(buf, 0);
+
+ glDebugMessageInsert(
+ (GLenum)source,
+ (GLenum)type,
+ (GLuint)id,
+ (GLenum)severity,
+ (GLsizei)length,
+ (GLchar *)_nativebuf
+ );
+
+exit:
+ if (_nativebuf) {
+ _env->ReleaseStringUTFChars(buf, _nativebuf);
+ }
+
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glDebugMessageCallback ( GLDEBUGPROC callback, const void *userParam ) */
+static void
+android_glDebugMessageCallback(JNIEnv *_env, jobject _this, jobject callback) {
+ jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+}
+/* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
+static jint
+android_glGetDebugMessageLog__II_3II_3II_3II_3II_3II_3BI
+ (JNIEnv *_env, jobject _this, jint count, jint bufSize, jintArray sources_ref, jint sourcesOffset, jintArray types_ref, jint typesOffset, jintArray ids_ref, jint idsOffset, jintArray severities_ref, jint severitiesOffset, jintArray lengths_ref, jint lengthsOffset, jbyteArray messageLog_ref, jint messageLogOffset) {
+ jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+ return 0;
+}
+
+/* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
+static uint
+android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2
+ (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref, jobject lengths_ref, jobject messageLog_ref) {
+ jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+ return 0;
+}
+
+/* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
+static jobjectArray
+android_glGetDebugMessageLog__I_3II_3II_3II_3II
+ (JNIEnv *_env, jobject _this, jint count, jintArray sources_ref, jint sourcesOffset, jintArray types_ref, jint typesOffset, jintArray ids_ref, jint idsOffset, jintArray severities_ref, jint severitiesOffset) {
+ jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+ return 0;
+}
+
+/* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
+static jobjectArray
+android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref) {
+ jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+ return 0;
+}
+/* void glPushDebugGroup ( GLenum source, GLuint id, GLsizei length, const GLchar *message ) */
+static void
+android_glPushDebugGroup__IIILjava_lang_String_2
+ (JNIEnv *_env, jobject _this, jint source, jint id, jint length, jstring message) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ const char* _nativemessage = 0;
+ jsize _stringlen = 0;
+
+ if (!message) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "message == null";
+ goto exit;
+ }
+ _nativemessage = _env->GetStringUTFChars(message, 0);
+ _stringlen = _env->GetStringUTFLength(message);
+ if (length > _stringlen) {
+ _exception = 1;
+ _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
+ _exceptionMessage = "length of message is shorter than length argument";
+ goto exit;
+ }
+
+ glPushDebugGroup(
+ (GLenum)source,
+ (GLuint)id,
+ (GLsizei)length,
+ (GLchar *)_nativemessage
+ );
+
+exit:
+ if (_nativemessage) {
+ _env->ReleaseStringUTFChars(message, _nativemessage);
+ }
+
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glPopDebugGroup ( void ) */
+static void
+android_glPopDebugGroup__
+ (JNIEnv *_env, jobject _this) {
+ glPopDebugGroup();
+}
+
+/* void glObjectLabel ( GLenum identifier, GLuint name, GLsizei length, const GLchar *label ) */
+static void
+android_glObjectLabel__IIILjava_lang_String_2
+ (JNIEnv *_env, jobject _this, jint identifier, jint name, jint length, jstring label) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ const char* _nativelabel = 0;
+ jsize _stringlen = 0;
+
+ if (label) {
+ _nativelabel = _env->GetStringUTFChars(label, 0);
+ _stringlen = _env->GetStringUTFLength(label);
+ if (length > _stringlen) {
+ _exception = 1;
+ _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
+ _exceptionMessage = "length of label is shorter than length argument";
+ goto exit;
+ }
+ }
+
+ glObjectLabel(
+ (GLenum)identifier,
+ (GLuint)name,
+ (GLsizei)length,
+ (GLchar *)_nativelabel
+ );
+
+exit:
+ if (_nativelabel) {
+ _env->ReleaseStringUTFChars(label, _nativelabel);
+ }
+
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetObjectLabel ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label ) */
+static jstring
+android_glGetObjectLabel(JNIEnv *_env, jobject _this, jint identifier, jint name) {
+ jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+ return NULL;
+}
+
+/* void glObjectPtrLabel ( const void *ptr, GLsizei length, const GLchar *label ) */
+static void
+android_glObjectPtrLabel(JNIEnv *_env, jobject _this, jlong ptr, jstring label) {
+ jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+}
+
+/* void glGetObjectPtrLabel ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label ) */
+static jstring
+android_glGetObjectPtrLabel(JNIEnv *_env, jobject _this, jlong ptr) {
+ jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+ return NULL;
+}
+
+/* void glGetPointerv ( GLenum pname, void **params ) */
+static jlong
+android_glGetPointerv(JNIEnv *_env, jobject _this, jint pname) {
+ jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+ return NULL;
+}
+
+/* void glEnablei ( GLenum target, GLuint index ) */
+static void
+android_glEnablei__II
+ (JNIEnv *_env, jobject _this, jint target, jint index) {
+ glEnablei(
+ (GLenum)target,
+ (GLuint)index
+ );
+}
+
+/* void glDisablei ( GLenum target, GLuint index ) */
+static void
+android_glDisablei__II
+ (JNIEnv *_env, jobject _this, jint target, jint index) {
+ glDisablei(
+ (GLenum)target,
+ (GLuint)index
+ );
+}
+
+/* void glBlendEquationi ( GLuint buf, GLenum mode ) */
+static void
+android_glBlendEquationi__II
+ (JNIEnv *_env, jobject _this, jint buf, jint mode) {
+ glBlendEquationi(
+ (GLuint)buf,
+ (GLenum)mode
+ );
+}
+
+/* void glBlendEquationSeparatei ( GLuint buf, GLenum modeRGB, GLenum modeAlpha ) */
+static void
+android_glBlendEquationSeparatei__III
+ (JNIEnv *_env, jobject _this, jint buf, jint modeRGB, jint modeAlpha) {
+ glBlendEquationSeparatei(
+ (GLuint)buf,
+ (GLenum)modeRGB,
+ (GLenum)modeAlpha
+ );
+}
+
+/* void glBlendFunci ( GLuint buf, GLenum src, GLenum dst ) */
+static void
+android_glBlendFunci__III
+ (JNIEnv *_env, jobject _this, jint buf, jint src, jint dst) {
+ glBlendFunci(
+ (GLuint)buf,
+ (GLenum)src,
+ (GLenum)dst
+ );
+}
+
+/* void glBlendFuncSeparatei ( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
+static void
+android_glBlendFuncSeparatei__IIIII
+ (JNIEnv *_env, jobject _this, jint buf, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
+ glBlendFuncSeparatei(
+ (GLuint)buf,
+ (GLenum)srcRGB,
+ (GLenum)dstRGB,
+ (GLenum)srcAlpha,
+ (GLenum)dstAlpha
+ );
+}
+
+/* void glColorMaski ( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a ) */
+static void
+android_glColorMaski__IZZZZ
+ (JNIEnv *_env, jobject _this, jint index, jboolean r, jboolean g, jboolean b, jboolean a) {
+ glColorMaski(
+ (GLuint)index,
+ (GLboolean)r,
+ (GLboolean)g,
+ (GLboolean)b,
+ (GLboolean)a
+ );
+}
+
+/* GLboolean glIsEnabledi ( GLenum target, GLuint index ) */
+static jboolean
+android_glIsEnabledi__II
+ (JNIEnv *_env, jobject _this, jint target, jint index) {
+ GLboolean _returnValue;
+ _returnValue = glIsEnabledi(
+ (GLenum)target,
+ (GLuint)index
+ );
+ return (jboolean)_returnValue;
+}
+
+/* void glDrawElementsBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex ) */
+static void
+android_glDrawElementsBaseVertex__IIILjava_nio_Buffer_2I
+ (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint basevertex) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ void *indices = (void *) 0;
+
+ indices = (void *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (_remaining < count-basevertex) {
+ _exception = 1;
+ _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
+ _exceptionMessage = "remaining() < count-basevertex < needed";
+ goto exit;
+ }
+ if (indices == NULL) {
+ char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ indices = (void *) (_indicesBase + _bufferOffset);
+ }
+ glDrawElementsBaseVertex(
+ (GLenum)mode,
+ (GLsizei)count,
+ (GLenum)type,
+ (void *)indices,
+ (GLint)basevertex
+ );
+
+exit:
+ if (_array) {
+ releasePointer(_env, _array, indices, JNI_FALSE);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glDrawRangeElementsBaseVertex ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex ) */
+static void
+android_glDrawRangeElementsBaseVertex__IIIIILjava_nio_Buffer_2I
+ (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jobject indices_buf, jint basevertex) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ void *indices = (void *) 0;
+
+ indices = (void *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (_remaining < count-basevertex) {
+ _exception = 1;
+ _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
+ _exceptionMessage = "remaining() < count-basevertex < needed";
+ goto exit;
+ }
+ if (indices == NULL) {
+ char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ indices = (void *) (_indicesBase + _bufferOffset);
+ }
+ glDrawRangeElementsBaseVertex(
+ (GLenum)mode,
+ (GLuint)start,
+ (GLuint)end,
+ (GLsizei)count,
+ (GLenum)type,
+ (void *)indices,
+ (GLint)basevertex
+ );
+
+exit:
+ if (_array) {
+ releasePointer(_env, _array, indices, JNI_FALSE);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex ) */
+static void
+android_glDrawElementsInstancedBaseVertex__IIILjava_nio_Buffer_2II
+ (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint instanceCount, jint basevertex) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ void *indices = (void *) 0;
+
+ indices = (void *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
+ if (_remaining < count-basevertex) {
+ _exception = 1;
+ _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
+ _exceptionMessage = "remaining() < count-basevertex < needed";
+ goto exit;
+ }
+ if (indices == NULL) {
+ char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ indices = (void *) (_indicesBase + _bufferOffset);
+ }
+ glDrawElementsInstancedBaseVertex(
+ (GLenum)mode,
+ (GLsizei)count,
+ (GLenum)type,
+ (void *)indices,
+ (GLsizei)instanceCount,
+ (GLint) basevertex
+ );
+
+exit:
+ if (_array) {
+ releasePointer(_env, _array, indices, JNI_FALSE);
+ }
+}
+
+/* void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex ) */
+static void
+android_glDrawElementsInstancedBaseVertex__IIIIII
+ (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint indicesOffset, jint instanceCount, jint basevertex) {
+ glDrawElementsInstancedBaseVertex(
+ (GLenum)mode,
+ (GLsizei)count,
+ (GLenum)type,
+ (void *)static_cast<uintptr_t>(indicesOffset),
+ (GLsizei)instanceCount,
+ (GLint)basevertex
+ );
+}
+/* void glFramebufferTexture ( GLenum target, GLenum attachment, GLuint texture, GLint level ) */
+static void
+android_glFramebufferTexture__IIII
+ (JNIEnv *_env, jobject _this, jint target, jint attachment, jint texture, jint level) {
+ glFramebufferTexture(
+ (GLenum)target,
+ (GLenum)attachment,
+ (GLuint)texture,
+ (GLint)level
+ );
+}
+
+/* void glPrimitiveBoundingBox ( GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW ) */
+static void
+android_glPrimitiveBoundingBox__FFFFFFFF
+ (JNIEnv *_env, jobject _this, jfloat minX, jfloat minY, jfloat minZ, jfloat minW, jfloat maxX, jfloat maxY, jfloat maxZ, jfloat maxW) {
+ glPrimitiveBoundingBox(
+ (GLfloat)minX,
+ (GLfloat)minY,
+ (GLfloat)minZ,
+ (GLfloat)minW,
+ (GLfloat)maxX,
+ (GLfloat)maxY,
+ (GLfloat)maxZ,
+ (GLfloat)maxW
+ );
+}
+
+/* GLenum glGetGraphicsResetStatus ( void ) */
+static jint
+android_glGetGraphicsResetStatus__
+ (JNIEnv *_env, jobject _this) {
+ GLenum _returnValue;
+ _returnValue = glGetGraphicsResetStatus();
+ return (jint)_returnValue;
+}
+
+/* void glReadnPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data ) */
+static void
+android_glReadnPixels__IIIIIIILjava_nio_Buffer_2
+ (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jint bufSize, jobject data_buf) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ void *data = (void *) 0;
+
+ data = (void *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (_remaining < bufSize) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < bufSize < needed";
+ goto exit;
+ }
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (void *) (_dataBase + _bufferOffset);
+ }
+ glReadnPixels(
+ (GLint)x,
+ (GLint)y,
+ (GLsizei)width,
+ (GLsizei)height,
+ (GLenum)format,
+ (GLenum)type,
+ (GLsizei)bufSize,
+ (void *)data
+ );
+
+exit:
+ if (_array) {
+ releasePointer(_env, _array, data, _exception ? JNI_FALSE : JNI_TRUE);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetnUniformfv ( GLuint program, GLint location, GLsizei bufSize, GLfloat *params ) */
+static void
+android_glGetnUniformfv__III_3FI
+ (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLfloat *params_base = (GLfloat *) 0;
+ jint _remaining;
+ GLfloat *params = (GLfloat *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ if (_remaining < bufSize) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < bufSize < needed";
+ goto exit;
+ }
+ params_base = (GLfloat *)
+ _env->GetFloatArrayElements(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetnUniformfv(
+ (GLuint)program,
+ (GLint)location,
+ (GLsizei)bufSize,
+ (GLfloat *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetnUniformfv ( GLuint program, GLint location, GLsizei bufSize, GLfloat *params ) */
+static void
+android_glGetnUniformfv__IIILjava_nio_FloatBuffer_2
+ (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ jfloatArray _array = (jfloatArray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLfloat *params = (GLfloat *) 0;
+
+ params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (_remaining < bufSize) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < bufSize < needed";
+ goto exit;
+ }
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
+ glGetnUniformfv(
+ (GLuint)program,
+ (GLint)location,
+ (GLsizei)bufSize,
+ (GLfloat *)params
+ );
+
+exit:
+ if (_array) {
+ _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetnUniformiv ( GLuint program, GLint location, GLsizei bufSize, GLint *params ) */
+static void
+android_glGetnUniformiv__III_3II
+ (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *params_base = (GLint *) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ if (_remaining < bufSize) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < bufSize < needed";
+ goto exit;
+ }
+ params_base = (GLint *)
+ _env->GetIntArrayElements(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetnUniformiv(
+ (GLuint)program,
+ (GLint)location,
+ (GLsizei)bufSize,
+ (GLint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetnUniformiv ( GLuint program, GLint location, GLsizei bufSize, GLint *params ) */
+static void
+android_glGetnUniformiv__IIILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ jintArray _array = (jintArray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (_remaining < bufSize) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < bufSize < needed";
+ goto exit;
+ }
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
+ glGetnUniformiv(
+ (GLuint)program,
+ (GLint)location,
+ (GLsizei)bufSize,
+ (GLint *)params
+ );
+
+exit:
+ if (_array) {
+ _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetnUniformuiv ( GLuint program, GLint location, GLsizei bufSize, GLuint *params ) */
+static void
+android_glGetnUniformuiv__III_3II
+ (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *params_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ if (_remaining < bufSize) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < bufSize < needed";
+ goto exit;
+ }
+ params_base = (GLuint *)
+ _env->GetIntArrayElements(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetnUniformuiv(
+ (GLuint)program,
+ (GLint)location,
+ (GLsizei)bufSize,
+ (GLuint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetnUniformuiv ( GLuint program, GLint location, GLsizei bufSize, GLuint *params ) */
+static void
+android_glGetnUniformuiv__IIILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ jintArray _array = (jintArray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (_remaining < bufSize) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < bufSize < needed";
+ goto exit;
+ }
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
+ params = (GLuint *) (_paramsBase + _bufferOffset);
+ }
+ glGetnUniformuiv(
+ (GLuint)program,
+ (GLint)location,
+ (GLsizei)bufSize,
+ (GLuint *)params
+ );
+
+exit:
+ if (_array) {
+ _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glMinSampleShading ( GLfloat value ) */
+static void
+android_glMinSampleShading__F
+ (JNIEnv *_env, jobject _this, jfloat value) {
+ glMinSampleShading(
+ (GLfloat)value
+ );
+}
+
+/* void glPatchParameteri ( GLenum pname, GLint value ) */
+static void
+android_glPatchParameteri__II
+ (JNIEnv *_env, jobject _this, jint pname, jint value) {
+ glPatchParameteri(
+ (GLenum)pname,
+ (GLint)value
+ );
+}
+
+/* void glTexParameterIiv ( GLenum target, GLenum pname, const GLint *params ) */
+static void
+android_glTexParameterIiv__II_3II
+ (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *params_base = (GLint *) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLint *)
+ _env->GetIntArrayElements(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glTexParameterIiv(
+ (GLenum)target,
+ (GLenum)pname,
+ (GLint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glTexParameterIiv ( GLenum target, GLenum pname, const GLint *params ) */
+static void
+android_glTexParameterIiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jintArray _array = (jintArray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
+ glTexParameterIiv(
+ (GLenum)target,
+ (GLenum)pname,
+ (GLint *)params
+ );
+ if (_array) {
+ _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
+ }
+}
+
+/* void glTexParameterIuiv ( GLenum target, GLenum pname, const GLuint *params ) */
+static void
+android_glTexParameterIuiv__II_3II
+ (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *params_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLuint *)
+ _env->GetIntArrayElements(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glTexParameterIuiv(
+ (GLenum)target,
+ (GLenum)pname,
+ (GLuint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glTexParameterIuiv ( GLenum target, GLenum pname, const GLuint *params ) */
+static void
+android_glTexParameterIuiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jintArray _array = (jintArray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
+ params = (GLuint *) (_paramsBase + _bufferOffset);
+ }
+ glTexParameterIuiv(
+ (GLenum)target,
+ (GLenum)pname,
+ (GLuint *)params
+ );
+ if (_array) {
+ _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
+ }
+}
+
+/* void glGetTexParameterIiv ( GLenum target, GLenum pname, GLint *params ) */
+static void
+android_glGetTexParameterIiv__II_3II
+ (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *params_base = (GLint *) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLint *)
+ _env->GetIntArrayElements(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetTexParameterIiv(
+ (GLenum)target,
+ (GLenum)pname,
+ (GLint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetTexParameterIiv ( GLenum target, GLenum pname, GLint *params ) */
+static void
+android_glGetTexParameterIiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jintArray _array = (jintArray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
+ glGetTexParameterIiv(
+ (GLenum)target,
+ (GLenum)pname,
+ (GLint *)params
+ );
+ if (_array) {
+ _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
+ }
+}
+
+/* void glGetTexParameterIuiv ( GLenum target, GLenum pname, GLuint *params ) */
+static void
+android_glGetTexParameterIuiv__II_3II
+ (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *params_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLuint *)
+ _env->GetIntArrayElements(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetTexParameterIuiv(
+ (GLenum)target,
+ (GLenum)pname,
+ (GLuint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetTexParameterIuiv ( GLenum target, GLenum pname, GLuint *params ) */
+static void
+android_glGetTexParameterIuiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jintArray _array = (jintArray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
+ params = (GLuint *) (_paramsBase + _bufferOffset);
+ }
+ glGetTexParameterIuiv(
+ (GLenum)target,
+ (GLenum)pname,
+ (GLuint *)params
+ );
+ if (_array) {
+ _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
+ }
+}
+
+/* void glSamplerParameterIiv ( GLuint sampler, GLenum pname, const GLint *param ) */
+static void
+android_glSamplerParameterIiv__II_3II
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *param_base = (GLint *) 0;
+ jint _remaining;
+ GLint *param = (GLint *) 0;
+
+ if (!param_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "param == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(param_ref) - offset;
+ param_base = (GLint *)
+ _env->GetIntArrayElements(param_ref, (jboolean *)0);
+ param = param_base + offset;
+
+ glSamplerParameterIiv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLint *)param
+ );
+
+exit:
+ if (param_base) {
+ _env->ReleaseIntArrayElements(param_ref, (jint*)param_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glSamplerParameterIiv ( GLuint sampler, GLenum pname, const GLint *param ) */
+static void
+android_glSamplerParameterIiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
+ jintArray _array = (jintArray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *param = (GLint *) 0;
+
+ param = (GLint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (param == NULL) {
+ char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
+ param = (GLint *) (_paramBase + _bufferOffset);
+ }
+ glSamplerParameterIiv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLint *)param
+ );
+ if (_array) {
+ _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
+ }
+}
+
+/* void glSamplerParameterIuiv ( GLuint sampler, GLenum pname, const GLuint *param ) */
+static void
+android_glSamplerParameterIuiv__II_3II
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *param_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *param = (GLuint *) 0;
+
+ if (!param_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "param == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(param_ref) - offset;
+ param_base = (GLuint *)
+ _env->GetIntArrayElements(param_ref, (jboolean *)0);
+ param = param_base + offset;
+
+ glSamplerParameterIuiv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLuint *)param
+ );
+
+exit:
+ if (param_base) {
+ _env->ReleaseIntArrayElements(param_ref, (jint*)param_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glSamplerParameterIuiv ( GLuint sampler, GLenum pname, const GLuint *param ) */
+static void
+android_glSamplerParameterIuiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
+ jintArray _array = (jintArray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *param = (GLuint *) 0;
+
+ param = (GLuint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (param == NULL) {
+ char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
+ param = (GLuint *) (_paramBase + _bufferOffset);
+ }
+ glSamplerParameterIuiv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLuint *)param
+ );
+ if (_array) {
+ _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
+ }
+}
+
+/* void glGetSamplerParameterIiv ( GLuint sampler, GLenum pname, GLint *params ) */
+static void
+android_glGetSamplerParameterIiv__II_3II
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *params_base = (GLint *) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLint *)
+ _env->GetIntArrayElements(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetSamplerParameterIiv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetSamplerParameterIiv ( GLuint sampler, GLenum pname, GLint *params ) */
+static void
+android_glGetSamplerParameterIiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
+ jintArray _array = (jintArray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
+ glGetSamplerParameterIiv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLint *)params
+ );
+ if (_array) {
+ _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
+ }
+}
+
+/* void glGetSamplerParameterIuiv ( GLuint sampler, GLenum pname, GLuint *params ) */
+static void
+android_glGetSamplerParameterIuiv__II_3II
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *params_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLuint *)
+ _env->GetIntArrayElements(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetSamplerParameterIuiv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLuint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetSamplerParameterIuiv ( GLuint sampler, GLenum pname, GLuint *params ) */
+static void
+android_glGetSamplerParameterIuiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
+ jintArray _array = (jintArray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
+ params = (GLuint *) (_paramsBase + _bufferOffset);
+ }
+ glGetSamplerParameterIuiv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLuint *)params
+ );
+ if (_array) {
+ _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
+ }
+}
+
+/* void glTexBuffer ( GLenum target, GLenum internalformat, GLuint buffer ) */
+static void
+android_glTexBuffer__III
+ (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer) {
+ glTexBuffer(
+ (GLenum)target,
+ (GLenum)internalformat,
+ (GLuint)buffer
+ );
+}
+
+/* void glTexBufferRange ( GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size ) */
+static void
+android_glTexBufferRange__IIIII
+ (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer, jint offset, jint size) {
+ glTexBufferRange(
+ (GLenum)target,
+ (GLenum)internalformat,
+ (GLuint)buffer,
+ (GLintptr)offset,
+ (GLsizeiptr)size
+ );
+}
+
+/* void glTexStorage3DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations ) */
+static void
+android_glTexStorage3DMultisample__IIIIIIZ
+ (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations) {
+ glTexStorage3DMultisample(
+ (GLenum)target,
+ (GLsizei)samples,
+ (GLenum)internalformat,
+ (GLsizei)width,
+ (GLsizei)height,
+ (GLsizei)depth,
+ (GLboolean)fixedsamplelocations
+ );
+}
+
+static const char *classPathName = "android/opengl/GLES32";
+
+static const JNINativeMethod methods[] = {
+{"_nativeClassInit", "()V", (void*)nativeClassInit },
+{"glBlendBarrier", "()V", (void *) android_glBlendBarrier__ },
+{"glCopyImageSubData", "(IIIIIIIIIIIIIII)V", (void *) android_glCopyImageSubData__IIIIIIIIIIIIIII },
+{"glDebugMessageControl", "(IIII[IIZ)V", (void *) android_glDebugMessageControl__IIII_3IIZ },
+{"glDebugMessageControl", "(IIIILjava/nio/IntBuffer;Z)V", (void *) android_glDebugMessageControl__IIIILjava_nio_IntBuffer_2Z },
+{"glDebugMessageInsert", "(IIIIILjava/lang/String;)V", (void *) android_glDebugMessageInsert__IIIIILjava_lang_String_2 },
+{"glDebugMessageCallback", "(Landroid/opengl/GLES32$DebugProc;)V", (void *) android_glDebugMessageCallback },
+{"glGetDebugMessageLog", "(II[II[II[II[II[II[BI)I", (void *) android_glGetDebugMessageLog__II_3II_3II_3II_3II_3II_3BI },
+{"glGetDebugMessageLog", "(ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/ByteBuffer;)I", (void *) android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2 },
+{"glGetDebugMessageLog", "(I[II[II[II[II)[Ljava/lang/String;", (void *) android_glGetDebugMessageLog__I_3II_3II_3II_3II },
+{"glGetDebugMessageLog", "(ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)[Ljava/lang/String;", (void *) android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
+{"glPushDebugGroup", "(IIILjava/lang/String;)V", (void *) android_glPushDebugGroup__IIILjava_lang_String_2 },
+{"glPopDebugGroup", "()V", (void *) android_glPopDebugGroup__ },
+{"glObjectLabel", "(IIILjava/lang/String;)V", (void *) android_glObjectLabel__IIILjava_lang_String_2 },
+{"glGetObjectLabel", "(II)Ljava/lang/String;", (void *) android_glGetObjectLabel },
+{"glObjectPtrLabel", "(JLjava/lang/String;)V", (void *) android_glObjectPtrLabel },
+{"glGetObjectPtrLabel", "(J)Ljava/lang/String;", (void *) android_glGetObjectPtrLabel },
+{"glGetPointerv", "(I)J", (void *) android_glGetPointerv },
+{"glEnablei", "(II)V", (void *) android_glEnablei__II },
+{"glDisablei", "(II)V", (void *) android_glDisablei__II },
+{"glBlendEquationi", "(II)V", (void *) android_glBlendEquationi__II },
+{"glBlendEquationSeparatei", "(III)V", (void *) android_glBlendEquationSeparatei__III },
+{"glBlendFunci", "(III)V", (void *) android_glBlendFunci__III },
+{"glBlendFuncSeparatei", "(IIIII)V", (void *) android_glBlendFuncSeparatei__IIIII },
+{"glColorMaski", "(IZZZZ)V", (void *) android_glColorMaski__IZZZZ },
+{"glIsEnabledi", "(II)Z", (void *) android_glIsEnabledi__II },
+{"glDrawElementsBaseVertex", "(IIILjava/nio/Buffer;I)V", (void *) android_glDrawElementsBaseVertex__IIILjava_nio_Buffer_2I },
+{"glDrawRangeElementsBaseVertex", "(IIIIILjava/nio/Buffer;I)V", (void *) android_glDrawRangeElementsBaseVertex__IIIIILjava_nio_Buffer_2I },
+{"glDrawElementsInstancedBaseVertex", "(IIILjava/nio/Buffer;II)V", (void *) android_glDrawElementsInstancedBaseVertex__IIILjava_nio_Buffer_2II },
+{"glDrawElementsInstancedBaseVertex", "(IIIIII)V", (void *) android_glDrawElementsInstancedBaseVertex__IIIIII },
+{"glFramebufferTexture", "(IIII)V", (void *) android_glFramebufferTexture__IIII },
+{"glPrimitiveBoundingBox", "(FFFFFFFF)V", (void *) android_glPrimitiveBoundingBox__FFFFFFFF },
+{"glGetGraphicsResetStatus", "()I", (void *) android_glGetGraphicsResetStatus__ },
+{"glReadnPixels", "(IIIIIIILjava/nio/Buffer;)V", (void *) android_glReadnPixels__IIIIIIILjava_nio_Buffer_2 },
+{"glGetnUniformfv", "(III[FI)V", (void *) android_glGetnUniformfv__III_3FI },
+{"glGetnUniformfv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glGetnUniformfv__IIILjava_nio_FloatBuffer_2 },
+{"glGetnUniformiv", "(III[II)V", (void *) android_glGetnUniformiv__III_3II },
+{"glGetnUniformiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetnUniformiv__IIILjava_nio_IntBuffer_2 },
+{"glGetnUniformuiv", "(III[II)V", (void *) android_glGetnUniformuiv__III_3II },
+{"glGetnUniformuiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetnUniformuiv__IIILjava_nio_IntBuffer_2 },
+{"glMinSampleShading", "(F)V", (void *) android_glMinSampleShading__F },
+{"glPatchParameteri", "(II)V", (void *) android_glPatchParameteri__II },
+{"glTexParameterIiv", "(II[II)V", (void *) android_glTexParameterIiv__II_3II },
+{"glTexParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIiv__IILjava_nio_IntBuffer_2 },
+{"glTexParameterIuiv", "(II[II)V", (void *) android_glTexParameterIuiv__II_3II },
+{"glTexParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIuiv__IILjava_nio_IntBuffer_2 },
+{"glGetTexParameterIiv", "(II[II)V", (void *) android_glGetTexParameterIiv__II_3II },
+{"glGetTexParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIiv__IILjava_nio_IntBuffer_2 },
+{"glGetTexParameterIuiv", "(II[II)V", (void *) android_glGetTexParameterIuiv__II_3II },
+{"glGetTexParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIuiv__IILjava_nio_IntBuffer_2 },
+{"glSamplerParameterIiv", "(II[II)V", (void *) android_glSamplerParameterIiv__II_3II },
+{"glSamplerParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIiv__IILjava_nio_IntBuffer_2 },
+{"glSamplerParameterIuiv", "(II[II)V", (void *) android_glSamplerParameterIuiv__II_3II },
+{"glSamplerParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIuiv__IILjava_nio_IntBuffer_2 },
+{"glGetSamplerParameterIiv", "(II[II)V", (void *) android_glGetSamplerParameterIiv__II_3II },
+{"glGetSamplerParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIiv__IILjava_nio_IntBuffer_2 },
+{"glGetSamplerParameterIuiv", "(II[II)V", (void *) android_glGetSamplerParameterIuiv__II_3II },
+{"glGetSamplerParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIuiv__IILjava_nio_IntBuffer_2 },
+{"glTexBuffer", "(III)V", (void *) android_glTexBuffer__III },
+{"glTexBufferRange", "(IIIII)V", (void *) android_glTexBufferRange__IIIII },
+{"glTexStorage3DMultisample", "(IIIIIIZ)V", (void *) android_glTexStorage3DMultisample__IIIIIIZ },
+};
+
+int register_android_opengl_jni_GLES32(JNIEnv *_env)
+{
+ int err;
+ err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
+ return err;
+}
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 595ef54..347f2f9 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -487,10 +487,34 @@
<!-- Take bug report menu title [CHAR LIMIT=NONE] -->
<string name="bugreport_title">Take bug report</string>
<!-- Message in bugreport dialog describing what it does [CHAR LIMIT=NONE] -->
+ <!-- TODO: remove if not used anymore -->
<string name="bugreport_message">This will collect information about your
current device state, to send as an e-mail message. It will take a little
time from starting the bug report until it is ready to be sent; please be
patient.</string>
+ <!-- Title in the bugreport dialog for the interactive workflow. [CHAR LIMIT=20] -->
+ <!-- DO NOT TRANSLATE YET: final phrasing still being discussed -->
+ <string name="bugreport_option_interactive_title">Interactive report</string>
+ <!-- Summary in the bugreport dialog for the interactive workflow. [CHAR LIMIT=NONE] -->
+ <!-- DO NOT TRANSLATE YET: final phrasing still being discussed -->
+ <string name="bugreport_option_interactive_summary">Use this under most circumstances.
+ It allows you to track progress of the report and enter more details about the problem.
+ It might omit some less-used sections that take a long time to report.</string>
+ <!-- Title in the bugreport dialog for the full workflow. [CHAR LIMIT=20] -->
+ <!-- DO NOT TRANSLATE YET: final phrasing still being discussed -->
+ <string name="bugreport_option_full_title">Full report</string>
+ <!-- Summary in the bugreport dialog for the full workflow. [CHAR LIMIT=20] -->
+ <!-- DO NOT TRANSLATE YET: final phrasing still being discussed -->
+ <string name="bugreport_option_full_summary">Use this option for minimal interference when
+ your device is unresponsive or too slow, or when you need all sections.
+ Does not take a screenshot or allow you to enter more details.</string>
+ <!-- Toast message informing user in how many seconds a bugreport screenshot will be taken -->
+ <!-- DO NOT TRANSLATE YET: final phrasing still being discussed -->
+ <plurals name="bugreport_countdown">
+ <item quantity="one">Taking screenshot for bug report in <xliff:g id="number">%d</xliff:g> second.</item>
+ <item quantity="other">Taking screenshot for bug report in <xliff:g id="number">%d</xliff:g> seconds.</item>
+ </plurals>
+
<!-- Format for build summary info [CHAR LIMIT=NONE] -->
<string name="bugreport_status" translatable="false">%s (%s)</string>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 2c54af7..b40fc3b 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1104,6 +1104,7 @@
<java-symbol type="string" name="config_ethernet_tcp_buffers" />
<java-symbol type="string" name="config_wifi_tcp_buffers" />
+ <java-symbol type="plurals" name="bugreport_countdown" />
<java-symbol type="plurals" name="duration_hours" />
<java-symbol type="plurals" name="duration_minutes" />
<java-symbol type="plurals" name="duration_seconds" />
@@ -1564,9 +1565,13 @@
<java-symbol type="string" name="android_preparing_apk" />
<java-symbol type="string" name="android_start_title" />
<java-symbol type="string" name="android_upgrading_title" />
- <java-symbol type="string" name="bugreport_title" />
<java-symbol type="string" name="bugreport_message" />
+ <java-symbol type="string" name="bugreport_option_full_summary" />
+ <java-symbol type="string" name="bugreport_option_full_title" />
+ <java-symbol type="string" name="bugreport_option_interactive_summary" />
+ <java-symbol type="string" name="bugreport_option_interactive_title" />
<java-symbol type="string" name="bugreport_status" />
+ <java-symbol type="string" name="bugreport_title" />
<java-symbol type="string" name="config_orientationSensorType" />
<java-symbol type="string" name="faceunlock_multiple_failures" />
<java-symbol type="string" name="global_action_power_off" />
diff --git a/opengl/java/android/opengl/GLES31.java b/opengl/java/android/opengl/GLES31.java
index 805930e..679108f 100644
--- a/opengl/java/android/opengl/GLES31.java
+++ b/opengl/java/android/opengl/GLES31.java
@@ -204,7 +204,8 @@
_nativeClassInit();
}
- private GLES31() {}
+ /** @hide */
+ GLES31() {}
// C function void glDispatchCompute ( GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z )
public static native void glDispatchCompute(
diff --git a/opengl/java/android/opengl/GLES32.java b/opengl/java/android/opengl/GLES32.java
new file mode 100644
index 0000000..7a392b8
--- /dev/null
+++ b/opengl/java/android/opengl/GLES32.java
@@ -0,0 +1,785 @@
+/*
+ * Copyright 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// This source file is automatically generated
+
+package android.opengl;
+
+/** OpenGL ES 3.2
+ */
+public class GLES32 extends GLES31 {
+
+ public static final int GL_CONTEXT_FLAG_DEBUG_BIT = 0x00000002;
+
+ public static final int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT = 0x00000004;
+
+ public static final int GL_GEOMETRY_SHADER_BIT = 0x00000004;
+ public static final int GL_TESS_CONTROL_SHADER_BIT = 0x00000008;
+ public static final int GL_TESS_EVALUATION_SHADER_BIT = 0x00000010;
+
+ public static final int GL_QUADS = 0x0007;
+ public static final int GL_LINES_ADJACENCY = 0x000A;
+ public static final int GL_LINE_STRIP_ADJACENCY = 0x000B;
+ public static final int GL_TRIANGLES_ADJACENCY = 0x000C;
+ public static final int GL_TRIANGLE_STRIP_ADJACENCY = 0x000D;
+ public static final int GL_PATCHES = 0x000E;
+ public static final int GL_STACK_OVERFLOW = 0x0503;
+ public static final int GL_STACK_UNDERFLOW = 0x0504;
+ public static final int GL_CONTEXT_LOST = 0x0507;
+ public static final int GL_TEXTURE_BORDER_COLOR = 0x1004;
+ public static final int GL_VERTEX_ARRAY = 0x8074;
+ public static final int GL_CLAMP_TO_BORDER = 0x812D;
+ public static final int GL_CONTEXT_FLAGS = 0x821E;
+ public static final int GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED = 0x8221;
+ public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242;
+ public static final int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243;
+ public static final int GL_DEBUG_CALLBACK_FUNCTION = 0x8244;
+ public static final int GL_DEBUG_CALLBACK_USER_PARAM = 0x8245;
+ public static final int GL_DEBUG_SOURCE_API = 0x8246;
+ public static final int GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247;
+ public static final int GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248;
+ public static final int GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249;
+ public static final int GL_DEBUG_SOURCE_APPLICATION = 0x824A;
+ public static final int GL_DEBUG_SOURCE_OTHER = 0x824B;
+ public static final int GL_DEBUG_TYPE_ERROR = 0x824C;
+ public static final int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D;
+ public static final int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E;
+ public static final int GL_DEBUG_TYPE_PORTABILITY = 0x824F;
+ public static final int GL_DEBUG_TYPE_PERFORMANCE = 0x8250;
+ public static final int GL_DEBUG_TYPE_OTHER = 0x8251;
+ public static final int GL_LOSE_CONTEXT_ON_RESET = 0x8252;
+ public static final int GL_GUILTY_CONTEXT_RESET = 0x8253;
+ public static final int GL_INNOCENT_CONTEXT_RESET = 0x8254;
+ public static final int GL_UNKNOWN_CONTEXT_RESET = 0x8255;
+ public static final int GL_RESET_NOTIFICATION_STRATEGY = 0x8256;
+ public static final int GL_LAYER_PROVOKING_VERTEX = 0x825E;
+ public static final int GL_UNDEFINED_VERTEX = 0x8260;
+ public static final int GL_NO_RESET_NOTIFICATION = 0x8261;
+ public static final int GL_DEBUG_TYPE_MARKER = 0x8268;
+ public static final int GL_DEBUG_TYPE_PUSH_GROUP = 0x8269;
+ public static final int GL_DEBUG_TYPE_POP_GROUP = 0x826A;
+ public static final int GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B;
+ public static final int GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C;
+ public static final int GL_DEBUG_GROUP_STACK_DEPTH = 0x826D;
+ public static final int GL_BUFFER = 0x82E0;
+ public static final int GL_SHADER = 0x82E1;
+ public static final int GL_PROGRAM = 0x82E2;
+ public static final int GL_QUERY = 0x82E3;
+ public static final int GL_PROGRAM_PIPELINE = 0x82E4;
+ public static final int GL_SAMPLER = 0x82E6;
+ public static final int GL_MAX_LABEL_LENGTH = 0x82E8;
+ public static final int GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C;
+ public static final int GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D;
+ public static final int GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F;
+ public static final int GL_GEOMETRY_VERTICES_OUT = 0x8916;
+ public static final int GL_GEOMETRY_INPUT_TYPE = 0x8917;
+ public static final int GL_GEOMETRY_OUTPUT_TYPE = 0x8918;
+ public static final int GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C;
+ public static final int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32;
+ public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29;
+ public static final int GL_TEXTURE_BUFFER = 0x8C2A;
+ public static final int GL_TEXTURE_BUFFER_BINDING = 0x8C2A;
+ public static final int GL_MAX_TEXTURE_BUFFER_SIZE = 0x8C2B;
+ public static final int GL_TEXTURE_BINDING_BUFFER = 0x8C2C;
+ public static final int GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D;
+ public static final int GL_SAMPLE_SHADING = 0x8C36;
+ public static final int GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37;
+ public static final int GL_PRIMITIVES_GENERATED = 0x8C87;
+ public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7;
+ public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8;
+ public static final int GL_SAMPLER_BUFFER = 0x8DC2;
+ public static final int GL_INT_SAMPLER_BUFFER = 0x8DD0;
+ public static final int GL_UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8;
+ public static final int GL_GEOMETRY_SHADER = 0x8DD9;
+ public static final int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF;
+ public static final int GL_MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0;
+ public static final int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1;
+ public static final int GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E;
+ public static final int GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F;
+ public static final int GL_FIRST_VERTEX_CONVENTION = 0x8E4D;
+ public static final int GL_LAST_VERTEX_CONVENTION = 0x8E4E;
+ public static final int GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A;
+ public static final int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B;
+ public static final int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C;
+ public static final int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D;
+ public static final int GL_PATCH_VERTICES = 0x8E72;
+ public static final int GL_TESS_CONTROL_OUTPUT_VERTICES = 0x8E75;
+ public static final int GL_TESS_GEN_MODE = 0x8E76;
+ public static final int GL_TESS_GEN_SPACING = 0x8E77;
+ public static final int GL_TESS_GEN_VERTEX_ORDER = 0x8E78;
+ public static final int GL_TESS_GEN_POINT_MODE = 0x8E79;
+ public static final int GL_ISOLINES = 0x8E7A;
+ public static final int GL_FRACTIONAL_ODD = 0x8E7B;
+ public static final int GL_FRACTIONAL_EVEN = 0x8E7C;
+ public static final int GL_MAX_PATCH_VERTICES = 0x8E7D;
+ public static final int GL_MAX_TESS_GEN_LEVEL = 0x8E7E;
+ public static final int GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F;
+ public static final int GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80;
+ public static final int GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81;
+ public static final int GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82;
+ public static final int GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83;
+ public static final int GL_MAX_TESS_PATCH_COMPONENTS = 0x8E84;
+ public static final int GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85;
+ public static final int GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86;
+ public static final int GL_TESS_EVALUATION_SHADER = 0x8E87;
+ public static final int GL_TESS_CONTROL_SHADER = 0x8E88;
+ public static final int GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89;
+ public static final int GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A;
+ public static final int GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009;
+ public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A;
+ public static final int GL_SAMPLER_CUBE_MAP_ARRAY = 0x900C;
+ public static final int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D;
+ public static final int GL_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E;
+ public static final int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F;
+ public static final int GL_IMAGE_BUFFER = 0x9051;
+ public static final int GL_IMAGE_CUBE_MAP_ARRAY = 0x9054;
+ public static final int GL_INT_IMAGE_BUFFER = 0x905C;
+ public static final int GL_INT_IMAGE_CUBE_MAP_ARRAY = 0x905F;
+ public static final int GL_UNSIGNED_INT_IMAGE_BUFFER = 0x9067;
+ public static final int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 0x906A;
+ public static final int GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB;
+ public static final int GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC;
+ public static final int GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD;
+ public static final int GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7;
+ public static final int GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8;
+ public static final int GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9;
+ public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102;
+ public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105;
+ public static final int GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B;
+ public static final int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C;
+ public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D;
+ public static final int GL_MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123;
+ public static final int GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124;
+ public static final int GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143;
+ public static final int GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144;
+ public static final int GL_DEBUG_LOGGED_MESSAGES = 0x9145;
+ public static final int GL_DEBUG_SEVERITY_HIGH = 0x9146;
+ public static final int GL_DEBUG_SEVERITY_MEDIUM = 0x9147;
+ public static final int GL_DEBUG_SEVERITY_LOW = 0x9148;
+ public static final int GL_TEXTURE_BUFFER_OFFSET = 0x919D;
+ public static final int GL_TEXTURE_BUFFER_SIZE = 0x919E;
+ public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 0x919F;
+ public static final int GL_MULTIPLY = 0x9294;
+ public static final int GL_SCREEN = 0x9295;
+ public static final int GL_OVERLAY = 0x9296;
+ public static final int GL_DARKEN = 0x9297;
+ public static final int GL_LIGHTEN = 0x9298;
+ public static final int GL_COLORDODGE = 0x9299;
+ public static final int GL_COLORBURN = 0x929A;
+ public static final int GL_HARDLIGHT = 0x929B;
+ public static final int GL_SOFTLIGHT = 0x929C;
+ public static final int GL_DIFFERENCE = 0x929E;
+ public static final int GL_EXCLUSION = 0x92A0;
+ public static final int GL_HSL_HUE = 0x92AD;
+ public static final int GL_HSL_SATURATION = 0x92AE;
+ public static final int GL_HSL_COLOR = 0x92AF;
+ public static final int GL_HSL_LUMINOSITY = 0x92B0;
+ public static final int GL_PRIMITIVE_BOUNDING_BOX = 0x92BE;
+ public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 0x92CD;
+ public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 0x92CE;
+ public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 0x92CF;
+ public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3;
+ public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4;
+ public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5;
+ public static final int GL_DEBUG_OUTPUT = 0x92E0;
+ public static final int GL_IS_PER_PATCH = 0x92E7;
+ public static final int GL_REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307;
+ public static final int GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308;
+ public static final int GL_REFERENCED_BY_GEOMETRY_SHADER = 0x9309;
+ public static final int GL_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312;
+ public static final int GL_MAX_FRAMEBUFFER_LAYERS = 0x9317;
+ public static final int GL_MULTISAMPLE_LINE_WIDTH_RANGE = 0x9381;
+ public static final int GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY = 0x9382;
+ public static final int GL_COMPRESSED_RGBA_ASTC_4x4 = 0x93B0;
+ public static final int GL_COMPRESSED_RGBA_ASTC_5x4 = 0x93B1;
+ public static final int GL_COMPRESSED_RGBA_ASTC_5x5 = 0x93B2;
+ public static final int GL_COMPRESSED_RGBA_ASTC_6x5 = 0x93B3;
+ public static final int GL_COMPRESSED_RGBA_ASTC_6x6 = 0x93B4;
+ public static final int GL_COMPRESSED_RGBA_ASTC_8x5 = 0x93B5;
+ public static final int GL_COMPRESSED_RGBA_ASTC_8x6 = 0x93B6;
+ public static final int GL_COMPRESSED_RGBA_ASTC_8x8 = 0x93B7;
+ public static final int GL_COMPRESSED_RGBA_ASTC_10x5 = 0x93B8;
+ public static final int GL_COMPRESSED_RGBA_ASTC_10x6 = 0x93B9;
+ public static final int GL_COMPRESSED_RGBA_ASTC_10x8 = 0x93BA;
+ public static final int GL_COMPRESSED_RGBA_ASTC_10x10 = 0x93BB;
+ public static final int GL_COMPRESSED_RGBA_ASTC_12x10 = 0x93BC;
+ public static final int GL_COMPRESSED_RGBA_ASTC_12x12 = 0x93BD;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4 = 0x93D0;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4 = 0x93D1;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5 = 0x93D2;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5 = 0x93D3;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6 = 0x93D4;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5 = 0x93D5;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6 = 0x93D6;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8 = 0x93D7;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5 = 0x93D8;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6 = 0x93D9;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8 = 0x93DA;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10 = 0x93DB;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10 = 0x93DC;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12 = 0x93DD;
+
+
+ native private static void _nativeClassInit();
+ static {
+ _nativeClassInit();
+ }
+
+ private GLES32() {}
+ // C function void glBlendBarrier ( void )
+
+ public static native void glBlendBarrier(
+ );
+
+ // C function void glCopyImageSubData ( GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth )
+
+ public static native void glCopyImageSubData(
+ int srcName,
+ int srcTarget,
+ int srcLevel,
+ int srcX,
+ int srcY,
+ int srcZ,
+ int dstName,
+ int dstTarget,
+ int dstLevel,
+ int dstX,
+ int dstY,
+ int dstZ,
+ int srcWidth,
+ int srcHeight,
+ int srcDepth
+ );
+
+ // C function void glDebugMessageControl ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled )
+
+ public static native void glDebugMessageControl(
+ int source,
+ int type,
+ int severity,
+ int count,
+ int[] ids,
+ int offset,
+ boolean enabled
+ );
+
+ // C function void glDebugMessageControl ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled )
+
+ public static native void glDebugMessageControl(
+ int source,
+ int type,
+ int severity,
+ int count,
+ java.nio.IntBuffer ids,
+ boolean enabled
+ );
+
+ // C function void glDebugMessageInsert ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf )
+
+ public static native void glDebugMessageInsert(
+ int source,
+ int type,
+ int id,
+ int severity,
+ int length,
+ String buf
+ );
+
+ // C function void glDebugMessageCallback ( GLDEBUGPROC callback, const void *userParam )
+
+ public interface DebugProc {
+ void onMessage(int source, int type, int id, int severity, String message);
+ }
+
+ public static native void glDebugMessageCallback(DebugProc callback);
+
+ // C function GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+
+ public static native int glGetDebugMessageLog(
+ int count,
+ int bufSize,
+ int[] sources,
+ int sourcesOffset,
+ int[] types,
+ int typesOffset,
+ int[] ids,
+ int idsOffset,
+ int[] severities,
+ int severitiesOffset,
+ int[] lengths,
+ int lengthsOffset,
+ byte[] messageLog,
+ int messageLogOffset);
+
+ // C function GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+
+ public static native int glGetDebugMessageLog(
+ int count,
+ java.nio.IntBuffer sources,
+ java.nio.IntBuffer types,
+ java.nio.IntBuffer ids,
+ java.nio.IntBuffer severities,
+ java.nio.IntBuffer lengths,
+ java.nio.ByteBuffer messageLog);
+
+ // C function GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+
+ public static native String[] glGetDebugMessageLog(
+ int count,
+ int[] sources,
+ int sourcesOffset,
+ int[] types,
+ int typesOffset,
+ int[] ids,
+ int idsOffset,
+ int[] severities,
+ int severitiesOffset);
+
+ // C function GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+
+ public static native String[] glGetDebugMessageLog(
+ int count,
+ java.nio.IntBuffer sources,
+ java.nio.IntBuffer types,
+ java.nio.IntBuffer ids,
+ java.nio.IntBuffer severities);
+
+ // C function void glPushDebugGroup ( GLenum source, GLuint id, GLsizei length, const GLchar *message )
+
+ public static native void glPushDebugGroup(
+ int source,
+ int id,
+ int length,
+ String message
+ );
+
+ // C function void glPopDebugGroup ( void )
+
+ public static native void glPopDebugGroup(
+ );
+
+ // C function void glObjectLabel ( GLenum identifier, GLuint name, GLsizei length, const GLchar *label )
+
+ public static native void glObjectLabel(
+ int identifier,
+ int name,
+ int length,
+ String label
+ );
+
+ // C function void glGetObjectLabel ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label )
+
+ public static native String glGetObjectLabel(int identifier, int name);
+
+ // C function void glObjectPtrLabel ( const void *ptr, GLsizei length, const GLchar *label )
+
+ public static native void glObjectPtrLabel(long ptr, String label);
+
+ // C function void glGetObjectPtrLabel ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label )
+
+ public static native String glGetObjectPtrLabel(long ptr);
+
+ // C function void glGetPointerv ( GLenum pname, void **params )
+
+ public static native long glGetPointerv(
+ int pname
+ );
+
+ // C function void glEnablei ( GLenum target, GLuint index )
+
+ public static native void glEnablei(
+ int target,
+ int index
+ );
+
+ // C function void glDisablei ( GLenum target, GLuint index )
+
+ public static native void glDisablei(
+ int target,
+ int index
+ );
+
+ // C function void glBlendEquationi ( GLuint buf, GLenum mode )
+
+ public static native void glBlendEquationi(
+ int buf,
+ int mode
+ );
+
+ // C function void glBlendEquationSeparatei ( GLuint buf, GLenum modeRGB, GLenum modeAlpha )
+
+ public static native void glBlendEquationSeparatei(
+ int buf,
+ int modeRGB,
+ int modeAlpha
+ );
+
+ // C function void glBlendFunci ( GLuint buf, GLenum src, GLenum dst )
+
+ public static native void glBlendFunci(
+ int buf,
+ int src,
+ int dst
+ );
+
+ // C function void glBlendFuncSeparatei ( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha )
+
+ public static native void glBlendFuncSeparatei(
+ int buf,
+ int srcRGB,
+ int dstRGB,
+ int srcAlpha,
+ int dstAlpha
+ );
+
+ // C function void glColorMaski ( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a )
+
+ public static native void glColorMaski(
+ int index,
+ boolean r,
+ boolean g,
+ boolean b,
+ boolean a
+ );
+
+ // C function GLboolean glIsEnabledi ( GLenum target, GLuint index )
+
+ public static native boolean glIsEnabledi(
+ int target,
+ int index
+ );
+
+ // C function void glDrawElementsBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex )
+
+ public static native void glDrawElementsBaseVertex(
+ int mode,
+ int count,
+ int type,
+ java.nio.Buffer indices,
+ int basevertex
+ );
+
+ // C function void glDrawRangeElementsBaseVertex ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex )
+
+ public static native void glDrawRangeElementsBaseVertex(
+ int mode,
+ int start,
+ int end,
+ int count,
+ int type,
+ java.nio.Buffer indices,
+ int basevertex
+ );
+
+ // C function void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex )
+
+ public static native void glDrawElementsInstancedBaseVertex(
+ int mode,
+ int count,
+ int type,
+ java.nio.Buffer indices,
+ int instanceCount,
+ int basevertex
+ );
+
+ // C function void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex )
+
+ public static native void glDrawElementsInstancedBaseVertex(
+ int mode,
+ int count,
+ int type,
+ int indicesOffset,
+ int instanceCount,
+ int basevertex
+ );
+
+ // C function void glFramebufferTexture ( GLenum target, GLenum attachment, GLuint texture, GLint level )
+
+ public static native void glFramebufferTexture(
+ int target,
+ int attachment,
+ int texture,
+ int level
+ );
+
+ // C function void glPrimitiveBoundingBox ( GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW )
+
+ public static native void glPrimitiveBoundingBox(
+ float minX,
+ float minY,
+ float minZ,
+ float minW,
+ float maxX,
+ float maxY,
+ float maxZ,
+ float maxW
+ );
+
+ // C function GLenum glGetGraphicsResetStatus ( void )
+
+ public static native int glGetGraphicsResetStatus(
+ );
+
+ // C function void glReadnPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data )
+
+ public static native void glReadnPixels(
+ int x,
+ int y,
+ int width,
+ int height,
+ int format,
+ int type,
+ int bufSize,
+ java.nio.Buffer data
+ );
+
+ // C function void glGetnUniformfv ( GLuint program, GLint location, GLsizei bufSize, GLfloat *params )
+
+ public static native void glGetnUniformfv(
+ int program,
+ int location,
+ int bufSize,
+ float[] params,
+ int offset
+ );
+
+ // C function void glGetnUniformfv ( GLuint program, GLint location, GLsizei bufSize, GLfloat *params )
+
+ public static native void glGetnUniformfv(
+ int program,
+ int location,
+ int bufSize,
+ java.nio.FloatBuffer params
+ );
+
+ // C function void glGetnUniformiv ( GLuint program, GLint location, GLsizei bufSize, GLint *params )
+
+ public static native void glGetnUniformiv(
+ int program,
+ int location,
+ int bufSize,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetnUniformiv ( GLuint program, GLint location, GLsizei bufSize, GLint *params )
+
+ public static native void glGetnUniformiv(
+ int program,
+ int location,
+ int bufSize,
+ java.nio.IntBuffer params
+ );
+
+ // C function void glGetnUniformuiv ( GLuint program, GLint location, GLsizei bufSize, GLuint *params )
+
+ public static native void glGetnUniformuiv(
+ int program,
+ int location,
+ int bufSize,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetnUniformuiv ( GLuint program, GLint location, GLsizei bufSize, GLuint *params )
+
+ public static native void glGetnUniformuiv(
+ int program,
+ int location,
+ int bufSize,
+ java.nio.IntBuffer params
+ );
+
+ // C function void glMinSampleShading ( GLfloat value )
+
+ public static native void glMinSampleShading(
+ float value
+ );
+
+ // C function void glPatchParameteri ( GLenum pname, GLint value )
+
+ public static native void glPatchParameteri(
+ int pname,
+ int value
+ );
+
+ // C function void glTexParameterIiv ( GLenum target, GLenum pname, const GLint *params )
+
+ public static native void glTexParameterIiv(
+ int target,
+ int pname,
+ int[] params,
+ int offset
+ );
+
+ // C function void glTexParameterIiv ( GLenum target, GLenum pname, const GLint *params )
+
+ public static native void glTexParameterIiv(
+ int target,
+ int pname,
+ java.nio.IntBuffer params
+ );
+
+ // C function void glTexParameterIuiv ( GLenum target, GLenum pname, const GLuint *params )
+
+ public static native void glTexParameterIuiv(
+ int target,
+ int pname,
+ int[] params,
+ int offset
+ );
+
+ // C function void glTexParameterIuiv ( GLenum target, GLenum pname, const GLuint *params )
+
+ public static native void glTexParameterIuiv(
+ int target,
+ int pname,
+ java.nio.IntBuffer params
+ );
+
+ // C function void glGetTexParameterIiv ( GLenum target, GLenum pname, GLint *params )
+
+ public static native void glGetTexParameterIiv(
+ int target,
+ int pname,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetTexParameterIiv ( GLenum target, GLenum pname, GLint *params )
+
+ public static native void glGetTexParameterIiv(
+ int target,
+ int pname,
+ java.nio.IntBuffer params
+ );
+
+ // C function void glGetTexParameterIuiv ( GLenum target, GLenum pname, GLuint *params )
+
+ public static native void glGetTexParameterIuiv(
+ int target,
+ int pname,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetTexParameterIuiv ( GLenum target, GLenum pname, GLuint *params )
+
+ public static native void glGetTexParameterIuiv(
+ int target,
+ int pname,
+ java.nio.IntBuffer params
+ );
+
+ // C function void glSamplerParameterIiv ( GLuint sampler, GLenum pname, const GLint *param )
+
+ public static native void glSamplerParameterIiv(
+ int sampler,
+ int pname,
+ int[] param,
+ int offset
+ );
+
+ // C function void glSamplerParameterIiv ( GLuint sampler, GLenum pname, const GLint *param )
+
+ public static native void glSamplerParameterIiv(
+ int sampler,
+ int pname,
+ java.nio.IntBuffer param
+ );
+
+ // C function void glSamplerParameterIuiv ( GLuint sampler, GLenum pname, const GLuint *param )
+
+ public static native void glSamplerParameterIuiv(
+ int sampler,
+ int pname,
+ int[] param,
+ int offset
+ );
+
+ // C function void glSamplerParameterIuiv ( GLuint sampler, GLenum pname, const GLuint *param )
+
+ public static native void glSamplerParameterIuiv(
+ int sampler,
+ int pname,
+ java.nio.IntBuffer param
+ );
+
+ // C function void glGetSamplerParameterIiv ( GLuint sampler, GLenum pname, GLint *params )
+
+ public static native void glGetSamplerParameterIiv(
+ int sampler,
+ int pname,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetSamplerParameterIiv ( GLuint sampler, GLenum pname, GLint *params )
+
+ public static native void glGetSamplerParameterIiv(
+ int sampler,
+ int pname,
+ java.nio.IntBuffer params
+ );
+
+ // C function void glGetSamplerParameterIuiv ( GLuint sampler, GLenum pname, GLuint *params )
+
+ public static native void glGetSamplerParameterIuiv(
+ int sampler,
+ int pname,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetSamplerParameterIuiv ( GLuint sampler, GLenum pname, GLuint *params )
+
+ public static native void glGetSamplerParameterIuiv(
+ int sampler,
+ int pname,
+ java.nio.IntBuffer params
+ );
+
+ // C function void glTexBuffer ( GLenum target, GLenum internalformat, GLuint buffer )
+
+ public static native void glTexBuffer(
+ int target,
+ int internalformat,
+ int buffer
+ );
+
+ // C function void glTexBufferRange ( GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size )
+
+ public static native void glTexBufferRange(
+ int target,
+ int internalformat,
+ int buffer,
+ int offset,
+ int size
+ );
+
+ // C function void glTexStorage3DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations )
+
+ public static native void glTexStorage3DMultisample(
+ int target,
+ int samples,
+ int internalformat,
+ int width,
+ int height,
+ int depth,
+ boolean fixedsamplelocations
+ );
+
+}
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml
index 25346ac..1c4c012 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -107,6 +107,7 @@
<uses-permission android:name="android.permission.REGISTER_CONNECTION_MANAGER" />
<uses-permission android:name="android.permission.REGISTER_SIM_SUBSCRIPTION" />
<uses-permission android:name="android.permission.GET_APP_OPS_STATS" />
+ <uses-permission android:name="android.permission.VIBRATE" />
<application android:label="@string/app_label"
android:forceDeviceEncrypted="true"
diff --git a/packages/Shell/res/values/strings.xml b/packages/Shell/res/values/strings.xml
index a7f2df5..dcd5f04 100644
--- a/packages/Shell/res/values/strings.xml
+++ b/packages/Shell/res/values/strings.xml
@@ -45,6 +45,14 @@
<!-- Title of the notification action that opens the dialog for the user-defined bug report details. -->
<string name="bugreport_info_action">Details</string>
+ <!-- Title of the notification action that takes aditional screenshots. -->
+ <string name="bugreport_screenshot_action">Screenshot</string>
+
+ <!-- Toast message sent when the a screenshot for the bug report was taken successfully. -->
+ <string name="bugreport_screenshot_taken">Screenshot taken succesfully.</string>
+ <!-- Toast message sent when the a screenshot for the bug report was not taken due to an error. -->
+ <string name="bugreport_screenshot_failed">Screenshot could not be taken.</string>
+
<!-- Title of the dialog asking for user-defined bug report details like name, title, and description. -->
<string name="bugreport_info_dialog_title">Bug report details</string>
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java
index 82ee710..d31088c 100644
--- a/packages/Shell/src/com/android/shell/BugreportProgressService.java
+++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java
@@ -16,6 +16,7 @@
package com.android.shell;
+import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
import static com.android.shell.BugreportPrefs.STATE_SHOW;
import static com.android.shell.BugreportPrefs.getWarningState;
@@ -29,6 +30,7 @@
import java.io.PrintWriter;
import java.text.NumberFormat;
import java.util.ArrayList;
+import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@@ -48,6 +50,7 @@
import android.app.Service;
import android.content.ClipData;
import android.content.Context;
+import android.content.ContextWrapper;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
@@ -59,8 +62,8 @@
import android.os.Looper;
import android.os.Message;
import android.os.Parcelable;
-import android.os.Process;
import android.os.SystemProperties;
+import android.os.Vibrator;
import android.support.v4.content.FileProvider;
import android.text.TextUtils;
import android.text.format.DateUtils;
@@ -115,6 +118,8 @@
static final String INTENT_BUGREPORT_SHARE = "android.intent.action.BUGREPORT_SHARE";
static final String INTENT_BUGREPORT_INFO_LAUNCH =
"android.intent.action.BUGREPORT_INFO_LAUNCH";
+ static final String INTENT_BUGREPORT_SCREENSHOT =
+ "android.intent.action.BUGREPORT_SCREENSHOT";
static final String EXTRA_BUGREPORT = "android.intent.extra.BUGREPORT";
static final String EXTRA_SCREENSHOT = "android.intent.extra.SCREENSHOT";
@@ -127,6 +132,16 @@
private static final int MSG_SERVICE_COMMAND = 1;
private static final int MSG_POLL = 2;
+ private static final int MSG_DELAYED_SCREENSHOT = 3;
+ private static final int MSG_SCREENSHOT_REQUEST = 4;
+ private static final int MSG_SCREENSHOT_RESPONSE = 5;
+
+ /**
+ * Delay before a screenshot is taken.
+ * <p>
+ * Should be at least 3 seconds, otherwise its toast might show up in the screenshot.
+ */
+ static final int SCREENSHOT_DELAY_SECONDS = 3;
/** Polling frequency, in milliseconds. */
static final long POLLING_FREQUENCY = 2 * DateUtils.SECOND_IN_MILLIS;
@@ -141,35 +156,59 @@
private static final String NAME_SUFFIX = ".name";
/** System property (and value) used to stop dumpstate. */
+ // TODO: should call ActiveManager API instead
private static final String CTL_STOP = "ctl.stop";
private static final String BUGREPORT_SERVICE = "bugreportplus";
+ /**
+ * Directory on Shell's data storage where screenshots will be stored.
+ * <p>
+ * Must be a path supported by its FileProvider.
+ */
+ private static final String SCREENSHOT_DIR = "bugreports";
+
/** Managed dumpstate processes (keyed by pid) */
private final SparseArray<BugreportInfo> mProcesses = new SparseArray<>();
- private Looper mServiceLooper;
- private ServiceHandler mServiceHandler;
+ private Context mContext;
+ private ServiceHandler mMainHandler;
+ private ScreenshotHandler mScreenshotHandler;
private final BugreportInfoDialog mInfoDialog = new BugreportInfoDialog();
+ private File mScreenshotsDir;
+
+ /**
+ * Flag indicating whether a screenshot is being taken.
+ * <p>
+ * This is the only state that is shared between the 2 handlers and hence must have synchronized
+ * access.
+ */
+ private boolean mTakingScreenshot;
+
@Override
public void onCreate() {
- HandlerThread thread = new HandlerThread("BugreportProgressServiceThread",
- Process.THREAD_PRIORITY_BACKGROUND);
- thread.start();
+ mContext = getApplicationContext();
+ mMainHandler = new ServiceHandler("BugreportProgressServiceMainThread");
+ mScreenshotHandler = new ScreenshotHandler("BugreportProgressServiceScreenshotThread");
- mServiceLooper = thread.getLooper();
- mServiceHandler = new ServiceHandler(mServiceLooper);
+ mScreenshotsDir = new File(new ContextWrapper(mContext).getFilesDir(), SCREENSHOT_DIR);
+ if (!mScreenshotsDir.exists()) {
+ Log.i(TAG, "Creating directory " + mScreenshotsDir + " to store temporary screenshots");
+ if (!mScreenshotsDir.mkdir()) {
+ Log.w(TAG, "Could not create directory " + mScreenshotsDir);
+ }
+ }
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (intent != null) {
// Handle it in a separate thread.
- Message msg = mServiceHandler.obtainMessage();
+ final Message msg = mMainHandler.obtainMessage();
msg.what = MSG_SERVICE_COMMAND;
msg.obj = intent;
- mServiceHandler.sendMessage(msg);
+ mMainHandler.sendMessage(msg);
}
// If service is killed it cannot be recreated because it would not know which
@@ -184,29 +223,31 @@
@Override
public void onDestroy() {
- mServiceLooper.quit();
+ mMainHandler.getLooper().quit();
+ mScreenshotHandler.getLooper().quit();
super.onDestroy();
}
@Override
protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
- synchronized (mProcesses) {
- final int size = mProcesses.size();
- if (size == 0) {
- writer.printf("No monitored processes");
- return;
- }
- writer.printf("Monitored dumpstate processes\n");
- writer.printf("-----------------------------\n");
- for (int i = 0; i < size; i++) {
- writer.printf("%s\n", mProcesses.valueAt(i));
- }
+ final int size = mProcesses.size();
+ if (size == 0) {
+ writer.printf("No monitored processes");
+ return;
+ }
+ writer.printf("Monitored dumpstate processes\n");
+ writer.printf("-----------------------------\n");
+ for (int i = 0; i < size; i++) {
+ writer.printf("%s\n", mProcesses.valueAt(i));
}
}
+ /**
+ * Main thread used to handle all requests but taking screenshots.
+ */
private final class ServiceHandler extends Handler {
- public ServiceHandler(Looper looper) {
- super(looper);
+ public ServiceHandler(String name) {
+ super(newLooper(name));
}
@Override
@@ -216,6 +257,16 @@
return;
}
+ if (msg.what == MSG_DELAYED_SCREENSHOT) {
+ takeScreenshot(msg.arg1, msg.arg2);
+ return;
+ }
+
+ if (msg.what == MSG_SCREENSHOT_RESPONSE) {
+ handleScreenshotResponse(msg);
+ return;
+ }
+
if (msg.what != MSG_SERVICE_COMMAND) {
// Sanity check.
Log.e(TAG, "Invalid message type: " + msg.what);
@@ -262,6 +313,9 @@
case INTENT_BUGREPORT_INFO_LAUNCH:
launchBugreportInfoDialog(pid);
break;
+ case INTENT_BUGREPORT_SCREENSHOT:
+ takeScreenshot(pid, true);
+ break;
case INTENT_BUGREPORT_SHARE:
shareBugreport(pid);
break;
@@ -286,6 +340,32 @@
}
/**
+ * Separate thread used only to take screenshots so it doesn't block the main thread.
+ */
+ private final class ScreenshotHandler extends Handler {
+ public ScreenshotHandler(String name) {
+ super(newLooper(name));
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ if (msg.what != MSG_SCREENSHOT_REQUEST) {
+ Log.e(TAG, "Invalid message type: " + msg.what);
+ return;
+ }
+ handleScreenshotRequest(msg);
+ }
+ }
+
+ private BugreportInfo getInfo(int pid) {
+ final BugreportInfo info = mProcesses.get(pid);
+ if (info == null) {
+ Log.w(TAG, "Not monitoring process with PID " + pid);
+ }
+ return info;
+ }
+
+ /**
* Creates the {@link BugreportInfo} for a process and issue a system notification to
* indicate its progress.
*
@@ -304,14 +384,14 @@
return false;
}
- final BugreportInfo info = new BugreportInfo(getApplicationContext(), pid, name, max);
- synchronized (mProcesses) {
- if (mProcesses.indexOfKey(pid) >= 0) {
- Log.w(TAG, "PID " + pid + " already watched");
- } else {
- mProcesses.put(info.pid, info);
- }
+ final BugreportInfo info = new BugreportInfo(mContext, pid, name, max);
+ if (mProcesses.indexOfKey(pid) >= 0) {
+ Log.w(TAG, "PID " + pid + " already watched");
+ } else {
+ mProcesses.put(info.pid, info);
}
+ // Take initial screenshot.
+ takeScreenshot(pid, false);
updateProgress(info);
return true;
}
@@ -325,26 +405,35 @@
return;
}
- final Context context = getApplicationContext();
final NumberFormat nf = NumberFormat.getPercentInstance();
nf.setMinimumFractionDigits(2);
nf.setMaximumFractionDigits(2);
final String percentText = nf.format((double) info.progress / info.max);
- final Action cancelAction = new Action.Builder(null, context.getString(
- com.android.internal.R.string.cancel), newCancelIntent(context, info)).build();
- final Intent infoIntent = new Intent(context, BugreportProgressService.class);
+ final Action cancelAction = new Action.Builder(null, mContext.getString(
+ com.android.internal.R.string.cancel), newCancelIntent(mContext, info)).build();
+ final Intent infoIntent = new Intent(mContext, BugreportProgressService.class);
infoIntent.setAction(INTENT_BUGREPORT_INFO_LAUNCH);
infoIntent.putExtra(EXTRA_PID, info.pid);
final Action infoAction = new Action.Builder(null,
- context.getString(R.string.bugreport_info_action),
- PendingIntent.getService(context, info.pid, infoIntent,
+ mContext.getString(R.string.bugreport_info_action),
+ PendingIntent.getService(mContext, info.pid, infoIntent,
PendingIntent.FLAG_UPDATE_CURRENT)).build();
+ final Intent screenshotIntent = new Intent(mContext, BugreportProgressService.class);
+ screenshotIntent.setAction(INTENT_BUGREPORT_SCREENSHOT);
+ screenshotIntent.putExtra(EXTRA_PID, info.pid);
+ PendingIntent screenshotPendingIntent = mTakingScreenshot ? null : PendingIntent
+ .getService(mContext, info.pid, screenshotIntent,
+ PendingIntent.FLAG_UPDATE_CURRENT);
+ final Action screenshotAction = new Action.Builder(null,
+ mContext.getString(R.string.bugreport_screenshot_action),
+ screenshotPendingIntent).build();
- final String title = context.getString(R.string.bugreport_in_progress_title);
+ final String title = mContext.getString(R.string.bugreport_in_progress_title);
+
final String name =
- info.name != null ? info.name : context.getString(R.string.bugreport_unnamed);
+ info.name != null ? info.name : mContext.getString(R.string.bugreport_unnamed);
- final Notification notification = new Notification.Builder(context)
+ final Notification notification = new Notification.Builder(mContext)
.setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
.setContentTitle(title)
.setTicker(title)
@@ -353,13 +442,14 @@
.setProgress(info.max, info.progress, false)
.setOngoing(true)
.setLocalOnly(true)
- .setColor(context.getColor(
+ .setColor(mContext.getColor(
com.android.internal.R.color.system_notification_accent_color))
.addAction(infoAction)
+ .addAction(screenshotAction)
.addAction(cancelAction)
.build();
- NotificationManager.from(context).notify(TAG, info.pid, notification);
+ NotificationManager.from(mContext).notify(TAG, info.pid, notification);
}
/**
@@ -377,16 +467,14 @@
* Finalizes the progress on a given bugreport and cancel its notification.
*/
private void stopProgress(int pid) {
- synchronized (mProcesses) {
- if (mProcesses.indexOfKey(pid) < 0) {
- Log.w(TAG, "PID not watched: " + pid);
- } else {
- mProcesses.remove(pid);
- }
- stopSelfWhenDone();
+ if (mProcesses.indexOfKey(pid) < 0) {
+ Log.w(TAG, "PID not watched: " + pid);
+ } else {
+ mProcesses.remove(pid);
}
+ stopSelfWhenDone();
Log.v(TAG, "stopProgress(" + pid + "): cancel notification");
- NotificationManager.from(getApplicationContext()).cancel(TAG, pid);
+ NotificationManager.from(mContext).cancel(TAG, pid);
}
/**
@@ -394,12 +482,11 @@
*/
private void cancel(int pid) {
Log.v(TAG, "cancel: pid=" + pid);
- synchronized (mProcesses) {
- BugreportInfo info = mProcesses.get(pid);
- if (info != null && !info.finished) {
- Log.i(TAG, "Cancelling bugreport service (pid=" + pid + ") on user's request");
- setSystemProperty(CTL_STOP, BUGREPORT_SERVICE);
- }
+ final BugreportInfo info = getInfo(pid);
+ if (info != null && !info.finished) {
+ Log.i(TAG, "Cancelling bugreport service (pid=" + pid + ") on user's request");
+ setSystemProperty(CTL_STOP, BUGREPORT_SERVICE);
+ deleteScreenshots(info);
}
stopProgress(pid);
}
@@ -410,54 +497,52 @@
* @return whether it should keep polling.
*/
private boolean pollProgress() {
- synchronized (mProcesses) {
- final int total = mProcesses.size();
- if (total == 0) {
- Log.d(TAG, "No process to poll progress.");
- }
- int activeProcesses = 0;
- for (int i = 0; i < total; i++) {
- final int pid = mProcesses.keyAt(i);
- final BugreportInfo info = mProcesses.valueAt(i);
- if (info.finished) {
- if (DEBUG) Log.v(TAG, "Skipping finished process " + pid);
- continue;
- }
- activeProcesses++;
- final String progressKey = DUMPSTATE_PREFIX + pid + PROGRESS_SUFFIX;
- final int progress = SystemProperties.getInt(progressKey, 0);
- if (progress == 0) {
- Log.v(TAG, "System property " + progressKey + " is not set yet");
- }
- final int max = SystemProperties.getInt(DUMPSTATE_PREFIX + pid + MAX_SUFFIX, 0);
- final boolean maxChanged = max > 0 && max != info.max;
- final boolean progressChanged = progress > 0 && progress != info.progress;
-
- if (progressChanged || maxChanged) {
- if (progressChanged) {
- if (DEBUG) Log.v(TAG, "Updating progress for PID " + pid + " from "
- + info.progress + " to " + progress);
- info.progress = progress;
- }
- if (maxChanged) {
- Log.i(TAG, "Updating max progress for PID " + pid + " from " + info.max
- + " to " + max);
- info.max = max;
- }
- info.lastUpdate = System.currentTimeMillis();
- updateProgress(info);
- } else {
- long inactiveTime = System.currentTimeMillis() - info.lastUpdate;
- if (inactiveTime >= INACTIVITY_TIMEOUT) {
- Log.w(TAG, "No progress update for process " + pid + " since "
- + info.getFormattedLastUpdate());
- stopProgress(info.pid);
- }
- }
- }
- if (DEBUG) Log.v(TAG, "pollProgress() total=" + total + ", actives=" + activeProcesses);
- return activeProcesses > 0;
+ final int total = mProcesses.size();
+ if (total == 0) {
+ Log.d(TAG, "No process to poll progress.");
}
+ int activeProcesses = 0;
+ for (int i = 0; i < total; i++) {
+ final int pid = mProcesses.keyAt(i);
+ final BugreportInfo info = mProcesses.valueAt(i);
+ if (info.finished) {
+ if (DEBUG) Log.v(TAG, "Skipping finished process " + pid);
+ continue;
+ }
+ activeProcesses++;
+ final String progressKey = DUMPSTATE_PREFIX + pid + PROGRESS_SUFFIX;
+ final int progress = SystemProperties.getInt(progressKey, 0);
+ if (progress == 0) {
+ Log.v(TAG, "System property " + progressKey + " is not set yet");
+ }
+ final int max = SystemProperties.getInt(DUMPSTATE_PREFIX + pid + MAX_SUFFIX, 0);
+ final boolean maxChanged = max > 0 && max != info.max;
+ final boolean progressChanged = progress > 0 && progress != info.progress;
+
+ if (progressChanged || maxChanged) {
+ if (progressChanged) {
+ if (DEBUG) Log.v(TAG, "Updating progress for PID " + pid + " from "
+ + info.progress + " to " + progress);
+ info.progress = progress;
+ }
+ if (maxChanged) {
+ Log.i(TAG, "Updating max progress for PID " + pid + " from " + info.max
+ + " to " + max);
+ info.max = max;
+ }
+ info.lastUpdate = System.currentTimeMillis();
+ updateProgress(info);
+ } else {
+ long inactiveTime = System.currentTimeMillis() - info.lastUpdate;
+ if (inactiveTime >= INACTIVITY_TIMEOUT) {
+ Log.w(TAG, "No progress update for process " + pid + " since "
+ + info.getFormattedLastUpdate());
+ stopProgress(info.pid);
+ }
+ }
+ }
+ if (DEBUG) Log.v(TAG, "pollProgress() total=" + total + ", actives=" + activeProcesses);
+ return activeProcesses > 0;
}
/**
@@ -467,35 +552,141 @@
private void launchBugreportInfoDialog(int pid) {
// Copy values so it doesn't lock mProcesses while UI is being updated
final String name, title, description;
- synchronized (mProcesses) {
- final BugreportInfo info = mProcesses.get(pid);
- if (info == null) {
- Log.w(TAG, "No bugreport info for PID " + pid);
- return;
- }
- name = info.name;
- title = info.title;
- description = info.description;
+ final BugreportInfo info = getInfo(pid);
+ if (info == null) {
+ return;
+ }
+ name = info.name;
+ title = info.title;
+ description = info.description;
+
+ collapseNotificationBar();
+ mInfoDialog.initialize(mContext, pid, name, title, description);
+ }
+
+ /**
+ * Starting point for taking a screenshot.
+ * <p>
+ * If {@code delayed} is set, it first display a toast message and waits
+ * {@link #SCREENSHOT_DELAY_SECONDS} seconds before taking it, otherwise it takes the screenshot
+ * right away.
+ * <p>
+ * Typical usage is delaying when taken from the notification action, and taking it right away
+ * upon receiving a {@link #INTENT_BUGREPORT_STARTED}.
+ */
+ private void takeScreenshot(int pid, boolean delayed) {
+ setTakingScreenshot(true);
+ if (delayed) {
+ collapseNotificationBar();
+ final String msg = mContext.getResources()
+ .getQuantityString(com.android.internal.R.plurals.bugreport_countdown,
+ SCREENSHOT_DELAY_SECONDS, SCREENSHOT_DELAY_SECONDS);
+ Log.i(TAG, msg);
+ // Show a toast just once, otherwise it might be captured in the screenshot.
+ Toast.makeText(mContext, msg, Toast.LENGTH_SHORT).show();
+
+ takeScreenshot(pid, SCREENSHOT_DELAY_SECONDS);
+ } else {
+ takeScreenshot(pid, 0);
+ }
+ }
+
+ /**
+ * Takes a screenshot after {@code delay} seconds.
+ */
+ private void takeScreenshot(int pid, int delay) {
+ if (delay > 0) {
+ Log.d(TAG, "Taking screenshot for " + pid + " in " + delay + " seconds");
+ final Message msg = mMainHandler.obtainMessage();
+ msg.what = MSG_DELAYED_SCREENSHOT;
+ msg.arg1 = pid;
+ msg.arg2 = delay - 1;
+ mMainHandler.sendMessageDelayed(msg, DateUtils.SECOND_IN_MILLIS);
+ return;
}
- // Closes the notification bar first.
- sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
+ // It's time to take the screenshot: let the proper thread handle it
+ final BugreportInfo info = getInfo(pid);
+ if (info == null) {
+ return;
+ }
+ final String screenshotPath =
+ new File(mScreenshotsDir, info.getPathNextScreenshot()).getAbsolutePath();
- mInfoDialog.initialize(getApplicationContext(), pid, name, title, description);
+ final Message requestMsg = new Message();
+ requestMsg.what = MSG_SCREENSHOT_REQUEST;
+ requestMsg.arg1 = pid;
+ requestMsg.obj = screenshotPath;
+ mScreenshotHandler.sendMessage(requestMsg);
+ }
+
+ /**
+ * Sets the internal {@code mTakingScreenshot} state and updates all notifications so their
+ * SCREENSHOT button is enabled or disabled accordingly.
+ */
+ private void setTakingScreenshot(boolean flag) {
+ synchronized (BugreportProgressService.this) {
+ mTakingScreenshot = flag;
+ for (int i = 0; i < mProcesses.size(); i++) {
+ updateProgress(mProcesses.valueAt(i));
+ }
+ }
+ }
+
+ private void handleScreenshotRequest(Message requestMsg) {
+ String screenshotFile = (String) requestMsg.obj;
+ boolean taken = takeScreenshot(mContext, screenshotFile);
+ setTakingScreenshot(false);
+
+ final Message resultMsg = new Message();
+ resultMsg.what = MSG_SCREENSHOT_RESPONSE;
+ resultMsg.arg1 = requestMsg.arg1;
+ resultMsg.arg2 = taken ? 1 : 0;
+ resultMsg.obj = screenshotFile;
+ mMainHandler.sendMessage(resultMsg);
+ }
+
+ private void handleScreenshotResponse(Message resultMsg) {
+ final boolean taken = resultMsg.arg2 != 0;
+ final BugreportInfo info = getInfo(resultMsg.arg1);
+ if (info == null) {
+ return;
+ }
+ final File screenshotFile = new File((String) resultMsg.obj);
+
+ final int msgId;
+ if (taken) {
+ info.addScreenshot(screenshotFile);
+ msgId = R.string.bugreport_screenshot_taken;
+ } else {
+ // TODO: try again using Framework APIs instead of relying on screencap.
+ msgId = R.string.bugreport_screenshot_failed;
+ }
+ final String msg = mContext.getString(msgId);
+ Log.d(TAG, msg);
+ Toast.makeText(mContext, msg, Toast.LENGTH_SHORT).show();
+ }
+
+ /**
+ * Deletes all screenshots taken for a given bugreport.
+ */
+ private void deleteScreenshots(BugreportInfo info) {
+ for (File file : info.screenshotFiles) {
+ Log.i(TAG, "Deleting screenshot file " + file);
+ file.delete();
+ }
}
/**
* Finishes the service when it's not monitoring any more processes.
*/
private void stopSelfWhenDone() {
- synchronized (mProcesses) {
- if (mProcesses.size() > 0) {
- if (DEBUG) Log.v(TAG, "Staying alive, waiting for pids " + mProcesses);
- return;
- }
- Log.v(TAG, "No more pids to handle, shutting down");
- stopSelf();
+ if (mProcesses.size() > 0) {
+ if (DEBUG) Log.v(TAG, "Staying alive, waiting for pids " + mProcesses);
+ return;
}
+ Log.v(TAG, "No more pids to handle, shutting down");
+ stopSelf();
}
/**
@@ -503,24 +694,24 @@
*/
private void onBugreportFinished(int pid, Intent intent) {
mInfoDialog.onBugreportFinished(pid);
- final Context context = getApplicationContext();
- BugreportInfo info;
- synchronized (mProcesses) {
- info = mProcesses.get(pid);
- if (info == null) {
- // Happens when BUGREPORT_FINISHED was received without a BUGREPORT_STARTED
- Log.v(TAG, "Creating info for untracked pid " + pid);
- info = new BugreportInfo(context, pid);
- mProcesses.put(pid, info);
- }
- info.bugreportFile = getFileExtra(intent, EXTRA_BUGREPORT);
- info.screenshotFile = getFileExtra(intent, EXTRA_SCREENSHOT);
- info.finished = true;
+ BugreportInfo info = getInfo(pid);
+ if (info == null) {
+ // Happens when BUGREPORT_FINISHED was received without a BUGREPORT_STARTED first.
+ Log.v(TAG, "Creating info for untracked pid " + pid);
+ info = new BugreportInfo(mContext, pid);
+ mProcesses.put(pid, info);
}
+ info.renameScreenshots(mScreenshotsDir);
+ info.bugreportFile = getFileExtra(intent, EXTRA_BUGREPORT);
+ final File screenshot = getFileExtra(intent, EXTRA_SCREENSHOT);
+ if (screenshot != null) {
+ info.addScreenshot(screenshot);
+ }
+ info.finished = true;
- final Configuration conf = context.getResources().getConfiguration();
+ final Configuration conf = mContext.getResources().getConfiguration();
if ((conf.uiMode & Configuration.UI_MODE_TYPE_MASK) != Configuration.UI_MODE_TYPE_WATCH) {
- triggerLocalNotification(context, info);
+ triggerLocalNotification(mContext, info);
}
}
@@ -530,11 +721,11 @@
* (usually by triggering it on another connected device); we don't need to display the
* notification in this case.
*/
- private static void triggerLocalNotification(final Context context, final BugreportInfo info) {
+ private void triggerLocalNotification(final Context context, final BugreportInfo info) {
if (!info.bugreportFile.exists() || !info.bugreportFile.canRead()) {
Log.e(TAG, "Could not read bugreport file " + info.bugreportFile);
- Toast.makeText(context, context.getString(R.string.bugreport_unreadable_text),
- Toast.LENGTH_LONG).show();
+ Toast.makeText(context, R.string.bugreport_unreadable_text, Toast.LENGTH_LONG).show();
+ stopProgress(info.pid);
return;
}
@@ -561,7 +752,6 @@
// Files are kept on private storage, so turn into Uris that we can
// grant temporary permissions for.
final Uri bugreportUri = getUri(context, info.bugreportFile);
- final Uri screenshotUri = getUri(context, info.screenshotFile);
final Intent intent = new Intent(Intent.ACTION_SEND_MULTIPLE);
final String mimeType = "application/vnd.android.bugreport";
@@ -575,7 +765,7 @@
// EXTRA_TEXT should be an ArrayList, but some clients are expecting a single String.
// So, to avoid an exception on Intent.migrateExtraStreamToClipData(), we need to manually
// create the ClipData object with the attachments URIs.
- StringBuilder messageBody = new StringBuilder("Build info: ")
+ final StringBuilder messageBody = new StringBuilder("Build info: ")
.append(SystemProperties.get("ro.build.description"))
.append("\nSerial number: ")
.append(SystemProperties.get("ro.serialno"));
@@ -586,7 +776,8 @@
final ClipData clipData = new ClipData(null, new String[] { mimeType },
new ClipData.Item(null, null, null, bugreportUri));
final ArrayList<Uri> attachments = Lists.newArrayList(bugreportUri);
- if (screenshotUri != null) {
+ for (File screenshot : info.screenshotFiles) {
+ final Uri screenshotUri = getUri(context, screenshot);
clipData.addItem(new ClipData.Item(null, null, null, screenshotUri));
attachments.add(screenshotUri);
}
@@ -606,29 +797,25 @@
* intent, but issuing a warning dialog the first time.
*/
private void shareBugreport(int pid) {
- final Context context = getApplicationContext();
- final BugreportInfo info;
- synchronized (mProcesses) {
- info = mProcesses.get(pid);
- if (info == null) {
- // Should not happen, so log if it does...
- Log.e(TAG, "INTERNAL ERROR: no info for PID " + pid + ": " + mProcesses);
- return;
- }
+ final BugreportInfo info = getInfo(pid);
+ if (info == null) {
+ // Should not happen, so log if it does...
+ Log.e(TAG, "INTERNAL ERROR: no info for PID " + pid + ": " + mProcesses);
+ return;
}
- final Intent sendIntent = buildSendIntent(context, info);
+ final Intent sendIntent = buildSendIntent(mContext, info);
final Intent notifIntent;
// Send through warning dialog by default
- if (getWarningState(context, STATE_SHOW) == STATE_SHOW) {
- notifIntent = buildWarningIntent(context, sendIntent);
+ if (getWarningState(mContext, STATE_SHOW) == STATE_SHOW) {
+ notifIntent = buildWarningIntent(mContext, sendIntent);
} else {
notifIntent = sendIntent;
}
notifIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// Send the share intent...
- context.startActivity(notifIntent);
+ mContext.startActivity(notifIntent);
// ... and stop watching this process.
stopProgress(pid);
@@ -781,19 +968,50 @@
* Updates the user-provided details of a bugreport.
*/
private void updateBugreportInfo(int pid, String name, String title, String description) {
- synchronized (mProcesses) {
- final BugreportInfo info = mProcesses.get(pid);
- if (info == null) {
- Log.w(TAG, "No bugreport info for PID " + pid);
- return;
- }
- info.title = title;
- info.description = description;
- if (name != null && !info.name.equals(name)) {
- info.name = name;
- updateProgress(info);
- }
+ final BugreportInfo info = getInfo(pid);
+ if (info == null) {
+ return;
}
+ info.title = title;
+ info.description = description;
+ if (name != null && !info.name.equals(name)) {
+ info.name = name;
+ updateProgress(info);
+ }
+ }
+
+ private void collapseNotificationBar() {
+ sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
+ }
+
+ private static Looper newLooper(String name) {
+ final HandlerThread thread = new HandlerThread(name, THREAD_PRIORITY_BACKGROUND);
+ thread.start();
+ return thread.getLooper();
+ }
+
+ /**
+ * Takes a screenshot and save it to the given location.
+ */
+ private static boolean takeScreenshot(Context context, String screenshotFile) {
+ ((Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE))
+ .vibrate(150);
+ final ProcessBuilder screencap = new ProcessBuilder()
+ .command("/system/bin/screencap", "-p", screenshotFile);
+ Log.d(TAG, "Taking screenshot using " + screencap.command());
+ try {
+ final int exitValue = screencap.start().waitFor();
+ if (exitValue == 0) {
+ return true;
+ }
+ Log.e(TAG, "screencap (" + screencap.command() + ") failed: " + exitValue);
+ } catch (IOException e) {
+ Log.e(TAG, "screencap (" + screencap.command() + ") failed", e);
+ } catch (InterruptedException e) {
+ Log.w(TAG, "Thread interrupted while screencap still running");
+ Thread.currentThread().interrupt();
+ }
+ return false;
}
/**
@@ -843,7 +1061,7 @@
/**
* Sets its internal state and displays the dialog.
*/
- private synchronized void initialize(Context context, int pid, String name, String title,
+ private void initialize(Context context, int pid, String name, String title,
String description) {
// First initializes singleton.
if (mDialog == null) {
@@ -937,7 +1155,7 @@
* Sanitizes the user-provided value for the {@code name} field, automatically replacing
* invalid characters if necessary.
*/
- private synchronized void sanitizeName() {
+ private void sanitizeName() {
String name = mInfoName.getText().toString();
if (name.equals(mTempName)) {
if (DEBUG) Log.v(TAG, "name didn't change, no need to sanitize: " + name);
@@ -973,7 +1191,7 @@
* <p>Once the bugreport is finished dumpstate has already generated the final files, so
* changing the name would have no effect.
*/
- private synchronized void onBugreportFinished(int pid) {
+ private void onBugreportFinished(int pid) {
if (mInfoName != null) {
mInfoName.setEnabled(false);
mInfoName.setText(mSavedName);
@@ -1034,9 +1252,9 @@
File bugreportFile;
/**
- * Path of the screenshot file.
+ * Path of the screenshot files.
*/
- File screenshotFile;
+ List<File> screenshotFiles = new ArrayList<>(1);
/**
* Whether dumpstate sent an intent informing it has finished.
@@ -1044,6 +1262,11 @@
boolean finished;
/**
+ * Internal counter used to name screenshot files.
+ */
+ int screenshotCounter;
+
+ /**
* Constructor for tracked bugreports - typically called upon receiving BUGREPORT_STARTED.
*/
BugreportInfo(Context context, int pid, String name, int max) {
@@ -1062,6 +1285,45 @@
this.finished = true;
}
+ /**
+ * Gets the name for next screenshot file.
+ */
+ String getPathNextScreenshot() {
+ screenshotCounter ++;
+ return "screenshot-" + pid + "-" + screenshotCounter + ".png";
+ }
+
+ /**
+ * Saves the location of a taken screenshot so it can be sent out at the end.
+ */
+ void addScreenshot(File screenshot) {
+ screenshotFiles.add(screenshot);
+ }
+
+ /**
+ * Rename all screenshots files so that they contain the user-generated name instead of pid.
+ */
+ void renameScreenshots(File screenshotDir) {
+ if (TextUtils.isEmpty(name)) {
+ return;
+ }
+ final List<File> renamedFiles = new ArrayList<>(screenshotFiles.size());
+ for (File oldFile : screenshotFiles) {
+ final String oldName = oldFile.getName();
+ final String newName = oldName.replace(Integer.toString(pid), name);
+ final File newFile;
+ if (!newName.equals(oldName)) {
+ final File renamedFile = new File(screenshotDir, newName);
+ newFile = oldFile.renameTo(renamedFile) ? renamedFile : oldFile;
+ } else {
+ Log.w(TAG, "Name didn't change: " + oldName); // Shouldn't happen.
+ newFile = oldFile;
+ }
+ renamedFiles.add(newFile);
+ }
+ screenshotFiles = renamedFiles;
+ }
+
String getFormattedLastUpdate() {
return DateUtils.formatDateTime(context, lastUpdate,
DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_TIME);
@@ -1072,7 +1334,7 @@
final float percent = ((float) progress * 100 / max);
return "pid: " + pid + ", name: " + name + ", finished: " + finished
+ "\n\ttitle: " + title + "\n\tdescription: " + description
- + "\n\tfile: " + bugreportFile + "\n\tscreenshot: " + screenshotFile
+ + "\n\tfile: " + bugreportFile + "\n\tscreenshots: " + screenshotFiles
+ "\n\tprogress: " + progress + "/" + max + "(" + percent + ")"
+ "\n\tlast_update: " + getFormattedLastUpdate();
}
diff --git a/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java b/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
index 7f609fa..6bee767 100644
--- a/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
+++ b/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
@@ -25,6 +25,7 @@
import static com.android.shell.BugreportProgressService.EXTRA_SCREENSHOT;
import static com.android.shell.BugreportProgressService.INTENT_BUGREPORT_FINISHED;
import static com.android.shell.BugreportProgressService.INTENT_BUGREPORT_STARTED;
+import static com.android.shell.BugreportProgressService.SCREENSHOT_DELAY_SECONDS;
import java.io.BufferedOutputStream;
import java.io.BufferedWriter;
@@ -35,7 +36,10 @@
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
+import java.util.ArrayList;
import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
@@ -56,6 +60,7 @@
import android.support.test.uiautomator.UiObject;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.LargeTest;
+import android.text.format.DateUtils;
import android.util.Log;
import com.android.shell.ActionSendMultipleConsumerActivity.CustomActionSendMultipleListener;
@@ -151,7 +156,25 @@
Bundle extras =
sendBugreportFinishedAndGetSharedIntent(PID, mPlainTextPath, mScreenshotPath);
- assertActionSendMultiple(extras, BUGREPORT_CONTENT, SCREENSHOT_CONTENT);
+ assertActionSendMultiple(extras, BUGREPORT_FILE, BUGREPORT_CONTENT, PID, NAME, ZIP_FILE,
+ null, 1);
+
+ assertServiceNotRunning();
+ }
+
+ public void testProgress_takeExtraScreenshot() throws Exception {
+ resetProperties();
+ sendBugreportStarted(1000);
+
+ waitForScreenshotButtonEnabled(true);
+ takeScreenshot();
+ assertScreenshotButtonEnabled(false);
+ waitForScreenshotButtonEnabled(true);
+
+ Bundle extras =
+ sendBugreportFinishedAndGetSharedIntent(PID, mPlainTextPath, mScreenshotPath);
+ assertActionSendMultiple(extras, BUGREPORT_FILE, BUGREPORT_CONTENT, PID, NAME, ZIP_FILE,
+ null, 2);
assertServiceNotRunning();
}
@@ -194,7 +217,8 @@
Bundle extras = sendBugreportFinishedAndGetSharedIntent(PID, mPlainTextPath,
mScreenshotPath);
- assertActionSendMultiple(extras, TITLE, mDescription, BUGREPORT_CONTENT, SCREENSHOT_CONTENT);
+ assertActionSendMultiple(extras, BUGREPORT_FILE, BUGREPORT_CONTENT, PID, NEW_NAME, TITLE,
+ mDescription, 1);
assertServiceNotRunning();
}
@@ -225,8 +249,8 @@
// Finally, share bugreport.
Bundle extras = acceptBugreportAndGetSharedIntent();
- assertActionSendMultiple(extras, TITLE, mDescription, BUGREPORT_CONTENT,
- SCREENSHOT_CONTENT);
+ assertActionSendMultiple(extras, BUGREPORT_FILE, BUGREPORT_CONTENT, PID, NAME, TITLE,
+ mDescription, 1);
assertServiceNotRunning();
}
@@ -288,7 +312,7 @@
}
private void assertProgressNotification(String name, String percent) {
- // TODO: it current looks for 3 distinct objects, without taking advantage of their
+ // TODO: it currently looks for 3 distinct objects, without taking advantage of their
// relationship.
openProgressNotification();
Log.v(TAG, "Looking for progress notification details: '" + name + "-" + percent + "'");
@@ -311,7 +335,7 @@
/**
* Sends a "bugreport started" intent with the default values.
*/
- private void sendBugreportStarted(int max) {
+ private void sendBugreportStarted(int max) throws Exception {
Intent intent = new Intent(INTENT_BUGREPORT_STARTED);
intent.putExtra(EXTRA_PID, PID);
intent.putExtra(EXTRA_NAME, NAME);
@@ -377,15 +401,29 @@
}
/**
- * Asserts the proper ACTION_SEND_MULTIPLE intent was sent.
+ * Asserts the proper {@link Intent#ACTION_SEND_MULTIPLE} intent was sent.
*/
private void assertActionSendMultiple(Bundle extras, String bugreportContent,
String screenshotContent) throws IOException {
- assertActionSendMultiple(extras, ZIP_FILE, null, bugreportContent, screenshotContent);
+ assertActionSendMultiple(extras, bugreportContent, screenshotContent, PID, null, ZIP_FILE,
+ null, 0);
}
- private void assertActionSendMultiple(Bundle extras, String subject, String description,
- String bugreportContent, String screenshotContent) throws IOException {
+ /**
+ * Asserts the proper {@link Intent#ACTION_SEND_MULTIPLE} intent was sent.
+ *
+ * @param extras extras received in the intent
+ * @param bugreportContent expected content in the bugreport file
+ * @param screenshotContent expected content in the screenshot file (sent by dumpstate), if any
+ * @param pid emulated dumpstate pid
+ * @param name bugreport name as provided by the user
+ * @param title bugreport name as provided by the user (or received by dumpstate)
+ * @param description bugreport description as provided by the user
+ * @param numberScreenshots expected number of screenshots taken by Shell.
+ */
+ private void assertActionSendMultiple(Bundle extras, String bugreportContent,
+ String screenshotContent, int pid, String name, String title, String description,
+ int numberScreenshots) throws IOException {
String body = extras.getString(Intent.EXTRA_TEXT);
assertContainsRegex("missing build info",
SystemProperties.get("ro.build.description"), body);
@@ -395,31 +433,61 @@
assertContainsRegex("missing description", description, body);
}
- assertEquals("wrong subject", subject, extras.getString(Intent.EXTRA_SUBJECT));
+ assertEquals("wrong subject", title, extras.getString(Intent.EXTRA_SUBJECT));
List<Uri> attachments = extras.getParcelableArrayList(Intent.EXTRA_STREAM);
- int expectedSize = screenshotContent != null ? 2 : 1;
+ int expectedNumberScreenshots = numberScreenshots;
+ if (screenshotContent != null) {
+ expectedNumberScreenshots ++; // Add screenshot received by dumpstate
+ }
+ int expectedSize = expectedNumberScreenshots + 1; // All screenshots plus the bugreport file
assertEquals("wrong number of attachments", expectedSize, attachments.size());
// Need to interact through all attachments, since order is not guaranteed.
- Uri zipUri = null, screenshotUri = null;
+ Uri zipUri = null;
+ List<Uri> screenshotUris = new ArrayList<>(expectedNumberScreenshots);
for (Uri attachment : attachments) {
if (attachment.getPath().endsWith(".zip")) {
zipUri = attachment;
}
if (attachment.getPath().endsWith(".png")) {
- screenshotUri = attachment;
+ screenshotUris.add(attachment);
}
}
assertNotNull("did not get .zip attachment", zipUri);
assertZipContent(zipUri, BUGREPORT_FILE, BUGREPORT_CONTENT);
- if (screenshotContent != null) {
- assertNotNull("did not get .png attachment", screenshotUri);
- assertContent(screenshotUri, SCREENSHOT_CONTENT);
- } else {
- assertNull("should not have .png attachment", screenshotUri);
+ // URI of the screenshot taken by dumpstate.
+ Uri externalScreenshotUri = null;
+ SortedSet<String> internalScreenshotNames = new TreeSet<>();
+ for (Uri screenshotUri : screenshotUris) {
+ String screenshotName = screenshotUri.getLastPathSegment();
+ if (screenshotName.endsWith(SCREENSHOT_FILE)) {
+ externalScreenshotUri = screenshotUri;
+ } else {
+ internalScreenshotNames.add(screenshotName);
+ }
}
+ // Check external screenshot
+ if (screenshotContent != null) {
+ assertNotNull("did not get .png attachment for external screenshot",
+ externalScreenshotUri);
+ assertContent(externalScreenshotUri, SCREENSHOT_CONTENT);
+ } else {
+ assertNull("should not have .png attachment for external screenshot",
+ externalScreenshotUri);
+ }
+ // Check internal screenshots.
+ SortedSet<String> expectedNames = new TreeSet<>();
+ for (int i = 1 ; i <= numberScreenshots; i++) {
+ String prefix = name != null ? name : Integer.toString(pid);
+ String expectedName = "screenshot-" + prefix + "-" + i + ".png";
+ expectedNames.add(expectedName);
+ }
+ // Ideally we should use MoreAsserts, but the error message in case of failure is not
+ // really useful.
+ assertEquals("wrong names for internal screenshots",
+ expectedNames, internalScreenshotNames);
}
private void assertContent(Uri uri, String expectedContent) throws IOException {
@@ -506,6 +574,47 @@
}
/**
+ * Gets the notification button used to take a screenshot.
+ */
+ private UiObject getScreenshotButton() {
+ openProgressNotification();
+ return mUiBot.getVisibleObject(
+ mContext.getString(R.string.bugreport_screenshot_action).toUpperCase());
+ }
+
+ /**
+ * Takes a screenshot using the system notification.
+ */
+ private void takeScreenshot() throws Exception {
+ UiObject screenshotButton = getScreenshotButton();
+ mUiBot.click(screenshotButton, "screenshot_button");
+ }
+
+ private UiObject waitForScreenshotButtonEnabled(boolean expectedEnabled) throws Exception {
+ UiObject screenshotButton = getScreenshotButton();
+ int maxAttempts = SCREENSHOT_DELAY_SECONDS + 2;
+ int i = 0;
+ do {
+ boolean enabled = screenshotButton.isEnabled();
+ if (enabled == expectedEnabled) {
+ return screenshotButton;
+ }
+ i++;
+ Log.v(TAG, "Sleeping for 1 second while waiting for screenshot.enable to be "
+ + expectedEnabled + " (attempt " + i + ")");
+ Thread.sleep(DateUtils.SECOND_IN_MILLIS);
+ } while (i <= maxAttempts);
+ fail("screenshot.enable didn't change to " + expectedEnabled + " in " + maxAttempts + "s");
+ return screenshotButton;
+ }
+
+ private void assertScreenshotButtonEnabled(boolean expectedEnabled) throws Exception {
+ UiObject screenshotButton = getScreenshotButton();
+ assertEquals("wrong state for screenshot button ", expectedEnabled,
+ screenshotButton.isEnabled());
+ }
+
+ /**
* Helper class containing the UiObjects present in the bugreport info dialog.
*/
private final class DetailsUi {