diff options
Diffstat (limited to 'opengl')
26 files changed, 125 insertions, 125 deletions
diff --git a/opengl/libagl/TextureObjectManager.cpp b/opengl/libagl/TextureObjectManager.cpp index 022de09ddc7c..6a006aabfac1 100644 --- a/opengl/libagl/TextureObjectManager.cpp +++ b/opengl/libagl/TextureObjectManager.cpp @@ -195,7 +195,7 @@ status_t EGLTextureObject::reallocate(                  return NO_MEMORY;          } -        LOGW_IF(level-1 >= mNumExtraLod, +        ALOGW_IF(level-1 >= mNumExtraLod,                  "specifying mipmap level %d, but # of level is %d",                  level, mNumExtraLod+1); diff --git a/opengl/libagl/Tokenizer.cpp b/opengl/libagl/Tokenizer.cpp index 9b3ea1ac9279..eac8d6d7684d 100644 --- a/opengl/libagl/Tokenizer.cpp +++ b/opengl/libagl/Tokenizer.cpp @@ -163,9 +163,9 @@ void Tokenizer::dump() const  {      const run_t* ranges = mRanges.array();      const size_t c = mRanges.size(); -    LOGD("Tokenizer (%p, size = %u)\n", this, c); +    ALOGD("Tokenizer (%p, size = %u)\n", this, c);      for (size_t i=0 ; i<c ; i++) { -        LOGD("%u: (%u, %u)\n", i, ranges[i].first, ranges[i].length); +        ALOGD("%u: (%u, %u)\n", i, ranges[i].first, ranges[i].length);      }  } diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp index 6d4098c72dc9..eb55beefd9af 100644 --- a/opengl/libagl/egl.cpp +++ b/opengl/libagl/egl.cpp @@ -184,7 +184,7 @@ egl_surface_t::~egl_surface_t()      free(depth.data);  }  bool egl_surface_t::isValid() const { -    LOGE_IF(magic != MAGIC, "invalid EGLSurface (%p)", this); +    ALOGE_IF(magic != MAGIC, "invalid EGLSurface (%p)", this);      return magic == MAGIC;   } @@ -263,7 +263,7 @@ private:              return (left>=right || top>=bottom);          }          void dump(char const* what) { -            LOGD("%s { %5d, %5d, w=%5d, h=%5d }",  +            ALOGD("%s { %5d, %5d, w=%5d, h=%5d }",                      what, left, top, right-left, bottom-top);          } @@ -397,7 +397,7 @@ EGLBoolean egl_window_surface_v2_t::connect()      // pin the buffer down      if (lock(buffer, GRALLOC_USAGE_SW_READ_OFTEN |               GRALLOC_USAGE_SW_WRITE_OFTEN, &bits) != NO_ERROR) { -        LOGE("connect() failed to lock buffer %p (%ux%u)", +        ALOGE("connect() failed to lock buffer %p (%ux%u)",                  buffer, buffer->width, buffer->height);          return setError(EGL_BAD_ACCESS, EGL_FALSE);          // FIXME: we should make sure we're not accessing the buffer anymore @@ -552,7 +552,7 @@ EGLBoolean egl_window_surface_v2_t::swapBuffers()          // finally pin the buffer down          if (lock(buffer, GRALLOC_USAGE_SW_READ_OFTEN |                  GRALLOC_USAGE_SW_WRITE_OFTEN, &bits) != NO_ERROR) { -            LOGE("eglSwapBuffers() failed to lock buffer %p (%ux%u)", +            ALOGE("eglSwapBuffers() failed to lock buffer %p (%ux%u)",                      buffer, buffer->width, buffer->height);              return setError(EGL_BAD_ACCESS, EGL_FALSE);              // FIXME: we should make sure we're not accessing the buffer anymore @@ -721,7 +721,7 @@ egl_pbuffer_surface_t::egl_pbuffer_surface_t(EGLDisplay dpy,          case GGL_PIXEL_FORMAT_RGBA_8888:    size *= 4; break;          case GGL_PIXEL_FORMAT_RGBX_8888:    size *= 4; break;          default: -            LOGE("incompatible pixel format for pbuffer (format=%d)", f); +            ALOGE("incompatible pixel format for pbuffer (format=%d)", f);              pbuffer.data = 0;              break;      } diff --git a/opengl/libagl/matrix.cpp b/opengl/libagl/matrix.cpp index 9520f044adca..cdeccb3f78a1 100644 --- a/opengl/libagl/matrix.cpp +++ b/opengl/libagl/matrix.cpp @@ -217,9 +217,9 @@ void mvui_transform_t::picker()  void transform_t::dump(const char* what)  {      GLfixed const * const m = matrix.m; -    LOGD("%s:", what); +    ALOGD("%s:", what);      for (int i=0 ; i<4 ; i++) -        LOGD("[%08x %08x %08x %08x] [%f %f %f %f]\n", +        ALOGD("[%08x %08x %08x %08x] [%f %f %f %f]\n",              m[I(0,i)], m[I(1,i)], m[I(2,i)], m[I(3,i)],              fixedToFloat(m[I(0,i)]),              fixedToFloat(m[I(1,i)]),  @@ -273,11 +273,11 @@ void matrixf_t::multiply(matrixf_t& r, const matrixf_t& lhs, const matrixf_t& rh  }  void matrixf_t::dump(const char* what) { -    LOGD("%s", what); -    LOGD("[ %9f %9f %9f %9f ]", m[I(0,0)], m[I(1,0)], m[I(2,0)], m[I(3,0)]); -    LOGD("[ %9f %9f %9f %9f ]", m[I(0,1)], m[I(1,1)], m[I(2,1)], m[I(3,1)]); -    LOGD("[ %9f %9f %9f %9f ]", m[I(0,2)], m[I(1,2)], m[I(2,2)], m[I(3,2)]); -    LOGD("[ %9f %9f %9f %9f ]", m[I(0,3)], m[I(1,3)], m[I(2,3)], m[I(3,3)]); +    ALOGD("%s", what); +    ALOGD("[ %9f %9f %9f %9f ]", m[I(0,0)], m[I(1,0)], m[I(2,0)], m[I(3,0)]); +    ALOGD("[ %9f %9f %9f %9f ]", m[I(0,1)], m[I(1,1)], m[I(2,1)], m[I(3,1)]); +    ALOGD("[ %9f %9f %9f %9f ]", m[I(0,2)], m[I(1,2)], m[I(2,2)], m[I(3,2)]); +    ALOGD("[ %9f %9f %9f %9f ]", m[I(0,3)], m[I(1,3)], m[I(2,3)], m[I(3,3)]);  }  void matrixf_t::loadIdentity() { diff --git a/opengl/libagl/mipmap.cpp b/opengl/libagl/mipmap.cpp index ccd77b7dc845..e142a58d00b4 100644 --- a/opengl/libagl/mipmap.cpp +++ b/opengl/libagl/mipmap.cpp @@ -174,7 +174,7 @@ status_t buildAPyramid(ogles_context_t* c, EGLTextureObject* tex)                  }              }          } else { -            LOGE("Unsupported format (%d)", base->format); +            ALOGE("Unsupported format (%d)", base->format);              return BAD_TYPE;          } diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp index 325193c7f44b..160abc2cd975 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; @@ -278,16 +278,16 @@ void *Loader::load_driver(const char* kind, const char *tag,      void* dso = dlopen(driver_absolute_path, RTLD_NOW | RTLD_LOCAL);      if (dso == 0) {          const char* err = dlerror(); -        LOGE("load_driver(%s): %s", driver_absolute_path, err?err:"unknown"); +        ALOGE("load_driver(%s): %s", driver_absolute_path, err?err:"unknown");          return 0;      } -    LOGD("loaded %s", driver_absolute_path); +    ALOGD("loaded %s", driver_absolute_path);      if (mask & EGL) {          getProcAddress = (getProcAddressType)dlsym(dso, "eglGetProcAddress"); -        LOGE_IF(!getProcAddress,  +        ALOGE_IF(!getProcAddress,                   "can't find eglGetProcAddress() in %s", driver_absolute_path);          egl_t* egl = &cnx->egl; diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index 6ad06afff710..60baeaa6fae6 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -146,7 +146,7 @@ void setGLHooksThreadSpecific(gl_hooks_t const *value) {  static int gl_no_context() {      if (egl_tls_t::logNoContextCall()) { -        LOGE("call to OpenGL ES API with no current context " +        ALOGE("call to OpenGL ES API with no current context "               "(logged once per thread)");          char value[PROPERTY_VALUE_MAX];          property_get("debug.egl.callstack", value, "0"); @@ -270,7 +270,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");          }      } @@ -292,7 +292,7 @@ EGLBoolean egl_init_drivers() {  }  void gl_unimplemented() { -    LOGE("called unimplemented OpenGL ES API"); +    ALOGE("called unimplemented OpenGL ES API");  }  // ---------------------------------------------------------------------------- diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index 2b0ed5dfd654..d5e9cb815e06 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -353,7 +353,7 @@ EGLSurface eglCreateWindowSurface(  EGLDisplay dpy, EGLConfig config,          EGLint format;          if (native_window_api_connect(window, NATIVE_WINDOW_API_EGL) != OK) { -            LOGE("EGLNativeWindowType %p already connected to another API", +            ALOGE("EGLNativeWindowType %p already connected to another API",                      window);              return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);          } @@ -364,7 +364,7 @@ EGLSurface eglCreateWindowSurface(  EGLDisplay dpy, EGLConfig config,              if (format != 0) {                  int err = native_window_set_buffers_format(window, format);                  if (err != 0) { -                    LOGE("error setting native window pixel format: %s (%d)", +                    ALOGE("error setting native window pixel format: %s (%d)",                              strerror(-err), err);                      native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL);                      return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE); @@ -670,7 +670,7 @@ EGLBoolean eglMakeCurrent(  EGLDisplay dpy, EGLSurface draw,              egl_tls_t::setContext(EGL_NO_CONTEXT);          }      } else { -        // this will LOGE the error +        // this will ALOGE the error          result = setError(c->cnx->egl.eglGetError(), EGL_FALSE);      }      return result; @@ -882,7 +882,7 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname)          addr = sGLExtentionMap.valueFor(name);          const int slot = sGLExtentionSlot; -        LOGE_IF(slot >= MAX_NUMBER_OF_GL_EXTENSIONS, +        ALOGE_IF(slot >= MAX_NUMBER_OF_GL_EXTENSIONS,                  "no more slots for eglGetProcAddress(\"%s\")",                  procname); diff --git a/opengl/libs/EGL/egl_cache.cpp b/opengl/libs/EGL/egl_cache.cpp index c4a7466ec537..7fd6519c2de7 100644 --- a/opengl/libs/EGL/egl_cache.cpp +++ b/opengl/libs/EGL/egl_cache.cpp @@ -101,7 +101,7 @@ void egl_cache_t::initialize(egl_display_t *display) {                              cnx->egl.eglGetProcAddress(                                      "eglSetBlobCacheFuncsANDROID"));                  if (eglSetBlobCacheFuncsANDROID == NULL) { -                    LOGE("EGL_ANDROID_blob_cache advertised by display %d, " +                    ALOGE("EGL_ANDROID_blob_cache advertised by display %d, "                              "but unable to get eglSetBlobCacheFuncsANDROID", i);                      continue;                  } @@ -110,7 +110,7 @@ void egl_cache_t::initialize(egl_display_t *display) {                          android::setBlob, android::getBlob);                  EGLint err = cnx->egl.eglGetError();                  if (err != EGL_SUCCESS) { -                    LOGE("eglSetBlobCacheFuncsANDROID resulted in an error: " +                    ALOGE("eglSetBlobCacheFuncsANDROID resulted in an error: "                              "%#x", err);                  }              } @@ -133,7 +133,7 @@ void egl_cache_t::setBlob(const void* key, EGLsizeiANDROID keySize,      Mutex::Autolock lock(mMutex);      if (keySize < 0 || valueSize < 0) { -        LOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed"); +        ALOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed");          return;      } @@ -172,7 +172,7 @@ EGLsizeiANDROID egl_cache_t::getBlob(const void* key, EGLsizeiANDROID keySize,      Mutex::Autolock lock(mMutex);      if (keySize < 0 || valueSize < 0) { -        LOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed"); +        ALOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed");          return 0;      } @@ -226,7 +226,7 @@ void egl_cache_t::saveBlobCacheLocked() {                  // The file exists, delete it and try again.                  if (unlink(fname) == -1) {                      // No point in retrying if the unlink failed. -                    LOGE("error unlinking cache file %s: %s (%d)", fname, +                    ALOGE("error unlinking cache file %s: %s (%d)", fname,                              strerror(errno), errno);                      return;                  } @@ -234,7 +234,7 @@ void egl_cache_t::saveBlobCacheLocked() {                  fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0);              }              if (fd == -1) { -                LOGE("error creating cache file %s: %s (%d)", fname, +                ALOGE("error creating cache file %s: %s (%d)", fname,                          strerror(errno), errno);                  return;              } @@ -242,7 +242,7 @@ void egl_cache_t::saveBlobCacheLocked() {          size_t fileSize = headerSize + cacheSize;          if (ftruncate(fd, fileSize) == -1) { -            LOGE("error setting cache file size: %s (%d)", strerror(errno), +            ALOGE("error setting cache file size: %s (%d)", strerror(errno),                      errno);              close(fd);              unlink(fname); @@ -252,7 +252,7 @@ void egl_cache_t::saveBlobCacheLocked() {          uint8_t* buf = reinterpret_cast<uint8_t*>(mmap(NULL, fileSize,                  PROT_WRITE, MAP_SHARED, fd, 0));          if (buf == MAP_FAILED) { -            LOGE("error mmaping cache file: %s (%d)", strerror(errno), +            ALOGE("error mmaping cache file: %s (%d)", strerror(errno),                      errno);              close(fd);              unlink(fname); @@ -262,7 +262,7 @@ void egl_cache_t::saveBlobCacheLocked() {          status_t err = mBlobCache->flatten(buf + headerSize, cacheSize, NULL,                  0);          if (err != OK) { -            LOGE("error writing cache contents: %s (%d)", strerror(-err), +            ALOGE("error writing cache contents: %s (%d)", strerror(-err),                      -err);              munmap(buf, fileSize);              close(fd); @@ -288,7 +288,7 @@ void egl_cache_t::loadBlobCacheLocked() {          int fd = open(mFilename.string(), O_RDONLY, 0);          if (fd == -1) {              if (errno != ENOENT) { -                LOGE("error opening cache file %s: %s (%d)", mFilename.string(), +                ALOGE("error opening cache file %s: %s (%d)", mFilename.string(),                          strerror(errno), errno);              }              return; @@ -296,7 +296,7 @@ void egl_cache_t::loadBlobCacheLocked() {          struct stat statBuf;          if (fstat(fd, &statBuf) == -1) { -            LOGE("error stat'ing cache file: %s (%d)", strerror(errno), errno); +            ALOGE("error stat'ing cache file: %s (%d)", strerror(errno), errno);              close(fd);              return;          } @@ -304,7 +304,7 @@ void egl_cache_t::loadBlobCacheLocked() {          // Sanity check the size before trying to mmap it.          size_t fileSize = statBuf.st_size;          if (fileSize > maxTotalSize * 2) { -            LOGE("cache file is too large: %#llx", statBuf.st_size); +            ALOGE("cache file is too large: %#llx", statBuf.st_size);              close(fd);              return;          } @@ -312,7 +312,7 @@ void egl_cache_t::loadBlobCacheLocked() {          uint8_t* buf = reinterpret_cast<uint8_t*>(mmap(NULL, fileSize,                  PROT_READ, MAP_PRIVATE, fd, 0));          if (buf == MAP_FAILED) { -            LOGE("error mmaping cache file: %s (%d)", strerror(errno), +            ALOGE("error mmaping cache file: %s (%d)", strerror(errno),                      errno);              close(fd);              return; @@ -321,13 +321,13 @@ void egl_cache_t::loadBlobCacheLocked() {          // Check the file magic and CRC          size_t cacheSize = fileSize - headerSize;          if (memcmp(buf, cacheFileMagic, 4) != 0) { -            LOGE("cache file has bad mojo"); +            ALOGE("cache file has bad mojo");              close(fd);              return;          }          uint32_t* crc = reinterpret_cast<uint32_t*>(buf + 4);          if (crc32c(buf + headerSize, cacheSize) != *crc) { -            LOGE("cache file failed CRC check"); +            ALOGE("cache file failed CRC check");              close(fd);              return;          } @@ -335,7 +335,7 @@ void egl_cache_t::loadBlobCacheLocked() {          status_t err = mBlobCache->unflatten(buf + headerSize, cacheSize, NULL,                  0);          if (err != OK) { -            LOGE("error reading cache contents: %s (%d)", strerror(-err), +            ALOGE("error reading cache contents: %s (%d)", strerror(-err),                      -err);              munmap(buf, fileSize);              close(fd); diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp index 31119f9608d5..53eaf9a1366a 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 @@ -201,7 +201,7 @@ EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) {                      EGL_CLIENT_APIS);          } else { -            LOGW("%d: eglInitialize(%p) failed (%s)", i, idpy, +            ALOGW("%d: eglInitialize(%p) failed (%s)", i, idpy,                      egl_tls_t::egl_strerror(cnx->egl.eglGetError()));          }      } @@ -309,7 +309,7 @@ EGLBoolean egl_display_t::terminate() {          egl_connection_t* const cnx = &gEGLImpl[i];          if (cnx->dso && disp[i].state == egl_display_t::INITIALIZED) {              if (cnx->egl.eglTerminate(disp[i].dpy) == EGL_FALSE) { -                LOGW("%d: eglTerminate(%p) failed (%s)", i, disp[i].dpy, +                ALOGW("%d: eglTerminate(%p) failed (%s)", i, disp[i].dpy,                          egl_tls_t::egl_strerror(cnx->egl.eglGetError()));              }              // REVISIT: it's unclear what to do if eglTerminate() fails @@ -327,7 +327,7 @@ EGLBoolean egl_display_t::terminate() {      // there are no reference to them, it which case, we're free to      // delete them.      size_t count = objects.size(); -    LOGW_IF(count, "eglTerminate() called w/ %d objects remaining", count); +    ALOGW_IF(count, "eglTerminate() called w/ %d objects remaining", count);      for (size_t i=0 ; i<count ; i++) {          egl_object_t* o = objects.itemAt(i);          o->destroy(); diff --git a/opengl/libs/EGL/egl_object.cpp b/opengl/libs/EGL/egl_object.cpp index 20cdc7eb408e..26e8c3eb10c4 100644 --- a/opengl/libs/EGL/egl_object.cpp +++ b/opengl/libs/EGL/egl_object.cpp @@ -45,7 +45,7 @@ void egl_object_t::terminate() {      display->removeObject(this);      if (decRef() == 1) {          // shouldn't happen because this is called from LocalRef -        LOGE("egl_object_t::terminate() removed the last reference!"); +        ALOGE("egl_object_t::terminate() removed the last reference!");      }  } diff --git a/opengl/libs/EGL/egl_object.h b/opengl/libs/EGL/egl_object.h index df1b261dd5ed..7106fa5ebf56 100644 --- a/opengl/libs/EGL/egl_object.h +++ b/opengl/libs/EGL/egl_object.h @@ -110,7 +110,7 @@ void egl_object_t::LocalRef<N,T>::release() const {      if (ref) {          if (ref->decRef() == 1) {              // shouldn't happen because this is called from LocalRef -            LOGE("LocalRef::release() removed the last reference!"); +            ALOGE("LocalRef::release() removed the last reference!");          }      }  } @@ -131,7 +131,7 @@ protected:          if (window != NULL) {              native_window_set_buffers_format(window, 0);              if (native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL)) { -                LOGW("EGLNativeWindowType %p disconnect failed", window); +                ALOGW("EGLNativeWindowType %p disconnect failed", window);              }          }      } diff --git a/opengl/libs/EGL/egl_tls.cpp b/opengl/libs/EGL/egl_tls.cpp index b341ddbc7926..cf144ceb57ac 100644 --- a/opengl/libs/EGL/egl_tls.cpp +++ b/opengl/libs/EGL/egl_tls.cpp @@ -73,7 +73,7 @@ void egl_tls_t::setErrorEtcImpl(      egl_tls_t* tls = getTLS();      if (tls->error != error) {          if (!quiet) { -            LOGE("%s:%d error %x (%s)", +            ALOGE("%s:%d error %x (%s)",                      caller, line, error, egl_strerror(error));              char value[PROPERTY_VALUE_MAX];              property_get("debug.egl.callstack", value, "0"); diff --git a/opengl/libs/EGL/trace.cpp b/opengl/libs/EGL/trace.cpp index 0e934e2d8bbd..d04ef1022a13 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 fee4609378b0..df22b968a1b7 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 6b72751bd009..70d23d67ca31 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 41061e1bc662..7bbaa18bc61d 100644 --- a/opengl/libs/GLES2_dbg/src/dbgcontext.cpp +++ b/opengl/libs/GLES2_dbg/src/dbgcontext.cpp @@ -100,7 +100,7 @@ unsigned GetBytesPerPixel(const GLenum format, const GLenum type)      case GL_UNSIGNED_BYTE:          break;      default: -        LOGE("GetBytesPerPixel: unknown type %x", type); +        ALOGE("GetBytesPerPixel: unknown type %x", type);      }      switch (format) { @@ -115,7 +115,7 @@ unsigned GetBytesPerPixel(const GLenum format, const GLenum type)      case 0x80E1:   // GL_BGRA_EXT          return 4;      default: -        LOGE("GetBytesPerPixel: unknown format %x", format); +        ALOGE("GetBytesPerPixel: unknown format %x", format);      }      return 1; // in doubt... @@ -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 49f3847f5dc2..0ab48902b27c 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 0c711bf200fe..3e9369707422 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 28a24206d659..70c34333db96 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_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp index ee29f12faf73..2d31a35177c2 100644 --- a/opengl/libs/GLES_CM/gl.cpp +++ b/opengl/libs/GLES_CM/gl.cpp @@ -132,7 +132,7 @@ GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,          #define CHECK_GL_ERRORS(_api) \              do { GLint err = glGetError(); \ -                LOGE_IF(err != GL_NO_ERROR, "%s failed (0x%04X)", #_api, err); \ +                ALOGE_IF(err != GL_NO_ERROR, "%s failed (0x%04X)", #_api, err); \              } while(false);      #else diff --git a/opengl/tests/gl2_jni/jni/gl_code.cpp b/opengl/tests/gl2_jni/jni/gl_code.cpp index c2fabe6c302f..fa6bd93eadec 100644 --- a/opengl/tests/gl2_jni/jni/gl_code.cpp +++ b/opengl/tests/gl2_jni/jni/gl_code.cpp @@ -14,13 +14,13 @@  static void printGLString(const char *name, GLenum s) {      const char *v = (const char *) glGetString(s); -    LOGI("GL %s = %s\n", name, v); +    ALOGI("GL %s = %s\n", name, v);  }  static void checkGlError(const char* op) {      for (GLint error = glGetError(); error; error              = glGetError()) { -        LOGI("after %s() glError (0x%x)\n", op, error); +        ALOGI("after %s() glError (0x%x)\n", op, error);      }  } @@ -48,7 +48,7 @@ GLuint loadShader(GLenum shaderType, const char* pSource) {                  char* buf = (char*) malloc(infoLen);                  if (buf) {                      glGetShaderInfoLog(shader, infoLen, NULL, buf); -                    LOGE("Could not compile shader %d:\n%s\n", +                    ALOGE("Could not compile shader %d:\n%s\n",                              shaderType, buf);                      free(buf);                  } @@ -87,7 +87,7 @@ GLuint createProgram(const char* pVertexSource, const char* pFragmentSource) {                  char* buf = (char*) malloc(bufLength);                  if (buf) {                      glGetProgramInfoLog(program, bufLength, NULL, buf); -                    LOGE("Could not link program:\n%s\n", buf); +                    ALOGE("Could not link program:\n%s\n", buf);                      free(buf);                  }              } @@ -107,15 +107,15 @@ bool setupGraphics(int w, int h) {      printGLString("Renderer", GL_RENDERER);      printGLString("Extensions", GL_EXTENSIONS); -    LOGI("setupGraphics(%d, %d)", w, h); +    ALOGI("setupGraphics(%d, %d)", w, h);      gProgram = createProgram(gVertexShader, gFragmentShader);      if (!gProgram) { -        LOGE("Could not create program."); +        ALOGE("Could not create program.");          return false;      }      gvPositionHandle = glGetAttribLocation(gProgram, "vPosition");      checkGlError("glGetAttribLocation"); -    LOGI("glGetAttribLocation(\"vPosition\") = %d\n", +    ALOGI("glGetAttribLocation(\"vPosition\") = %d\n",              gvPositionHandle);      glViewport(0, 0, w, h); diff --git a/opengl/tests/gl_jni/jni/gl_code.cpp b/opengl/tests/gl_jni/jni/gl_code.cpp index ef66841f2792..cf86020a3d89 100644 --- a/opengl/tests/gl_jni/jni/gl_code.cpp +++ b/opengl/tests/gl_jni/jni/gl_code.cpp @@ -18,7 +18,7 @@ GLfloat background;  static void printGLString(const char *name, GLenum s) {      const char *v = (const char *) glGetString(s); -    LOGI("GL %s = %s\n", name, v); +    ALOGI("GL %s = %s\n", name, v);  }  static void gluLookAt(float eyeX, float eyeY, float eyeZ, diff --git a/opengl/tests/gl_perf/fill_common.cpp b/opengl/tests/gl_perf/fill_common.cpp index a069f67ac8fd..389381fb329b 100644 --- a/opengl/tests/gl_perf/fill_common.cpp +++ b/opengl/tests/gl_perf/fill_common.cpp @@ -26,7 +26,7 @@ static uint32_t gHeight = 0;  static void checkGlError(const char* op) {      for (GLint error = glGetError(); error; error              = glGetError()) { -        LOGE("after %s() glError (0x%x)\n", op, error); +        ALOGE("after %s() glError (0x%x)\n", op, error);      }  } @@ -44,7 +44,7 @@ GLuint loadShader(GLenum shaderType, const char* pSource) {                  char* buf = (char*) malloc(infoLen);                  if (buf) {                      glGetShaderInfoLog(shader, infoLen, NULL, buf); -                    LOGE("Could not compile shader %d:\n%s\n", shaderType, buf); +                    ALOGE("Could not compile shader %d:\n%s\n", shaderType, buf);                      free(buf);                  }                  glDeleteShader(shader); @@ -94,7 +94,7 @@ GLuint createProgram(const char* pVertexSource, const char* pFragmentSource) {                  char* buf = (char*) malloc(bufLength);                  if (buf) {                      glGetProgramInfoLog(program, bufLength, NULL, buf); -                    LOGE("Could not link program:\n%s\n", buf); +                    ALOGE("Could not link program:\n%s\n", buf);                      free(buf);                  }              } @@ -132,7 +132,7 @@ static void endTimer(int count) {      } else {          printf("%s, %f, %f\n", gCurrentTestName, mpps, dc60);      } -    LOGI("%s, %f, %f\r\n", gCurrentTestName, mpps, dc60); +    ALOGI("%s, %f, %f\r\n", gCurrentTestName, mpps, dc60);  } diff --git a/opengl/tests/gl_perfapp/jni/gl_code.cpp b/opengl/tests/gl_perfapp/jni/gl_code.cpp index f99337152c02..2f0418373ad8 100644 --- a/opengl/tests/gl_perfapp/jni/gl_code.cpp +++ b/opengl/tests/gl_perfapp/jni/gl_code.cpp @@ -43,7 +43,7 @@ void doTest() {      int texSize = ((stateClock >> 1) & 0x1) + 1;      if (testNum >= gFragmentTestCount) { -       LOGI("done\n"); +       ALOGI("done\n");         if (fOut) {             fclose(fOut);             fOut = NULL; @@ -52,7 +52,7 @@ void doTest() {         return;      } -    // LOGI("doTest %d %d %d\n", texCount, extraMath, testSubState); +    // ALOGI("doTest %d %d %d\n", texCount, extraMath, testSubState);  //        for (uint32_t num = 0; num < gFragmentTestCount; num++) {      doSingleTest(testNum, texSize); @@ -74,17 +74,17 @@ JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_init(JNIEnv * env, jobj              genTextures();              const char* fileName = "/sdcard/glperf.csv";              if (fOut != NULL) { -                 LOGI("Closing partially written output.n"); +                 ALOGI("Closing partially written output.n");                   fclose(fOut);                   fOut = NULL;              } -            LOGI("Writing to: %s\n",fileName); +            ALOGI("Writing to: %s\n",fileName);              fOut = fopen(fileName, "w");              if (fOut == NULL) { -                LOGE("Could not open: %s\n", fileName); +                ALOGE("Could not open: %s\n", fileName);              } -            LOGI("\nvarColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\n"); +            ALOGI("\nvarColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\n");              if (fOut) fprintf(fOut,"varColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\r\n");      }  } diff --git a/opengl/tests/gldual/jni/gl_code.cpp b/opengl/tests/gldual/jni/gl_code.cpp index f1f0a1f7544d..22867ed6bae5 100644 --- a/opengl/tests/gldual/jni/gl_code.cpp +++ b/opengl/tests/gldual/jni/gl_code.cpp @@ -14,13 +14,13 @@  static void printGLString(const char *name, GLenum s) {      const char *v = (const char *) glGetString(s); -    LOGI("GL %s = %s\n", name, v); +    ALOGI("GL %s = %s\n", name, v);  }  static void checkGlError(const char* op) {      for (GLint error = glGetError(); error; error              = glGetError()) { -        LOGI("after %s() glError (0x%x)\n", op, error); +        ALOGI("after %s() glError (0x%x)\n", op, error);      }  } @@ -48,7 +48,7 @@ GLuint loadShader(GLenum shaderType, const char* pSource) {                  char* buf = (char*) malloc(infoLen);                  if (buf) {                      glGetShaderInfoLog(shader, infoLen, NULL, buf); -                    LOGE("Could not compile shader %d:\n%s\n", +                    ALOGE("Could not compile shader %d:\n%s\n",                              shaderType, buf);                      free(buf);                  } @@ -87,7 +87,7 @@ GLuint createProgram(const char* pVertexSource, const char* pFragmentSource) {                  char* buf = (char*) malloc(bufLength);                  if (buf) {                      glGetProgramInfoLog(program, bufLength, NULL, buf); -                    LOGE("Could not link program:\n%s\n", buf); +                    ALOGE("Could not link program:\n%s\n", buf);                      free(buf);                  }              } @@ -107,15 +107,15 @@ bool setupGraphics(int w, int h) {      printGLString("Renderer", GL_RENDERER);      printGLString("Extensions", GL_EXTENSIONS); -    LOGI("setupGraphics(%d, %d)", w, h); +    ALOGI("setupGraphics(%d, %d)", w, h);      gProgram = createProgram(gVertexShader, gFragmentShader);      if (!gProgram) { -        LOGE("Could not create program."); +        ALOGE("Could not create program.");          return false;      }      gvPositionHandle = glGetAttribLocation(gProgram, "vPosition");      checkGlError("glGetAttribLocation"); -    LOGI("glGetAttribLocation(\"vPosition\") = %d\n", +    ALOGI("glGetAttribLocation(\"vPosition\") = %d\n",              gvPositionHandle);      glViewport(0, 0, w, h);  |