summaryrefslogtreecommitdiffstats
path: root/opengl/libs/GLES2_dbg
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-12-20 16:23:08 +0000
committerSteve Block <steveblock@google.com>2012-01-03 22:38:27 +0000
commit5baa3a62a97544669fba6d65a11c07f252e654dd (patch)
tree109755e1595b438873d34b981e31f84ea64bd2a5 /opengl/libs/GLES2_dbg
parent173ab4d61077c49f115b82eff34f97fda5a7273a (diff)
downloadframeworks_base-5baa3a62a97544669fba6d65a11c07f252e654dd.zip
frameworks_base-5baa3a62a97544669fba6d65a11c07f252e654dd.tar.gz
frameworks_base-5baa3a62a97544669fba6d65a11c07f252e654dd.tar.bz2
Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
Diffstat (limited to 'opengl/libs/GLES2_dbg')
-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
5 files changed, 24 insertions, 24 deletions
diff --git a/opengl/libs/GLES2_dbg/src/caller.cpp b/opengl/libs/GLES2_dbg/src/caller.cpp
index 6b72751..70d23d6 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 41061e1..e525d02 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 49f3847..0ab4890 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 0c711bf..3e93697 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 28a2420..70c3433 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);