Bug 871150 - Call IdentifyTextureHost on ImageBridgeChild so that we create appropriate textures for the compositor. r=nical

This commit is contained in:
Matt Woodrow 2013-06-24 17:28:22 +12:00
Родитель 1cff1e2f07
Коммит 58a83c3cf9
4 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -21,6 +21,7 @@
#include "mozilla/ipc/FileDescriptorUtils.h"
#include "mozilla/layers/AsyncPanZoomController.h"
#include "mozilla/layers/CompositorChild.h"
#include "mozilla/layers/ImageBridgeChild.h"
#include "mozilla/layers/PLayerTransactionChild.h"
#include "mozilla/layout/RenderFrameChild.h"
#include "mozilla/StaticPtr.h"
@ -2176,6 +2177,7 @@ TabChild::InitRenderingState()
NS_ABORT_IF_FALSE(lf && lf->HasShadowManager(),
"PuppetWidget should have shadow manager");
lf->IdentifyTextureHost(mTextureFactoryIdentifier);
ImageBridgeChild::IdentifyCompositorTextureHost(mTextureFactoryIdentifier);
mRemoteFrame = remoteFrame;

Просмотреть файл

@ -480,6 +480,14 @@ void ImageBridgeChild::ConnectAsync(ImageBridgeParent* aParent)
this, aParent));
}
void
ImageBridgeChild::IdentifyCompositorTextureHost(const TextureFactoryIdentifier& aIdentifier)
{
if (sImageBridgeChildSingleton) {
sImageBridgeChildSingleton->IdentifyTextureHost(aIdentifier);
}
}
TemporaryRef<ImageClient>
ImageBridgeChild::CreateImageClient(CompositableType aType)
{
@ -504,8 +512,6 @@ ImageBridgeChild::CreateImageClient(CompositableType aType)
TemporaryRef<ImageClient>
ImageBridgeChild::CreateImageClientNow(CompositableType aType)
{
mCompositorBackend = LAYERS_OPENGL;
RefPtr<ImageClient> client
= ImageClient::CreateImageClient(aType, this, 0);
MOZ_ASSERT(client, "failed to create ImageClient");

Просмотреть файл

@ -148,6 +148,8 @@ public:
*/
void ConnectAsync(ImageBridgeParent* aParent);
static void IdentifyCompositorTextureHost(const TextureFactoryIdentifier& aIdentifier);
void BeginTransaction();
void EndTransaction();

Просмотреть файл

@ -7,6 +7,7 @@
#include "mozilla/layers/CompositorChild.h"
#include "mozilla/layers/CompositorParent.h"
#include "mozilla/layers/ImageBridgeChild.h"
#include "nsBaseWidget.h"
#include "nsDeviceContext.h"
#include "nsCOMPtr.h"
@ -952,6 +953,7 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
}
lf->SetShadowManager(shadowManager);
lf->IdentifyTextureHost(textureFactoryIdentifier);
ImageBridgeChild::IdentifyCompositorTextureHost(textureFactoryIdentifier);
mLayerManager = lm;
return;