Bug 1311644 - Pass ImageBridge as allocator to create YCbCr texture client, r=nical

MozReview-Commit-ID: 4P5LyWST0yv

--HG--
extra : rebase_source : 197e61e256858bc25cc8be7638bdb0eb39cf0cf5
This commit is contained in:
peter chang 2016-11-08 15:22:36 +08:00
Родитель 1626104a4c
Коммит c62a36256a
1 изменённых файлов: 12 добавлений и 2 удалений

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

@ -8,9 +8,10 @@
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/Tools.h"
#include "mozilla/layers/BufferTexture.h"
#include "mozilla/layers/ImageBridgeChild.h" // for ImageBridgeChild
#include "mozilla/layers/TextureClient.h"
#include "mozilla/layers/TextureHost.h"
#include "mozilla/layers/BufferTexture.h"
#include "mozilla/RefPtr.h"
#include "gfx2DGlue.h"
#include "gfxImageSurface.h"
@ -266,7 +267,16 @@ TEST(Layers, TextureYCbCrSerialization) {
clientData.mPicX = 0;
clientData.mPicX = 0;
RefPtr<TextureClient> client = TextureClient::CreateForYCbCr(nullptr, clientData.mYSize, clientData.mCbCrSize,
ImageBridgeChild::InitSameProcess();
// wait until IPDL connection
#ifdef XP_WIN
Sleep(1);
#else
sleep(1);
#endif
RefPtr<ImageBridgeChild> imageBridge = ImageBridgeChild::GetSingleton();
RefPtr<TextureClient> client = TextureClient::CreateForYCbCr(imageBridge, clientData.mYSize, clientData.mCbCrSize,
StereoMode::MONO, YUVColorSpace::BT601,
TextureFlags::DEALLOCATE_CLIENT);