summaryrefslogtreecommitdiffstats
path: root/opengl/libs
diff options
context:
space:
mode:
Diffstat (limited to 'opengl/libs')
-rw-r--r--opengl/libs/EGL/Loader.cpp14
-rw-r--r--opengl/libs/EGL/egl.cpp2
-rw-r--r--opengl/libs/EGL/egl_display.cpp2
-rw-r--r--opengl/libs/EGL/trace.cpp32
-rw-r--r--opengl/libs/GLES2/gl2.cpp2
-rw-r--r--opengl/libs/GLES2_dbg/src/caller.cpp2
-rw-r--r--opengl/libs/GLES2_dbg/src/dbgcontext.cpp4
-rw-r--r--opengl/libs/GLES2_dbg/src/header.h6
-rw-r--r--opengl/libs/GLES2_dbg/src/server.cpp34
-rw-r--r--opengl/libs/GLES2_dbg/src/vertex.cpp2
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_transport.cpp6
11 files changed, 53 insertions, 53 deletions
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index 8a8898be5..561862b5e 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -131,7 +131,7 @@ Loader::Loader()
/* Special case for GLES emulation */
if (checkGlesEmulationStatus() == 0) {
- LOGD("Emulator without GPU support detected. Fallback to software renderer.");
+ ALOGD("Emulator without GPU support detected. Fallback to software renderer.");
gConfig.add( entry_t(0, 0, "android") );
return;
}
@@ -140,14 +140,14 @@ Loader::Loader()
FILE* cfg = fopen("/system/lib/egl/egl.cfg", "r");
if (cfg == NULL) {
// default config
- LOGD("egl.cfg not found, using default config");
+ ALOGD("egl.cfg not found, using default config");
gConfig.add( entry_t(0, 0, "android") );
} else {
while (fgets(line, 256, cfg)) {
int dpy;
int impl;
if (sscanf(line, "%u %u %s", &dpy, &impl, tag) == 3) {
- //LOGD(">>> %u %u %s", dpy, impl, tag);
+ //ALOGD(">>> %u %u %s", dpy, impl, tag);
gConfig.add( entry_t(dpy, impl, tag) );
}
}
@@ -238,7 +238,7 @@ void Loader::init_api(void* dso,
strncpy(scrap, name, index);
scrap[index] = 0;
f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap);
- //LOGD_IF(f, "found <%s> instead", scrap);
+ //ALOGD_IF(f, "found <%s> instead", scrap);
}
}
if (f == NULL) {
@@ -247,11 +247,11 @@ void Loader::init_api(void* dso,
if (index>0 && strcmp(name+index, "OES")) {
snprintf(scrap, SIZE, "%sOES", name);
f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap);
- //LOGD_IF(f, "found <%s> instead", scrap);
+ //ALOGD_IF(f, "found <%s> instead", scrap);
}
}
if (f == NULL) {
- //LOGD("%s", name);
+ //ALOGD("%s", name);
f = (__eglMustCastToProperFunctionPointerType)gl_unimplemented;
}
*curr++ = f;
@@ -282,7 +282,7 @@ void *Loader::load_driver(const char* kind, const char *tag,
return 0;
}
- LOGD("loaded %s", driver_absolute_path);
+ ALOGD("loaded %s", driver_absolute_path);
if (mask & EGL) {
getProcAddress = (getProcAddressType)dlsym(dso, "eglGetProcAddress");
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 14745b36d..0102cafe3 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -259,7 +259,7 @@ static EGLBoolean egl_init_drivers_locked() {
cnx->hooks[GLESv2_INDEX] = &gHooks[GLESv2_INDEX][IMPL_HARDWARE];
cnx->dso = loader.open(EGL_DEFAULT_DISPLAY, 1, cnx);
} else {
- LOGD("3D hardware acceleration is disabled");
+ ALOGD("3D hardware acceleration is disabled");
}
}
diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp
index 31119f960..ad5bdfc75 100644
--- a/opengl/libs/EGL/egl_display.cpp
+++ b/opengl/libs/EGL/egl_display.cpp
@@ -184,7 +184,7 @@ EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) {
EGLDisplay idpy = disp[i].dpy;
if (cnx->egl.eglInitialize(idpy, &cnx->major, &cnx->minor)) {
- //LOGD("initialized %d dpy=%p, ver=%d.%d, cnx=%p",
+ //ALOGD("initialized %d dpy=%p, ver=%d.%d, cnx=%p",
// i, idpy, cnx->major, cnx->minor, cnx);
// display is now initialized
diff --git a/opengl/libs/EGL/trace.cpp b/opengl/libs/EGL/trace.cpp
index bd6c348dc..52907c1f1 100644
--- a/opengl/libs/EGL/trace.cpp
+++ b/opengl/libs/EGL/trace.cpp
@@ -97,30 +97,30 @@ public:
static void TraceGLShaderSource(GLuint shader, GLsizei count,
const GLchar** string, const GLint* length) {
- LOGD("const char* shaderSrc[] = {");
+ ALOGD("const char* shaderSrc[] = {");
for (GLsizei i = 0; i < count; i++) {
const char* comma = i < count-1 ? "," : "";
const GLchar* s = string[i];
if (length) {
GLint len = length[i];
- LOGD(" \"%*s\"%s", len, s, comma);
+ ALOGD(" \"%*s\"%s", len, s, comma);
} else {
- LOGD(" \"%s\"%s", s, comma);
+ ALOGD(" \"%s\"%s", s, comma);
}
}
- LOGD("};");
+ ALOGD("};");
if (length) {
- LOGD("const GLint* shaderLength[] = {");
+ ALOGD("const GLint* shaderLength[] = {");
for (GLsizei i = 0; i < count; i++) {
const char* comma = i < count-1 ? "," : "";
GLint len = length[i];
- LOGD(" \"%d\"%s", len, comma);
+ ALOGD(" \"%d\"%s", len, comma);
}
- LOGD("};");
- LOGD("glShaderSource(%u, %u, shaderSrc, shaderLength);",
+ ALOGD("};");
+ ALOGD("glShaderSource(%u, %u, shaderSrc, shaderLength);",
shader, count);
} else {
- LOGD("glShaderSource(%u, %u, shaderSrc, (const GLint*) 0);",
+ ALOGD("glShaderSource(%u, %u, shaderSrc, (const GLint*) 0);",
shader, count);
}
}
@@ -131,7 +131,7 @@ static void TraceValue(int elementCount, char type,
GLsizei count = chunkCount * chunkSize;
bool isFloat = type == 'f';
const char* typeString = isFloat ? "GLfloat" : "GLint";
- LOGD("const %s value[] = {", typeString);
+ ALOGD("const %s value[] = {", typeString);
for (GLsizei i = 0; i < count; i++) {
StringBuilder builder;
builder.append(" ");
@@ -152,25 +152,25 @@ static void TraceValue(int elementCount, char type,
value = (void*) (((GLint*) value) + 1);
}
}
- LOGD("%s", builder.getString());
+ ALOGD("%s", builder.getString());
if (chunkSize > 1 && i < count-1
&& (i % chunkSize) == (chunkSize-1)) {
- LOGD("%s", ""); // Print a blank line.
+ ALOGD("%s", ""); // Print a blank line.
}
}
- LOGD("};");
+ ALOGD("};");
}
static void TraceUniformv(int elementCount, char type,
GLuint location, GLsizei count, const void* value) {
TraceValue(elementCount, type, count, 1, value);
- LOGD("glUniform%d%c(%u, %u, value);", elementCount, type, location, count);
+ ALOGD("glUniform%d%c(%u, %u, value);", elementCount, type, location, count);
}
static void TraceUniformMatrix(int matrixSideLength,
GLuint location, GLsizei count, GLboolean transpose, const void* value) {
TraceValue(matrixSideLength, 'f', count, matrixSideLength, value);
- LOGD("glUniformMatrix%dfv(%u, %u, %s, value);", matrixSideLength, location, count,
+ ALOGD("glUniformMatrix%dfv(%u, %u, %s, value);", matrixSideLength, location, count,
GLbooleanToString(transpose));
}
@@ -310,7 +310,7 @@ static void TraceGL(const char* name, int numArgs, ...) {
}
}
builder.append(");");
- LOGD("%s", builder.getString());
+ ALOGD("%s", builder.getString());
va_end(argp);
}
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp
index fee460937..df22b968a 100644
--- a/opengl/libs/GLES2/gl2.cpp
+++ b/opengl/libs/GLES2/gl2.cpp
@@ -83,7 +83,7 @@ using namespace android;
_c->_api(__VA_ARGS__); \
GLenum status = GL_NO_ERROR; \
while ((status = glGetError()) != GL_NO_ERROR) { \
- LOGD("[" #_api "] 0x%x", status); \
+ ALOGD("[" #_api "] 0x%x", status); \
}
#else
diff --git a/opengl/libs/GLES2_dbg/src/caller.cpp b/opengl/libs/GLES2_dbg/src/caller.cpp
index 6b72751bd..70d23d67c 100644
--- a/opengl/libs/GLES2_dbg/src/caller.cpp
+++ b/opengl/libs/GLES2_dbg/src/caller.cpp
@@ -103,7 +103,7 @@ static const int * GenerateCall_glVertexAttribPointer(DbgContext * const dbg,
const int * GenerateCall(DbgContext * const dbg, const glesv2debugger::Message & cmd,
glesv2debugger::Message & msg, const int * const prevRet)
{
- LOGD("GenerateCall function=%u", cmd.function());
+ ALOGD("GenerateCall function=%u", cmd.function());
const int * ret = prevRet; // only some functions have return value
nsecs_t c0 = systemTime(timeMode);
switch (cmd.function()) { case glesv2debugger::Message_Function_glActiveTexture:
diff --git a/opengl/libs/GLES2_dbg/src/dbgcontext.cpp b/opengl/libs/GLES2_dbg/src/dbgcontext.cpp
index 41061e1bc..e525d023e 100644
--- a/opengl/libs/GLES2_dbg/src/dbgcontext.cpp
+++ b/opengl/libs/GLES2_dbg/src/dbgcontext.cpp
@@ -242,7 +242,7 @@ unsigned int DbgContext::GetBufferSize()
void DbgContext::glUseProgram(GLuint program)
{
while (GLenum error = hooks->gl.glGetError())
- LOGD("DbgContext::glUseProgram(%u): before glGetError() = 0x%.4X",
+ ALOGD("DbgContext::glUseProgram(%u): before glGetError() = 0x%.4X",
program, error);
this->program = program;
maxAttrib = 0;
@@ -286,7 +286,7 @@ void DbgContext::glUseProgram(GLuint program)
}
delete name;
while (GLenum error = hooks->gl.glGetError())
- LOGD("DbgContext::glUseProgram(%u): after glGetError() = 0x%.4X",
+ ALOGD("DbgContext::glUseProgram(%u): after glGetError() = 0x%.4X",
program, error);
}
diff --git a/opengl/libs/GLES2_dbg/src/header.h b/opengl/libs/GLES2_dbg/src/header.h
index 49f3847f5..0ab48902b 100644
--- a/opengl/libs/GLES2_dbg/src/header.h
+++ b/opengl/libs/GLES2_dbg/src/header.h
@@ -48,9 +48,9 @@ using namespace com::android;
#endif
#undef assert
-#define assert(expr) if (!(expr)) { LOGD("\n*\n*\n* assert: %s at %s \n*\n*", #expr, __location__); int * x = 0; *x = 5; }
-//#undef LOGD
-//#define LOGD(...)
+#define assert(expr) if (!(expr)) { ALOGD("\n*\n*\n* assert: %s at %s \n*\n*", #expr, __location__); int * x = 0; *x = 5; }
+//#undef ALOGD
+//#define ALOGD(...)
namespace android
{
diff --git a/opengl/libs/GLES2_dbg/src/server.cpp b/opengl/libs/GLES2_dbg/src/server.cpp
index 0c711bf20..3e9369707 100644
--- a/opengl/libs/GLES2_dbg/src/server.cpp
+++ b/opengl/libs/GLES2_dbg/src/server.cpp
@@ -34,7 +34,7 @@ int timeMode = SYSTEM_TIME_THREAD;
static void Die(const char * msg)
{
- LOGD("\n*\n*\n* GLESv2_dbg: Die: %s \n*\n*", msg);
+ ALOGD("\n*\n*\n* GLESv2_dbg: Die: %s \n*\n*", msg);
StopDebugServer();
exit(1);
}
@@ -44,11 +44,11 @@ void StartDebugServer(const unsigned short port, const bool forceUseFile,
{
MAX_FILE_SIZE = maxFileSize;
- LOGD("GLESv2_dbg: StartDebugServer");
+ ALOGD("GLESv2_dbg: StartDebugServer");
if (serverSock >= 0 || file)
return;
- LOGD("GLESv2_dbg: StartDebugServer create socket");
+ ALOGD("GLESv2_dbg: StartDebugServer create socket");
struct sockaddr_in server = {}, client = {};
/* Create the TCP socket */
@@ -75,7 +75,7 @@ void StartDebugServer(const unsigned short port, const bool forceUseFile,
Die("Failed to listen on server socket");
}
- LOGD("server started on %d \n", server.sin_port);
+ ALOGD("server started on %d \n", server.sin_port);
/* Wait for client connection */
@@ -85,13 +85,13 @@ void StartDebugServer(const unsigned short port, const bool forceUseFile,
Die("Failed to accept client connection");
}
- LOGD("Client connected: %s\n", inet_ntoa(client.sin_addr));
+ ALOGD("Client connected: %s\n", inet_ntoa(client.sin_addr));
// fcntl(clientSock, F_SETFL, O_NONBLOCK);
}
void StopDebugServer()
{
- LOGD("GLESv2_dbg: StopDebugServer");
+ ALOGD("GLESv2_dbg: StopDebugServer");
if (clientSock > 0) {
close(clientSock);
clientSock = -1;
@@ -115,7 +115,7 @@ void Receive(glesv2debugger::Message & cmd)
if (received < 0)
Die("Failed to receive response length");
else if (4 != received) {
- LOGD("received %dB: %.8X", received, len);
+ ALOGD("received %dB: %.8X", received, len);
Die("Received length mismatch, expected 4");
}
static void * buffer = NULL;
@@ -150,7 +150,7 @@ bool TryReceive(glesv2debugger::Message & cmd)
bool received = false;
if (FD_ISSET(clientSock, &readSet)) {
- LOGD("TryReceive: avaiable for read");
+ ALOGD("TryReceive: avaiable for read");
Receive(cmd);
return true;
}
@@ -190,14 +190,14 @@ float Send(const glesv2debugger::Message & msg, glesv2debugger::Message & cmd)
int sent = -1;
sent = send(clientSock, &len, sizeof(len), 0);
if (sent != sizeof(len)) {
- LOGD("actual sent=%d expected=%d clientSock=%d", sent, sizeof(len), clientSock);
+ ALOGD("actual sent=%d expected=%d clientSock=%d", sent, sizeof(len), clientSock);
Die("Failed to send message length");
}
nsecs_t c0 = systemTime(timeMode);
sent = send(clientSock, str.data(), str.length(), 0);
float t = (float)ns2ms(systemTime(timeMode) - c0);
if (sent != str.length()) {
- LOGD("actual sent=%d expected=%d clientSock=%d", sent, str.length(), clientSock);
+ ALOGD("actual sent=%d expected=%d clientSock=%d", sent, str.length(), clientSock);
Die("Failed to send message");
}
// TODO: factor Receive & TryReceive out and into MessageLoop, or add control argument.
@@ -210,9 +210,9 @@ float Send(const glesv2debugger::Message & msg, glesv2debugger::Message & cmd)
if (!msg.expect_response()) {
if (TryReceive(cmd)) {
if (glesv2debugger::Message_Function_SETPROP == cmd.function())
- LOGD("Send: TryReceived SETPROP");
+ ALOGD("Send: TryReceived SETPROP");
else
- LOGD("Send: TryReceived %u", cmd.function());
+ ALOGD("Send: TryReceived %u", cmd.function());
}
} else
Receive(cmd);
@@ -223,19 +223,19 @@ void SetProp(DbgContext * const dbg, const glesv2debugger::Message & cmd)
{
switch (cmd.prop()) {
case glesv2debugger::Message_Prop_CaptureDraw:
- LOGD("SetProp Message_Prop_CaptureDraw %d", cmd.arg0());
+ ALOGD("SetProp Message_Prop_CaptureDraw %d", cmd.arg0());
dbg->captureDraw = cmd.arg0();
break;
case glesv2debugger::Message_Prop_TimeMode:
- LOGD("SetProp Message_Prop_TimeMode %d", cmd.arg0());
+ ALOGD("SetProp Message_Prop_TimeMode %d", cmd.arg0());
timeMode = cmd.arg0();
break;
case glesv2debugger::Message_Prop_ExpectResponse:
- LOGD("SetProp Message_Prop_ExpectResponse %d=%d", cmd.arg0(), cmd.arg1());
+ ALOGD("SetProp Message_Prop_ExpectResponse %d=%d", cmd.arg0(), cmd.arg1());
dbg->expectResponse.Bit((glesv2debugger::Message_Function)cmd.arg0(), cmd.arg1());
break;
case glesv2debugger::Message_Prop_CaptureSwap:
- LOGD("SetProp CaptureSwap %d", cmd.arg0());
+ ALOGD("SetProp CaptureSwap %d", cmd.arg0());
dbg->captureSwap = cmd.arg0();
break;
default:
@@ -269,7 +269,7 @@ int * MessageLoop(FunctionCall & functionCall, glesv2debugger::Message & msg,
case glesv2debugger::Message_Function_CONTINUE:
ret = functionCall(&dbg->hooks->gl, msg);
while (GLenum error = dbg->hooks->gl.glGetError())
- LOGD("Function=%u glGetError() = 0x%.4X", function, error);
+ ALOGD("Function=%u glGetError() = 0x%.4X", function, error);
if (!msg.has_time()) // some has output data copy, so time inside call
msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
msg.set_context_id(reinterpret_cast<int>(dbg));
diff --git a/opengl/libs/GLES2_dbg/src/vertex.cpp b/opengl/libs/GLES2_dbg/src/vertex.cpp
index 28a24206d..70c34333d 100644
--- a/opengl/libs/GLES2_dbg/src/vertex.cpp
+++ b/opengl/libs/GLES2_dbg/src/vertex.cpp
@@ -72,7 +72,7 @@ void Debug_glDrawArrays(GLenum mode, GLint first, GLsizei count)
if (dbg->captureDraw > 0) {
dbg->captureDraw--;
dbg->hooks->gl.glGetIntegerv(GL_VIEWPORT, viewport);
-// LOGD("glDrawArrays CAPTURE: x=%d y=%d width=%d height=%d format=0x%.4X type=0x%.4X",
+// ALOGD("glDrawArrays CAPTURE: x=%d y=%d width=%d height=%d format=0x%.4X type=0x%.4X",
// viewport[0], viewport[1], viewport[2], viewport[3], readFormat, readType);
pixels = dbg->GetReadPixelsBuffer(viewport[2] * viewport[3] *
dbg->readBytesPerPixel);
diff --git a/opengl/libs/GLES_trace/src/gltrace_transport.cpp b/opengl/libs/GLES_trace/src/gltrace_transport.cpp
index c52ca5fa3..0900a11dc 100644
--- a/opengl/libs/GLES_trace/src/gltrace_transport.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_transport.cpp
@@ -32,7 +32,7 @@ int gServerSocket, gClientSocket;
void startServer(int port) {
if (gServerSocket > 0) {
- LOGD("startServer: server socket already open!");
+ ALOGD("startServer: server socket already open!");
return;
}
@@ -62,7 +62,7 @@ void startServer(int port) {
exit(-1);
}
- LOGD("startServer: server started on %d", port);
+ ALOGD("startServer: server started on %d", port);
/* Wait for client connection */
if ((gClientSocket = accept(gServerSocket, (struct sockaddr *)&client, &sockaddr_len)) < 0) {
@@ -71,7 +71,7 @@ void startServer(int port) {
exit(-1);
}
- LOGD("startServer: client connected: %s", inet_ntoa(client.sin_addr));
+ ALOGD("startServer: client connected: %s", inet_ntoa(client.sin_addr));
}
void stopServer() {