From a592d9c04381bf55c780ccb66f720cbfc7a22fa5 Mon Sep 17 00:00:00 2001 From: Jesse Hall Date: Thu, 1 Dec 2011 10:51:17 -0800 Subject: [PATCH] EmuGL: misc small cleanups * Disable verbose debug spam. * Add missing GL enum to utility function. The default case was returning the correct size, so this doesn't fix any bugs, just removes some logcat spam. * Comment and whitespace corrections. Change-Id: I83fb8644331ae1072d6a8dae9c041da92073089f --- tools/emulator/opengl/README | 12 ------------ .../opengl/host/include/libOpenglRender/render_api.h | 2 +- .../host/libs/Translator/GLcommon/GLESvalidate.cpp | 10 +++++----- .../host/libs/libOpenglRender/RenderThread.cpp | 1 - tools/emulator/opengl/host/tools/emugen/README | 2 +- .../opengl/shared/OpenglCodecCommon/glUtils.cpp | 1 + 6 files changed, 8 insertions(+), 20 deletions(-) diff --git a/tools/emulator/opengl/README b/tools/emulator/opengl/README index bec20c5b0..1a7536e43 100644 --- a/tools/emulator/opengl/README +++ b/tools/emulator/opengl/README @@ -1,17 +1,5 @@ This directory contains the modules related to hardware OpenGL ES emulation. -For now, this feature is experimental, and *nothing* will be built unless -you define BUILD_EMULATOR_OPENGL in your environment, for example with: - - export BUILD_EMULATOR_OPENGL=true - -You can also define the following to enable the "gralloc" module, which -corresponds to system-wide GLES emulation (by default, only a specific set -of applications are enabled, see below): - - export BUILD_EMULATOR_OPENGL_DRIVER=true - - I. Overview of components: ========================== diff --git a/tools/emulator/opengl/host/include/libOpenglRender/render_api.h b/tools/emulator/opengl/host/include/libOpenglRender/render_api.h index bb331920a..14ebc682c 100644 --- a/tools/emulator/opengl/host/include/libOpenglRender/render_api.h +++ b/tools/emulator/opengl/host/include/libOpenglRender/render_api.h @@ -77,7 +77,7 @@ bool createOpenGLSubwindow(FBNativeWindowType window, bool destroyOpenGLSubwindow(); // -// setOpenGLDisplatRotation - +// setOpenGLDisplayRotation - // set the framebuffer display image rotation in units // of degrees around the z axis // diff --git a/tools/emulator/opengl/host/libs/Translator/GLcommon/GLESvalidate.cpp b/tools/emulator/opengl/host/libs/Translator/GLcommon/GLESvalidate.cpp index 72331163d..281333f25 100644 --- a/tools/emulator/opengl/host/libs/Translator/GLcommon/GLESvalidate.cpp +++ b/tools/emulator/opengl/host/libs/Translator/GLcommon/GLESvalidate.cpp @@ -1,8 +1,8 @@ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include diff --git a/tools/emulator/opengl/host/libs/libOpenglRender/RenderThread.cpp b/tools/emulator/opengl/host/libs/libOpenglRender/RenderThread.cpp index 2e68c3364..01191339a 100644 --- a/tools/emulator/opengl/host/libs/libOpenglRender/RenderThread.cpp +++ b/tools/emulator/opengl/host/libs/libOpenglRender/RenderThread.cpp @@ -78,7 +78,6 @@ int RenderThread::Main() int stat = readBuf.getData(); if (stat <= 0) { - fprintf(stderr, "client shutdown\n"); break; } diff --git a/tools/emulator/opengl/host/tools/emugen/README b/tools/emulator/opengl/host/tools/emugen/README index 5df11a3ab..0fe85f941 100644 --- a/tools/emulator/opengl/host/tools/emugen/README +++ b/tools/emulator/opengl/host/tools/emugen/README @@ -46,7 +46,7 @@ will be encoded into : 101, // foo opcode 14, // sizeof(opcode) + sizeof(packet_len) + sizeof(int) + sizeof(short) p1, // 4 bytes - s1 // 4 bytes + s1 // 2 bytes } Since ‘foo’ returns value, the caller is expected to read back the return packet from the server->client stream. The return value in this example is in thus the return packet is: diff --git a/tools/emulator/opengl/shared/OpenglCodecCommon/glUtils.cpp b/tools/emulator/opengl/shared/OpenglCodecCommon/glUtils.cpp index ae70598a3..4b7fc892c 100644 --- a/tools/emulator/opengl/shared/OpenglCodecCommon/glUtils.cpp +++ b/tools/emulator/opengl/shared/OpenglCodecCommon/glUtils.cpp @@ -81,6 +81,7 @@ size_t glUtilsParamSize(GLenum param) switch(param) { + case GL_DEPTH_TEST: case GL_DEPTH_FUNC: case GL_DEPTH_BITS: case GL_MAX_CLIP_PLANES: