summaryrefslogtreecommitdiffstats
path: root/opengl/libagl
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-03-12 13:12:44 -0700
committerMark Salyzyn <salyzyn@google.com>2014-03-12 13:12:44 -0700
commit92dc3fc52cf097bd105460cf377779bdcf146d62 (patch)
treeaa1c6a8230541a45e941eb4c459b19b8487e08d3 /opengl/libagl
parent06ed9491418ce84e4272bf4201545fa6cfe3932e (diff)
downloadframeworks_native-92dc3fc52cf097bd105460cf377779bdcf146d62.zip
frameworks_native-92dc3fc52cf097bd105460cf377779bdcf146d62.tar.gz
frameworks_native-92dc3fc52cf097bd105460cf377779bdcf146d62.tar.bz2
native frameworks: 64-bit compile issues
- Fix format (print/scanf) - Suppress unused argument warning messages (bonus) Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
Diffstat (limited to 'opengl/libagl')
-rw-r--r--opengl/libagl/BufferObjectManager.h4
-rw-r--r--opengl/libagl/array.cpp8
-rw-r--r--opengl/libagl/egl.cpp46
-rw-r--r--opengl/libagl/light.cpp4
-rw-r--r--opengl/libagl/primitives.cpp10
-rw-r--r--opengl/libagl/state.cpp6
-rw-r--r--opengl/libagl/texture.cpp8
-rw-r--r--opengl/libagl/vertex.cpp2
8 files changed, 46 insertions, 42 deletions
diff --git a/opengl/libagl/BufferObjectManager.h b/opengl/libagl/BufferObjectManager.h
index 9e9340a..6487faa 100644
--- a/opengl/libagl/BufferObjectManager.h
+++ b/opengl/libagl/BufferObjectManager.h
@@ -69,10 +69,10 @@ private:
KeyedVector<GLuint, gl::buffer_t*> mBuffers;
};
-void EGLBufferObjectManager::incStrong(const void* id) const {
+void EGLBufferObjectManager::incStrong(const void* /*id*/) const {
android_atomic_inc(&mCount);
}
-void EGLBufferObjectManager::decStrong(const void* id) const {
+void EGLBufferObjectManager::decStrong(const void* /*id*/) const {
if (android_atomic_dec(&mCount) == 1) {
delete this;
}
diff --git a/opengl/libagl/array.cpp b/opengl/libagl/array.cpp
index 7fbe9b5..54207fa 100644
--- a/opengl/libagl/array.cpp
+++ b/opengl/libagl/array.cpp
@@ -397,9 +397,9 @@ void vertex_cache_t::clear()
}
}
+#if VC_CACHE_STATISTICS
void vertex_cache_t::dump_stats(GLenum mode)
{
-#if VC_CACHE_STATISTICS
nsecs_t time = systemTime(SYSTEM_TIME_THREAD) - startTime;
uint32_t hits = total - misses;
uint32_t prim_count;
@@ -418,8 +418,12 @@ void vertex_cache_t::dump_stats(GLenum mode)
total, hits, misses, (hits*100)/total,
prim_count, int(ns2us(time)), int(prim_count*float(seconds(1))/time),
float(misses) / prim_count);
-#endif
}
+#else
+void vertex_cache_t::dump_stats(GLenum /*mode*/)
+{
+}
+#endif
// ----------------------------------------------------------------------------
#if 0
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index f925e7d..1feac8b 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -206,7 +206,7 @@ EGLint egl_surface_t::getSwapBehavior() const {
return EGL_BUFFER_PRESERVED;
}
EGLBoolean egl_surface_t::setSwapRectangle(
- EGLint l, EGLint t, EGLint w, EGLint h)
+ EGLint /*l*/, EGLint /*t*/, EGLint /*w*/, EGLint /*h*/)
{
return EGL_FALSE;
}
@@ -793,7 +793,7 @@ struct config_management_t {
static bool mask(GLint reqValue, GLint confValue) {
return (confValue & reqValue) == reqValue;
}
- static bool ignore(GLint reqValue, GLint confValue) {
+ static bool ignore(GLint /*reqValue*/, GLint /*confValue*/) {
return true;
}
};
@@ -1197,7 +1197,7 @@ static int makeCurrent(ogles_context_t* gl)
return 0;
}
-static EGLBoolean getConfigAttrib(EGLDisplay dpy, EGLConfig config,
+static EGLBoolean getConfigAttrib(EGLDisplay /*dpy*/, EGLConfig config,
EGLint attribute, EGLint *value)
{
size_t numConfigs = NELEM(gConfigs);
@@ -1227,7 +1227,7 @@ static EGLBoolean getConfigAttrib(EGLDisplay dpy, EGLConfig config,
}
static EGLSurface createWindowSurface(EGLDisplay dpy, EGLConfig config,
- NativeWindowType window, const EGLint *attrib_list)
+ NativeWindowType window, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
@@ -1276,7 +1276,7 @@ static EGLSurface createWindowSurface(EGLDisplay dpy, EGLConfig config,
}
static EGLSurface createPixmapSurface(EGLDisplay dpy, EGLConfig config,
- NativePixmapType pixmap, const EGLint *attrib_list)
+ NativePixmapType pixmap, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
@@ -1655,7 +1655,7 @@ EGLBoolean eglQuerySurface( EGLDisplay dpy, EGLSurface eglSurface,
}
EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config,
- EGLContext share_list, const EGLint *attrib_list)
+ EGLContext /*share_list*/, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
@@ -1853,7 +1853,7 @@ EGLBoolean eglWaitGL(void)
return EGL_TRUE;
}
-EGLBoolean eglWaitNative(EGLint engine)
+EGLBoolean eglWaitNative(EGLint /*engine*/)
{
return EGL_TRUE;
}
@@ -1887,8 +1887,8 @@ EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw)
return EGL_TRUE;
}
-EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface surface,
- NativePixmapType target)
+EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface /*surface*/,
+ NativePixmapType /*target*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1924,7 +1924,7 @@ const char* eglQueryString(EGLDisplay dpy, EGLint name)
// ----------------------------------------------------------------------------
EGLBoolean eglSurfaceAttrib(
- EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
+ EGLDisplay dpy, EGLSurface /*surface*/, EGLint /*attribute*/, EGLint /*value*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1933,7 +1933,7 @@ EGLBoolean eglSurfaceAttrib(
}
EGLBoolean eglBindTexImage(
- EGLDisplay dpy, EGLSurface surface, EGLint buffer)
+ EGLDisplay dpy, EGLSurface /*surface*/, EGLint /*buffer*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1942,7 +1942,7 @@ EGLBoolean eglBindTexImage(
}
EGLBoolean eglReleaseTexImage(
- EGLDisplay dpy, EGLSurface surface, EGLint buffer)
+ EGLDisplay dpy, EGLSurface /*surface*/, EGLint /*buffer*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1950,7 +1950,7 @@ EGLBoolean eglReleaseTexImage(
return setError(EGL_BAD_PARAMETER, EGL_FALSE);
}
-EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval)
+EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint /*interval*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1987,8 +1987,8 @@ EGLBoolean eglReleaseThread(void)
}
EGLSurface eglCreatePbufferFromClientBuffer(
- EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
- EGLConfig config, const EGLint *attrib_list)
+ EGLDisplay dpy, EGLenum /*buftype*/, EGLClientBuffer /*buffer*/,
+ EGLConfig /*config*/, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
@@ -2011,21 +2011,21 @@ void (*eglGetProcAddress (const char *procname))()
return NULL;
}
-EGLBoolean eglLockSurfaceKHR(EGLDisplay dpy, EGLSurface surface,
- const EGLint *attrib_list)
+EGLBoolean eglLockSurfaceKHR(EGLDisplay /*dpy*/, EGLSurface /*surface*/,
+ const EGLint* /*attrib_list*/)
{
EGLBoolean result = EGL_FALSE;
return result;
}
-EGLBoolean eglUnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface)
+EGLBoolean eglUnlockSurfaceKHR(EGLDisplay /*dpy*/, EGLSurface /*surface*/)
{
EGLBoolean result = EGL_FALSE;
return result;
}
EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
- EGLClientBuffer buffer, const EGLint *attrib_list)
+ EGLClientBuffer buffer, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE) {
return setError(EGL_BAD_DISPLAY, EGL_NO_IMAGE_KHR);
@@ -2106,7 +2106,7 @@ EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, EGLenum type,
return FENCE_SYNC_HANDLE;
}
-EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
+EGLBoolean eglDestroySyncKHR(EGLDisplay /*dpy*/, EGLSyncKHR sync)
{
if (sync != FENCE_SYNC_HANDLE) {
return setError(EGL_BAD_PARAMETER, EGL_FALSE);
@@ -2115,8 +2115,8 @@ EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
return EGL_TRUE;
}
-EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags,
- EGLTimeKHR timeout)
+EGLint eglClientWaitSyncKHR(EGLDisplay /*dpy*/, EGLSyncKHR sync, EGLint /*flags*/,
+ EGLTimeKHR /*timeout*/)
{
if (sync != FENCE_SYNC_HANDLE) {
return setError(EGL_BAD_PARAMETER, EGL_FALSE);
@@ -2125,7 +2125,7 @@ EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags,
return EGL_CONDITION_SATISFIED_KHR;
}
-EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync,
+EGLBoolean eglGetSyncAttribKHR(EGLDisplay /*dpy*/, EGLSyncKHR sync,
EGLint attribute, EGLint *value)
{
if (sync != FENCE_SYNC_HANDLE) {
diff --git a/opengl/libagl/light.cpp b/opengl/libagl/light.cpp
index fafec3f..479bf7e 100644
--- a/opengl/libagl/light.cpp
+++ b/opengl/libagl/light.cpp
@@ -105,7 +105,7 @@ void ogles_init_light(ogles_context_t* c)
c->lighting.shadeModel = GL_SMOOTH;
}
-void ogles_uninit_light(ogles_context_t* c)
+void ogles_uninit_light(ogles_context_t* /*c*/)
{
}
@@ -285,7 +285,7 @@ void ogles_invalidate_lighting_mvui(ogles_context_t* c)
invalidate_lighting(c);
}
-void lightVertexNop(ogles_context_t*, vertex_t* v)
+void lightVertexNop(ogles_context_t*, vertex_t* /*v*/)
{
// we should never end-up here
}
diff --git a/opengl/libagl/primitives.cpp b/opengl/libagl/primitives.cpp
index 769ec40..57a798d 100644
--- a/opengl/libagl/primitives.cpp
+++ b/opengl/libagl/primitives.cpp
@@ -94,7 +94,7 @@ static void lightTriangleDarkSmooth(ogles_context_t* c,
}
static void lightTriangleDarkFlat(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
+ vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* v2)
{
if (!(v2->flags & vertex_t::LIT)) {
v2->flags |= vertex_t::LIT;
@@ -118,7 +118,7 @@ static void lightTriangleSmooth(ogles_context_t* c,
}
static void lightTriangleFlat(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
+ vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* v2)
{
if (!(v2->flags & vertex_t::LIT))
c->lighting.lightVertex(c, v2);
@@ -567,8 +567,8 @@ void primitive_line(ogles_context_t* c, vertex_t* v0, vertex_t* v1)
#pragma mark Triangle
#endif
-void primitive_nop_triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2) {
+void primitive_nop_triangle(ogles_context_t* /*c*/,
+ vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* /*v2*/) {
}
void primitive_clip_triangle(ogles_context_t* c,
@@ -823,7 +823,7 @@ void lerp_texcoords_w(ogles_context_t* c,
static inline
-bool cull_triangle(ogles_context_t* c, vertex_t* v0, vertex_t* v1, vertex_t* v2)
+bool cull_triangle(ogles_context_t* c, vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* /*v2*/)
{
if (ggl_likely(c->cull.enable)) {
const GLenum winding = (c->lerp.area() > 0) ? GL_CW : GL_CCW;
diff --git a/opengl/libagl/state.cpp b/opengl/libagl/state.cpp
index 4bc653a..1d5def5 100644
--- a/opengl/libagl/state.cpp
+++ b/opengl/libagl/state.cpp
@@ -219,11 +219,11 @@ using namespace android;
#endif
// These ones are super-easy, we're not supporting those features!
-void glSampleCoverage(GLclampf value, GLboolean invert) {
+void glSampleCoverage(GLclampf /*value*/, GLboolean /*invert*/) {
}
-void glSampleCoveragex(GLclampx value, GLboolean invert) {
+void glSampleCoveragex(GLclampx /*value*/, GLboolean /*invert*/) {
}
-void glStencilFunc(GLenum func, GLint ref, GLuint mask) {
+void glStencilFunc(GLenum func, GLint /*ref*/, GLuint /*mask*/) {
ogles_context_t* c = ogles_context_t::get();
if (func < GL_NEVER || func > GL_ALWAYS) {
ogles_error(c, GL_INVALID_ENUM);
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index 08536df..9aa1c4f 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -1223,10 +1223,10 @@ void glTexImage2D(
// ----------------------------------------------------------------------------
void glCompressedTexSubImage2D(
- GLenum target, GLint level, GLint xoffset,
- GLint yoffset, GLsizei width, GLsizei height,
- GLenum format, GLsizei imageSize,
- const GLvoid *data)
+ GLenum /*target*/, GLint /*level*/, GLint /*xoffset*/,
+ GLint /*yoffset*/, GLsizei /*width*/, GLsizei /*height*/,
+ GLenum /*format*/, GLsizei /*imageSize*/,
+ const GLvoid* /*data*/)
{
ogles_context_t* c = ogles_context_t::get();
ogles_error(c, GL_INVALID_ENUM);
diff --git a/opengl/libagl/vertex.cpp b/opengl/libagl/vertex.cpp
index dad04d6..9aacdb3 100644
--- a/opengl/libagl/vertex.cpp
+++ b/opengl/libagl/vertex.cpp
@@ -41,7 +41,7 @@ void ogles_init_vertex(ogles_context_t* c)
c->currentNormal.z = 0x10000;
}
-void ogles_uninit_vertex(ogles_context_t* c)
+void ogles_uninit_vertex(ogles_context_t* /*c*/)
{
}