Skip to content

Commit

Permalink
Implemented basic compositor initialization using standard gecko cros…
Browse files Browse the repository at this point in the history
…s process compositor with few tricks
  • Loading branch information
tmeshkova committed Jan 7, 2015
1 parent deb051e commit 229a25d
Show file tree
Hide file tree
Showing 16 changed files with 121 additions and 336 deletions.
4 changes: 4 additions & 0 deletions embedding/embedlite/EmbedLiteApp.cpp
Expand Up @@ -28,6 +28,9 @@
#include "EmbedLiteAppProcessParent.h"

namespace mozilla {
namespace startup {
extern bool sIsEmbedlite;
}
namespace embedlite {

EmbedLiteApp* EmbedLiteApp::sSingleton = nullptr;
Expand Down Expand Up @@ -57,6 +60,7 @@ EmbedLiteApp::EmbedLiteApp()
, mIsAsyncLoop(false)
{
LOGT();
mozilla::startup::sIsEmbedlite = true;
sSingleton = this;
}

Expand Down
29 changes: 27 additions & 2 deletions embedding/embedlite/embedprocess/EmbedLiteAppProcessParent.cpp
Expand Up @@ -34,7 +34,6 @@
#include "mozilla/layers/ImageBridgeParent.h"

#include "EmbedLiteViewProcessParent.h"
#include "EmbedLiteCompositorProcessParent.h"

static BrowserProcessSubThread* sIOThread;

Expand All @@ -50,6 +49,31 @@ using namespace mozilla::net;
namespace mozilla {
namespace embedlite {

// Temporary manager which allows to call InitLog
class EmbedLiteAppProcessParentManager MOZ_FINAL : public mozilla::layers::LayerManager
{
public:
explicit EmbedLiteAppProcessParentManager()
{
mozilla::layers::LayerManager::InitLog();
}

protected:
virtual void BeginTransaction() {}
virtual void BeginTransactionWithTarget(gfxContext*) {}
virtual bool EndEmptyTransaction(mozilla::layers::LayerManager::EndTransactionFlags) { return false; }
virtual void EndTransaction(mozilla::layers::LayerManager::DrawPaintedLayerCallback, void*, mozilla::layers::LayerManager::EndTransactionFlags) {}
virtual void SetRoot(mozilla::layers::Layer*) {}
virtual already_AddRefed<mozilla::layers::PaintedLayer> CreatePaintedLayer() { return nullptr; }
virtual already_AddRefed<mozilla::layers::ContainerLayer> CreateContainerLayer() { return nullptr; }
virtual already_AddRefed<mozilla::layers::ImageLayer> CreateImageLayer() { return nullptr; }
virtual already_AddRefed<mozilla::layers::ColorLayer> CreateColorLayer() { return nullptr; }
virtual already_AddRefed<mozilla::layers::CanvasLayer> CreateCanvasLayer() { return nullptr; }
virtual mozilla::layers::LayersBackend GetBackendType() { return LayersBackend::LAYERS_OPENGL; }
virtual int32_t GetMaxTextureSize() const { return 0; }
virtual void GetBackendName(nsAString_internal&) {}
};

EmbedLiteAppProcessParent*
EmbedLiteAppProcessParent::CreateEmbedLiteAppProcessParent()
{
Expand Down Expand Up @@ -295,7 +319,8 @@ EmbedLiteAppProcessParent::AllocPCompositorParent(Transport* aTransport,
ProcessId aOtherProcess)
{
LOGT();
return EmbedLiteCompositorProcessParent::Create(aTransport, aOtherProcess);
RefPtr<EmbedLiteAppProcessParentManager> mgr = new EmbedLiteAppProcessParentManager(); // Dummy manager in order to initialize layers log, fix me by creating proper manager for this process type
return CompositorParent::Create(aTransport, aOtherProcess);
}


Expand Down
210 changes: 0 additions & 210 deletions embedding/embedlite/embedprocess/EmbedLiteCompositorProcessParent.cpp

This file was deleted.

114 changes: 0 additions & 114 deletions embedding/embedlite/embedprocess/EmbedLiteCompositorProcessParent.h

This file was deleted.

0 comments on commit 229a25d

Please sign in to comment.