Build fixes and clean up

This commit is contained in:
Benoit Girard 2012-02-08 12:08:03 -05:00
parent 67c4b7f7be
commit 0fc7c92286
2 changed files with 8 additions and 23 deletions

View File

@ -52,9 +52,9 @@ namespace mozilla {
namespace layers {
CompositorParent::CompositorParent(nsIWidget* aWidget)
: mPaused(false)
, mWidget(aWidget)
: mWidget(aWidget)
, mCurrentCompositeTask(NULL)
, mPaused(false)
{
MOZ_COUNT_CTOR(CompositorParent);
}
@ -182,13 +182,18 @@ CompositorParent::Composite()
printf_stderr("Correcting for position fixed %i, %i\n", -mScrollOffset.x, -mScrollOffset.y);
worldTransform.Translate(offset);
worldTransform.Scale(mXScale, mYScale, 1.0f);
#ifdef MOZ_WIDGET_ANDROID
Layer* layer = GetPrimaryScrollableLayer();
#else
Layer* root = mLayerManager->GetRoot();
#endif
layer->AsShadowLayer()->SetShadowTransform(worldTransform);
mLayerManager->EndEmptyTransaction();
mLastCompose = mozilla::TimeStamp::Now();
}
#ifdef MOZ_WIDGET_ANDROID
// Do a breadth-first search to find the first layer in the tree with a
// displayport set.
Layer*
@ -218,6 +223,7 @@ CompositorParent::GetPrimaryScrollableLayer()
return root;
}
#endif
// Go down shadow layer tree, setting properties to match their non-shadow
// counterparts.
@ -411,12 +417,6 @@ CompositorParent::TestScroll()
PLayersParent*
CompositorParent::AllocPLayers(const LayersBackend &backendType)
{
#ifdef MOZ_WIDGET_ANDROID
// Registering with the compositor will create the surface view that
// the layer manager expects to attach to.
//RegisterCompositorWithJava();
#endif
if (backendType == LayerManager::LAYERS_OPENGL) {
nsRefPtr<LayerManagerOGL> layerManager = new LayerManagerOGL(mWidget);
mWidget = NULL;
@ -445,14 +445,6 @@ CompositorParent::DeallocPLayers(PLayersParent* actor)
return true;
}
#ifdef MOZ_WIDGET_ANDROID
void
CompositorParent::RegisterCompositorWithJava()
{
mozilla::AndroidBridge::Bridge()->RegisterCompositor();
}
#endif
} // namespace layers
} // namespace mozilla

View File

@ -114,13 +114,6 @@ private:
// Platform specific functions
#ifdef MOZ_WIDGET_ANDROID
/**
* Register the compositor thread with the Java native thread.
* This will replace the temporary compositor with the real
* Gecko compositor thread.
**/
void RegisterCompositorWithJava();
/**
* Asks Java for the viewport position and updates the world transform
* accordingly.