Skip to content

Commit

Permalink
Added basic composito allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeshkova committed Dec 28, 2014
1 parent b3b6d44 commit 8e0c14b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Expand Up @@ -32,6 +32,8 @@
#include "nsIFactory.h"
#include "mozilla/GenericFactory.h"
#include "mozilla/ModuleUtils.h" // for NS_GENERIC_FACTORY_CONSTRUCTOR
#include "mozilla/layers/PCompositorChild.h"


using namespace base;
using namespace mozilla::ipc;
Expand Down Expand Up @@ -154,7 +156,7 @@ PCompositorChild*
EmbedLiteAppProcessChild::AllocPCompositorChild(Transport* aTransport, ProcessId aOtherProcess)
{
LOGT();
return 0;
return CompositorChild::Create(aTransport, aOtherProcess);
}

} // namespace embedlite
Expand Down
13 changes: 12 additions & 1 deletion embedding/embedlite/embedprocess/EmbedLiteAppProcessParent.cpp
Expand Up @@ -30,6 +30,8 @@
#include "base/command_line.h"
#include "nsDirectoryService.h"
#include "nsDirectoryServiceDefs.h"
#include "mozilla/layers/CompositorParent.h"
#include "mozilla/layers/ImageBridgeParent.h"

#include "EmbedLiteViewProcessParent.h"

Expand Down Expand Up @@ -98,6 +100,15 @@ EmbedLiteAppProcessParent::EmbedLiteAppProcessParent()
extraArgs.push_back("-embedlite");
mSubprocess->LaunchAndWaitForProcessHandle(extraArgs);
Open(mSubprocess->GetChannel(), mSubprocess->GetOwnedChildProcessHandle());

mozilla::layers::CompositorParent::StartUp();
bool useOffMainThreadCompositing = !!CompositorParent::CompositorLoop();
LOGT("useOffMainThreadCompositing:%i", useOffMainThreadCompositing);
if (useOffMainThreadCompositing)
{
DebugOnly<bool> opened = PCompositor::Open(this);
MOZ_ASSERT(opened);
}
}

EmbedLiteAppProcessParent::~EmbedLiteAppProcessParent()
Expand Down Expand Up @@ -276,7 +287,7 @@ EmbedLiteAppProcessParent::AllocPCompositorParent(Transport* aTransport,
ProcessId aOtherProcess)
{
LOGT();
return 0;
return CompositorParent::Create(aTransport, aOtherProcess);
}


Expand Down
2 changes: 1 addition & 1 deletion xpcom/base/nsTraceRefcnt.cpp
Expand Up @@ -128,7 +128,7 @@ struct nsTraceRefcntStats
double mObjsOutstandingSquared;
};

#ifdef DEBUG
#ifndef DEBUG
static const char kStaticCtorDtorWarning[] =
"XPCOM objects created/destroyed from static ctor/dtor";

Expand Down

0 comments on commit 8e0c14b

Please sign in to comment.