aboutsummaryrefslogtreecommitdiffstats
path: root/emulator
Commit message (Collapse)AuthorAgeFilesLines
...
* | Check the return value of eglChooseConfigMartin Storsjo2013-08-111-1/+3
|/ | | | | | | | | | | | The EGL specs say that eglChooseConfig doesn't update num_config if it returns a failure (which is exactly what Translator/EGL/EglImp.cpp does). Therefore, if this function returned a failure (e.g. due to an unsupported egl attribute), nConfigs was left untouched, meaning that the configs array was left uninitialized but treated as if it was full of valid configs. Change-Id: I3809272298ea10d65dc939849d2e3c17d1158da6
* Merge "Fix RenderThreadInfo lifetime and cleanup"Jesse Hall2013-07-116-62/+45
|\
| * Fix RenderThreadInfo lifetime and cleanupJesse Hall2013-06-186-62/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using a TLS destructor, RenderThreadInfo is now an automatic variable of RenderThread::Main(), so is automatically destroyed on thread exit. RenderThread::Main() now explicitly unbinds the thread's context and surfaces from the FrameBuffer, ensuring that the thread has released all references before it exits. This fixes a bug where RenderThreadInfo's destructor was releasing the references in the TLS destructor, which caused ColorBuffer's destructor to call FrameBuffer::bind_locked() when the FrameBuffer lock wasn't held. By clearing the references in FrameBuffer::bindContext(), locking around destruction happens correctly. Change-Id: I617cea838d5f352a597ccc6d3dbd8f9c08cb91bd
* | Fix a crash which occured with some graphic libraries.Deepanshu Gupta2013-06-211-4/+4
|/ | | | | | | Fix a small bug that caused the emulator to crash when used with some graphic libraries. Change-Id: Ifb7e0b11a8302d0538632dac467d187dfcdfda47
* Prevent SocketStream to be freed twicePetar Jovanovic2013-05-171-8/+8
| | | | | | | | | In cases when RenderThread failed to start, RenderServer would free the stream first and then the thread. However, the thread itself also attemps to free the stream and this caused a crash of the emulator in some corner cases. Change-Id: I2e508c37ab0a09c9261b30e59072bf1a44982dfe
* use tlsDestruct in linux to destroy thread specific OpenGl resourceskeunyoung2013-04-052-29/+23
| | | | | | - lack of tlsDestruct causes resource leakage in linux Change-Id: I6f5308fd00da06dbecd9246393021e3d72aa40c3
* delete socket when the thread is destroyedkeunyoung2013-04-012-1/+6
| | | | | | | - SocketStream is passed from RenderServer::Main, but it is not deleted. - As a result, emulator will keep opening these sockets. Change-Id: I4f2445855fc45a8d5f20f4d598e7021e8f3e000c
* prevent dead-lock by removing mutex lock in errorHandlerProckeunyoung2013-03-281-1/+0
| | | | | | | | - setting int should be OK even without lock as there is no synchronization in reader side - dead-lock can happen inside constructor if the same error handler is already set and if error happens inside constructor in place like XSync Change-Id: I2f401067e0555ae092df23f57cc9ab054a1555d7
* Delete duplicate filesYing Wang2013-02-2810-3689/+0
| | | | | | These files are already in development/tools/emulator. Change-Id: I58988ce49804583b06e7d93380c44ba800448216
* Extend Mac Intel graphics bug workaround to HD 4000Jesse Hall2012-12-101-8/+11
| | | | | Bug: 39835 Change-Id: Ied3f43b76d2bb1bdba478f57122ec0ef4d967ae4
* Add a new skin 'dynamic'.Siva Velusamy2012-10-0825-0/+914
| | | | | | | | | | | This skin only defines the parts that can be used. Its layout section is expected to be generated at runtime by the emulator when the option -dynamic-skin is used. The assets used to generate this skin are placed in the assets folder. Change-Id: Ib252ed6a7b1ef16c21c3d45bdc0c977c1ad42466
* Check that the native display is valid before using itJesse Hall2012-08-245-0/+16
| | | | | | | | | | | EglOS::getDefaultDisplay() can return an invalid display, e.g. on X11 if $DISPLAY is not set. This is called from the EglGlobalInfo constructor, which doesn't have a good way to indicate failure. So instead EglGlobalInfo::addDisplay() checks that the display is valid before wrapping it in a EglDisplay. Bug: 7020498 Change-Id: Id18fc568dae5bff4b45b706f3322ae5e4785d95d
* host modules don't need LOCAL_MODULE_TAGSJoe Onorato2012-08-161-1/+1
| | | | Change-Id: I5412777820c8b0e691d07b10df348a739f92f291
* Fixed "Bus error" running tests triangleV2 and triangleCMAndrew Hsieh2012-08-102-6/+14
| | | | | | | | | | Function __dyld_func_lookup is deprecated and invisible in Mac SDK 10.6+. Instruct linker to resolve it at run-time. Related CL https://android-review.googlesource.com/#/c/37355/ fix the build, but cause run-time "Bus error". Change-Id: Icf3ea7a0b8ac29c69482e372f34e0b2e364472d8
* Send full-size framebuffer to OnPost callbackJesse Hall2012-07-203-10/+23
| | | | | | | | | | | When the emulator window has non-1.0 scaling, the scale is applied when blitting the Android framebuffer to the host window. For the OnPost callback, we were not only reading the image back from the window (so post-scaling), we were also storing it in a 1.0-scaled buffer. Now we read back from the Android framebuffer image, which is always 1.0-scaled. Change-Id: Ia9c974711a9a4b0b19f4b997f65ecc64481b4c6a
* Fix OSX emulator build due to missing headerJesse Hall2012-07-121-0/+1
| | | | Change-Id: I84133fb36d8f15ed33e6bcba2be158e43c903901
* Use a per-process server address for the GLES serverJesse Hall2012-07-1112-55/+72
| | | | | | | | | | | | | | | Previously we used a hardcoded address (tcp port, unix pipe path, etc.) for the OpenGLRender system. Multiple emulators would all try to listen on the same address, with the system non-deterministically (?) choosing which one accepted each new connection. This resulted in frames going to the wrong emulator window, one emulator shutting down another's OpenGL system, etc. Now the OpenGLRender server requests an unused tcp port or derives a path from the pid, and reports the address back to the emulator client to use for future connections from the guest. Change-Id: I6af2eac0c7f27670a3b6595772eebc7aa2b24688
* Fix socket leak when shutting down rendererJesse Hall2012-07-092-1/+10
| | | | | | | | | | | | | | | | | | | This leak has always been there, but normally only leaks one socket per emulator instance. Worse, though, is that the socket is listening for connections on a hardcoded port, so it prevents other emulators from listening on that port. Since we now start the GL renderer briefly in every emulator instance (for GL string collection) this means only one emulator can run at a time, even if none are using GL acceleration. Even with this fix, a GL-accelerated emulator will prevent any other emulator (accelerated or not) from starting, since it is listening on the hardcoded port, and the new emulator will try to listen on and connect to that port at least for GL string collection. That will be fixed in a future change. Bug: 33383 Change-Id: I62a8a67eb6afb6c53cb41a19d00b6449cf5e1abe
* Use linear filtering for colorbuffer texturesJesse Hall2012-06-261-2/+2
| | | | | | | | | | | | | | | | | | Switch the min and mag filters for the ColorBuffer's texture object to linear instead of nearest. This gives much better results when posting a colorbuffer to a scaled framebuffer, which happens when the android screen + emulator skin is too big to fit on the user's display. The ColorBuffer's own texture object is only actually used as a texture during post(); when used as a texture by the guest system (e.g. by surfaceflinger composition) it's mapped through an EGLImage to a guest-owned texture object, which has its own filter settings. So we can just change the filter settings for the ColorBuffer texture object at initialization without affecting anything else. SDK Bug: 6721429 Change-Id: I8ec81125d076e0ed77a44f8b0dce412fa3cecabf
* Fix tex and EGLImage leak in ColorBufferJesse Hall2012-06-251-1/+11
| | | | | | | | ColorBuffer wasn't destroying its blit texture and associated EGLImage, leaking one pair per Android gralloc buffer. Change-Id: I2fa42d2ecbb654edca7b224bd002d7513a08a633 http://code.google.com/p/android/issues/detail?id=33445
* Fix convert8To4, convert8To5Jack Palevich2012-06-151-2/+2
| | | | | | | | | | | | | | See b/5680952 "Compilation warnings in etc1.cpp" for discussion. This is a manual merge of an update that was made to frameworks/native/opengl/libs/ETC1/etc1.cpp. sdk/emulator/opengl/host/libs/Translator/GLcommon/etc1.cpp is an exact copy of frameworks/native/opengl/libs/ETC1/etc1.cpp, so we might as well keep the two versions in synch. Bug: 5680952 Change-Id: Icf5d5ed2e7c5c79eb9677d210b1ff5fee507271d
* Move emugl system code to development.gitJesse Hall2012-06-0686-11690/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the way the SDK and Android system images are branched, host code that goes into the SDK tools can't live in the same repository as code that goes into the system image. This change keeps the emugl host code in sdk.git/emulator/opengl while moving the emugl system code to development.git/tools/emulator/opengl. A few changes were made beyond simply cloning the directories: (a) Makefiles were modified to only build the relevant components. Not doing so would break the build due to having multiple rule definitions. (b) Protocol spec files were moved from the guest encoder directories to the host decoder directories. The decoder must support older versions of the protocol, but not newer versions, so it makes sense to keep the latest version of the protocol spec with the decoder. (c) Along with that, the encoder is now built from checked in generated encoder source rather than directly from the protocol spec. The generated code must be updated manually. This makes it possible to freeze the system encoder version without freezing the host decoder version, and also makes it very obvious when a protocol changes is happening that will require special backwards-compatibility support in the decoder/renderer. (d) Host-only and system-only code were removed from the repository where they aren't used. (e) README and DESIGN documents were updated to reflect this split. No actual source code was changed due to the above. Change-Id: I70b576a70ac3dc94155f931508b152178f1e8cd5
* [MIPS] Add support to handle unaligned accessesBhanu Chetlapalli2012-06-051-6/+7
| | | | | | | | MIPS cannot handle unaligned accesses, so this patch changes the direct assignment of ints/floats to using memcpy Signed-Off-By: Bhanu Chetlapalli <bhanu@mips.com> Change-Id: I82600dece8f48f718f73b49cdf831094bbfdcde5
* Merge "Mac 10.6 needs /usr/lib/dylib1.o too."Ying Wang2012-06-052-11/+5
|\
| * Mac 10.6 needs /usr/lib/dylib1.o too.Ying Wang2012-05-312-11/+5
| | | | | | | | | | | | Now Mac OS X SDK 10.6 is the minimal requirement. Change-Id: Ic4ad91210048120965f13957376c5c581567cda4
* | [MIPS] Allow tests to be built for MIPSBhanu Chetlapalli2012-06-042-3/+3
| | | | | | | | | | | | Also fix comment Signed-Off-By: Bhanu Chetlapalli <bhanu@mips.com>
* | [MIPS] Enable OpenGL emulation for MIPSBhanu Chetlapalli2012-06-011-1/+1
|/ | | | | Change-Id: Ib39de7ccf512a81436e68ac1363010af3cb2d28a Signed-Off-By: Bhanu Chetlapalli <bhanu@mips.com>
* Implement the EGL_KHR_fence_sync extensionJesse Hall2012-05-303-18/+61
| | | | | Bug: 6515813 Change-Id: I738fc2663d81876dc75ad560fd08506b423a21bf
* Merge "Allow frame callback to be enabled/disabled"Jesse Hall2012-05-105-57/+84
|\
| * Allow frame callback to be enabled/disabledJesse Hall2012-05-105-57/+84
| | | | | | | | | | | | | | | | Since per-frame readback is slow and clients don't need it on all the time, this change allows the callback to be registered after initialization, and allows it to be disabled later. Change-Id: Ic73d4515d302a0981ee0c80b9e6f9ba5c84b82ae
* | Explicitly include -X11 while building emulator_rendererBhanu Chetlapalli2012-05-101-1/+1
|/ | | | | | | | | | | | | | | | emulator_renderer implicitly uses symbols defined by libX11.so through intermediate libraries, which can cause dependency issues if the intermediates drop the dependency. The linkers on distros like fedora now explicilty disable such indirect dependency resolution - which causes compilation failure. More information is available at this URL http://fedoraproject.org/wiki/UnderstandingDSOLinkChange Signed-Off-By: Bhanu Chetlapalli <bhanu@mips.com> Change-Id: If378fa76142cb6c8c7641d76802dcbc7691871d6
* Use the same compilation options on OS X 10.8 as 10.7Al Sutton2012-05-072-4/+4
| | | | | | | | Added OS X 10.8 to the conditional which includes dylib during compilation on 10.7. Change-Id: Id078e001fd52d82b345249fcf647e0a4802c1f89 Signed-off-by: Al Sutton <al@funkyandroid.com>
* Export GL strings through render_apiJesse Hall2012-05-0110-28/+104
| | | | | | | | | This also changes the strings reported by the default OpenGL ES 1.1/2.0 to OpenGL translators so they include the strings from the underlying OpenGL implementation. This will give more useful bug reports and SDK deployment statistics. Change-Id: Id2d231a4fe3c40157c24a63ec19785826e037fd3
* Merge "Publish and use libOpenglRender interface header"Jesse Hall2012-04-252-77/+85
|\
| * Publish and use libOpenglRender interface headerJesse Hall2012-04-182-77/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The emulator opengles.c file duplicated the function declarations from libOpenglRenderer's render_api.h instead of including it directly. This led to multiple bugs since the declarations didn't actually match, but there was no way for the compiler or dynamic loader to check this. This change makes opengles.c include render_api.h to get function pointer prototypes, and changes the prototypes/implementation as necessary to make both sides actually match. It should be much more difficult to introduce interface mismatch bugs now. Two bugs this change would have prevented: (a) The interface mismatch caused by inconsistent branching which led to GPU acceleration crashing on Windows. With this change, we would have caught the problem at compile time. (b) The emulator verbose log has always been printing "Can't start OpenGLES renderer?" even when the renderer started fine. This is because the renderer was returning a bool (true == success) but the emulator's declaration said it returned int, and the emulator assumed 0 meant success. This difference in return type should now be caught at compile time. Change-Id: Iab3b6960e221edd135b515a166cf991b62bb60c9
* | Add support for RAW_SENSOR pixel format to emulator gralloc.Eino-Ville Talvala2012-04-181-13/+29
|/ | | | Change-Id: I45e3eb12187c10b9d5625fa2521573dc9348417a
* Move emulator GLES from development.git to sdk.gitJesse Hall2012-04-16314-0/+56684
| | | | | | | | | | | | | | | The emulator GLES support has two interfaces: a host shared library interface used by QEMU, and a protocol between the platform and the host. The host library interface is not versioned; QEMU and the GLES renderer must match. The protocol on the other hand must be backwards compatible: a new GLES renderer must support an older platform image. Thus for branching purposes it makes more sense to put the GLES renderer in sdk.git, which is branched along with qemu.git for SDK releases. Platform images will be built against the protocol version in the platform branch of sdk.git. Change-Id: I2c3bce627ecfd0a4b3e688d1839fe10755a21e58
* remove HAL_MODULE_INFO_SYM constNick Kralevich2012-03-012-2/+2
| | | | | | | | | | HAL_MODULE_INFO_SYM was declared as read-only, but the struct is written to by libhardware. This causes a segfault when -Wl,-z,relro is enabled. Fixed. Change-Id: I5324418b217abbfe95e7b39825d52cc8d6e26732
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-082-8/+8
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: I3543198b483c91a3bf7c3f17e174969af3dfb8c5
* Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-051-1/+1
| | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ic2929fa9e6d15ce1710fc960c7570ee11cc7b0f6
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-033-4/+4
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I9736fcbb62da749c049178b03ddaccda30dcebf5
* Fix magnetic field sensor string.Adam Zalcman2011-07-171-2/+2
| | | | | | | | The emulator's sensor module sends "magnetic-field:<x>:<y>:<z>" rather than "magnetic:<x>:<y>:<z>", see external/qemu/android/hw-sensors.c. Change-Id: I858f4f88a4af47504bbf204340db238cf2ac2d66 Signed-off-by: Adam Zalcman <viathor@google.com>
* emulator: qemud: shut-up debug messages.David 'Digit' Turner2011-05-021-1/+1
| | | | | | | | | This change is already under development/tools/emulator/system/qemud/qemud.c However, this sdk/.../qemud.c source file was first deleted, then reverted, with the change in between. So apply it here too. Change-Id: Ib79e0e7260c392fb886b39ff5494837e045cdf1a
* Revert 183675b74e5a58211e5d9a90a9ca86546ed3e245David 'Digit' Turner2011-04-1410-0/+3689
| | | | | | | | | | | | | | | | Unfortunately, we need to keep the duplicate libraries here to prevent breaking a few internal branches for now. Remove obsolete emulator modules The corresponding modules have all been moved to development/tools/emulator/system/ already. Note that we use a global variable Make trick to prevent the same module from being built twice, so removing these files doesn't break the builds. Another patch should remove the global variable Make trick from development/tools/emulator/system after this patch. Change-Id: I97332216b311608de61919cb75f4b760b249c0d9
* Remove obsolete emulator modulesDavid 'Digit' Turner2011-04-078-3559/+0
| | | | | | | | | | | The corresponding modules have all been moved to development/tools/emulator/system/ already. Note that we use a global variable Make trick to prevent the same module from being built twice, so removing these files doesn't break the builds. Another patch should remove the global variable Make trick from development/tools/emulator/system after this patch. Change-Id: I547d2a0173ddf58c1870784920ce795f6a0d7bcf
* Merge "Removing emulator/opengl from the sdk.git"David Turner2011-03-1614-2145/+0
|\
| * Removing emulator/opengl from the sdk.gitJacky Romano2011-03-1614-2145/+0
| | | | | | | | | | | | This project code is moving to live under development.git/tools/emulator Change-Id: I3f7673bc17681a0ffa14bb0b4d0880977b77f24d
* | Prepare for moving platform-specific emulator modules to development.gitDavid 'Digit' Turner2011-03-114-0/+35
|/ | | | | | | | | | | | | We need to move the platform-specific modules to development.git to avoid some clashes. This patch uses a guard Make variable to ensure that each module is only built once. The plan is to simply copy these modules to development.git, then remove the current ones from sdk.git. The guard variable is here to ensure that the transition happens smoothly, i.e. if a build contains modules in both directories, only one of them will be built. Change-Id: I4bc58741a18488f18a4b17e8a1edc4a4a5a93cbc
* Merge "Emugen : A tool to generate wire protocol code"David Turner2011-02-2514-0/+2145
|\
| * Emugen : A tool to generate wire protocol codeJacky Romano2011-02-2514-0/+2145
| | | | | | | | | | | | | | | | | | | | | | Emugen is a tool that can be used to generate code that deals with marshaling/unmarshaling request to/from a wire-protocol. Its input is an API defintion files and its output is C++ source code for the client (caller) and the server (callee) sides. See README file for more details. Change-Id: I45beea6657fae0887d2b4d92933213ecc20d2525