Move Context::sync to Display::sync.

This is a workaround for an Intel bug.

The crash looks like this:

0x5f816c53	 [d3d9.dll	 + 0x00036c53]	CQuery::~CQuery()
0x5f816bec	 [d3d9.dll	 + 0x00036bec]	CQuery::`vector deleting
destructor'(unsigned int)
0x5f7e8129	 [d3d9.dll	 + 0x00008129]	CBaseObject::~CBaseObject()
0x5f9e19c7	 [libglesv2.dll	 + 0x000319c7]	gl::Fence::`vector deleting
destructor'(unsigned int)
0x5f9de78e	 [libglesv2.dll	 - context.cpp:975]	gl::Context::deleteFence(unsigned
int)
0x5f9e1491	 [libglesv2.dll	 - context.cpp:198]	gl::Context::~Context()
0x5f9e182f	 [libglesv2.dll	 - context.cpp:3936]	glDestroyContext
0x717654ec	 [libegl.dll	 -
display.cpp:749]	egl::Display::destroyContext(gl::Context *)
0x7176a3da	 [libegl.dll	 - libegl.cpp:907]	eglDestroyContext
0x64fbaf33	 [chrome.dll	 - gl_context_egl.cc:75]	gfx::GLContextEGL::Destroy()

This is a crash in deleteFence but the same could happen in flush. Fix for the former to follow.

The vendor ID is always 8086 (Intel). Not an XP issue - it's happening on Win
7.

Tested by stepping through a call to glFinish in the debugger and ensuring that
it sleeps but eventually returns.
Review URL: http://codereview.appspot.com/5503094

git-svn-id: https://angleproject.googlecode.com/svn/trunk@940 736b8ea6-26fd-11df-bfd4-992fa37f6226
4 files changed