Bug 752643 - Make CompositorParent eglSurface setup available for non-android environment. r=ajuma

This commit is contained in:
Oleg Romashin
2012-05-08 12:40:41 -07:00
parent d05ca0e155
commit 41dd9ebfe6
3 changed files with 34 additions and 12 deletions

View File

@@ -874,7 +874,15 @@ void nsBaseWidget::CreateCompositor()
{
mCompositorThread = new Thread("CompositorThread");
if (mCompositorThread->Start()) {
mCompositorParent = new CompositorParent(this, mCompositorThread->message_loop(), mCompositorThread->thread_id());
bool renderToEGLSurface = false;
#ifdef MOZ_JAVA_COMPOSITOR
renderToEGLSurface = true;
#endif
nsIntRect rect;
GetBounds(rect);
mCompositorParent =
new CompositorParent(this, mCompositorThread->message_loop(), mCompositorThread->thread_id(),
renderToEGLSurface, rect.width, rect.height);
LayerManager* lm = CreateBasicLayerManager();
MessageLoop *childMessageLoop = mCompositorThread->message_loop();
mCompositorChild = new CompositorChild(lm);