Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "SharedPlanarYCbCrImage.h"
|
2013-08-11 16:17:23 -07:00
|
|
|
#include <stddef.h> // for size_t
|
|
|
|
#include <stdio.h> // for printf
|
2013-12-20 08:46:29 -08:00
|
|
|
#include "gfx2DGlue.h" // for Moz2D transition helpers
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "ISurfaceAllocator.h" // for ISurfaceAllocator, etc
|
|
|
|
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
|
2014-01-10 11:06:16 -08:00
|
|
|
#include "mozilla/gfx/Types.h" // for SurfaceFormat::SurfaceFormat::YUV
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc
|
|
|
|
#include "mozilla/layers/ImageClient.h" // for ImageClient
|
|
|
|
#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor, etc
|
|
|
|
#include "mozilla/layers/TextureClient.h" // for BufferTextureClient, etc
|
2013-05-23 00:17:10 -07:00
|
|
|
#include "mozilla/layers/YCbCrImageDataSerializer.h"
|
2013-10-01 20:05:35 -07:00
|
|
|
#include "mozilla/layers/ImageBridgeChild.h" // for ImageBridgeChild
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "mozilla/mozalloc.h" // for operator delete
|
|
|
|
#include "nsISupportsImpl.h" // for Image::AddRef
|
2013-11-17 18:07:08 -08:00
|
|
|
#include "mozilla/ipc/Shmem.h"
|
2013-08-11 16:17:23 -07:00
|
|
|
|
|
|
|
class gfxASurface;
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
|
|
|
using namespace mozilla::ipc;
|
|
|
|
|
2013-07-30 02:59:51 -07:00
|
|
|
SharedPlanarYCbCrImage::SharedPlanarYCbCrImage(ImageClient* aCompositable)
|
|
|
|
: PlanarYCbCrImage(nullptr)
|
2013-09-06 02:04:50 -07:00
|
|
|
, mCompositable(aCompositable)
|
2013-07-30 02:59:51 -07:00
|
|
|
{
|
2014-01-10 11:06:16 -08:00
|
|
|
mTextureClient = aCompositable->CreateBufferTextureClient(gfx::SurfaceFormat::YUV);
|
2013-07-30 02:59:51 -07:00
|
|
|
MOZ_COUNT_CTOR(SharedPlanarYCbCrImage);
|
|
|
|
}
|
|
|
|
|
|
|
|
SharedPlanarYCbCrImage::~SharedPlanarYCbCrImage() {
|
|
|
|
MOZ_COUNT_DTOR(SharedPlanarYCbCrImage);
|
2013-10-01 20:05:35 -07:00
|
|
|
|
|
|
|
if (mCompositable->GetAsyncID() != 0 &&
|
|
|
|
!InImageBridgeChildThread()) {
|
|
|
|
ImageBridgeChild::DispatchReleaseTextureClient(mTextureClient.forget().drop());
|
|
|
|
ImageBridgeChild::DispatchReleaseImageClient(mCompositable.forget().drop());
|
|
|
|
}
|
2013-07-30 02:59:51 -07:00
|
|
|
}
|
|
|
|
|
2013-12-03 10:44:38 -08:00
|
|
|
DeprecatedSharedPlanarYCbCrImage::DeprecatedSharedPlanarYCbCrImage(ISurfaceAllocator* aAllocator)
|
|
|
|
: PlanarYCbCrImage(nullptr)
|
|
|
|
, mSurfaceAllocator(aAllocator), mAllocated(false)
|
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(DeprecatedSharedPlanarYCbCrImage);
|
|
|
|
}
|
2013-07-30 02:59:51 -07:00
|
|
|
|
2013-07-24 09:08:35 -07:00
|
|
|
DeprecatedSharedPlanarYCbCrImage::~DeprecatedSharedPlanarYCbCrImage() {
|
|
|
|
MOZ_COUNT_DTOR(DeprecatedSharedPlanarYCbCrImage);
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
|
|
|
|
if (mAllocated) {
|
|
|
|
SurfaceDescriptor desc;
|
|
|
|
DropToSurfaceDescriptor(desc);
|
|
|
|
mSurfaceAllocator->DestroySharedSurface(&desc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-07-30 02:59:51 -07:00
|
|
|
TextureClient*
|
2014-02-16 14:23:39 -08:00
|
|
|
SharedPlanarYCbCrImage::GetTextureClient(CompositableClient* aClient)
|
2013-07-30 02:59:51 -07:00
|
|
|
{
|
|
|
|
return mTextureClient.get();
|
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t*
|
|
|
|
SharedPlanarYCbCrImage::GetBuffer()
|
|
|
|
{
|
|
|
|
return mTextureClient->GetBuffer();
|
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<gfxASurface>
|
2014-01-15 07:06:43 -08:00
|
|
|
SharedPlanarYCbCrImage::DeprecatedGetAsSurface()
|
2013-07-30 02:59:51 -07:00
|
|
|
{
|
|
|
|
if (!mTextureClient->IsAllocated()) {
|
|
|
|
NS_WARNING("Can't get as surface");
|
|
|
|
return nullptr;
|
|
|
|
}
|
2014-01-15 07:06:43 -08:00
|
|
|
return PlanarYCbCrImage::DeprecatedGetAsSurface();
|
2013-07-30 02:59:51 -07:00
|
|
|
}
|
|
|
|
|
2014-01-21 08:49:53 -08:00
|
|
|
TemporaryRef<gfx::SourceSurface>
|
|
|
|
SharedPlanarYCbCrImage::GetAsSourceSurface()
|
|
|
|
{
|
|
|
|
if (!mTextureClient->IsAllocated()) {
|
|
|
|
NS_WARNING("Can't get as surface");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return PlanarYCbCrImage::GetAsSourceSurface();
|
|
|
|
}
|
|
|
|
|
2013-07-30 02:59:51 -07:00
|
|
|
void
|
2013-10-01 17:57:50 -07:00
|
|
|
SharedPlanarYCbCrImage::SetData(const PlanarYCbCrData& aData)
|
2013-07-30 02:59:51 -07:00
|
|
|
{
|
|
|
|
// If mShmem has not been allocated (through Allocate(aData)), allocate it.
|
|
|
|
// This code path is slower than the one used when Allocate has been called
|
|
|
|
// since it will trigger a full copy.
|
|
|
|
if (!mTextureClient->IsAllocated()) {
|
|
|
|
Data data = aData;
|
|
|
|
if (!Allocate(data)) {
|
2013-08-08 05:53:12 -07:00
|
|
|
NS_WARNING("SharedPlanarYCbCrImage::SetData failed to allocate");
|
2013-07-30 02:59:51 -07:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
MOZ_ASSERT(mTextureClient->AsTextureClientYCbCr());
|
2014-02-19 07:53:14 -08:00
|
|
|
if (!mTextureClient->Lock(OPEN_WRITE_ONLY)) {
|
|
|
|
MOZ_ASSERT(false, "Failed to lock the texture.");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
TextureClientAutoUnlock unlock(mTextureClient);
|
2013-07-30 02:59:51 -07:00
|
|
|
if (!mTextureClient->AsTextureClientYCbCr()->UpdateYCbCr(aData)) {
|
|
|
|
MOZ_ASSERT(false, "Failed to copy YCbCr data into the TextureClient");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// do not set mBuffer like in PlanarYCbCrImage because the later
|
|
|
|
// will try to manage this memory without knowing it belongs to a
|
|
|
|
// shmem.
|
|
|
|
mBufferSize = YCbCrImageDataSerializer::ComputeMinBufferSize(mData.mYSize,
|
|
|
|
mData.mCbCrSize);
|
|
|
|
mSize = mData.mPicSize;
|
|
|
|
|
2014-02-20 13:04:13 -08:00
|
|
|
YCbCrImageDataSerializer serializer(mTextureClient->GetBuffer(), mTextureClient->GetBufferSize());
|
2013-07-30 02:59:51 -07:00
|
|
|
mData.mYChannel = serializer.GetYData();
|
|
|
|
mData.mCbChannel = serializer.GetCbData();
|
|
|
|
mData.mCrChannel = serializer.GetCrData();
|
|
|
|
mTextureClient->MarkImmutable();
|
|
|
|
}
|
|
|
|
|
|
|
|
// needs to be overriden because the parent class sets mBuffer which we
|
|
|
|
// do not want to happen.
|
|
|
|
uint8_t*
|
|
|
|
SharedPlanarYCbCrImage::AllocateAndGetNewBuffer(uint32_t aSize)
|
|
|
|
{
|
|
|
|
NS_ABORT_IF_FALSE(!mTextureClient->IsAllocated(), "This image already has allocated data");
|
|
|
|
size_t size = YCbCrImageDataSerializer::ComputeMinBufferSize(aSize);
|
2013-12-10 22:58:51 -08:00
|
|
|
|
|
|
|
// get new buffer _without_ setting mBuffer.
|
|
|
|
if (!mTextureClient->Allocate(size)) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2013-07-30 02:59:51 -07:00
|
|
|
// update buffer size
|
|
|
|
mBufferSize = size;
|
|
|
|
|
2014-02-20 13:04:13 -08:00
|
|
|
YCbCrImageDataSerializer serializer(mTextureClient->GetBuffer(), mTextureClient->GetBufferSize());
|
2013-07-30 02:59:51 -07:00
|
|
|
return serializer.GetData();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SharedPlanarYCbCrImage::SetDataNoCopy(const Data &aData)
|
|
|
|
{
|
|
|
|
mData = aData;
|
|
|
|
mSize = aData.mPicSize;
|
2013-12-16 14:33:47 -08:00
|
|
|
/* SetDataNoCopy is used to update YUV plane offsets without (re)allocating
|
|
|
|
* memory previously allocated with AllocateAndGetNewBuffer().
|
|
|
|
* serializer.GetData() returns the address of the memory previously allocated
|
|
|
|
* with AllocateAndGetNewBuffer(), that we subtract from the Y, Cb, Cr
|
|
|
|
* channels to compute 0-based offsets to pass to InitializeBufferInfo.
|
|
|
|
*/
|
2014-02-20 13:04:13 -08:00
|
|
|
YCbCrImageDataSerializer serializer(mTextureClient->GetBuffer(), mTextureClient->GetBufferSize());
|
2013-12-16 14:33:47 -08:00
|
|
|
uint8_t *base = serializer.GetData();
|
|
|
|
uint32_t yOffset = aData.mYChannel - base;
|
|
|
|
uint32_t cbOffset = aData.mCbChannel - base;
|
|
|
|
uint32_t crOffset = aData.mCrChannel - base;
|
|
|
|
serializer.InitializeBufferInfo(yOffset,
|
|
|
|
cbOffset,
|
|
|
|
crOffset,
|
2014-01-02 07:50:14 -08:00
|
|
|
aData.mYStride,
|
|
|
|
aData.mCbCrStride,
|
2013-12-16 14:33:47 -08:00
|
|
|
aData.mYSize,
|
2013-08-04 00:46:17 -07:00
|
|
|
aData.mCbCrSize,
|
|
|
|
aData.mStereoMode);
|
2013-07-30 02:59:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t*
|
|
|
|
SharedPlanarYCbCrImage::AllocateBuffer(uint32_t aSize)
|
|
|
|
{
|
|
|
|
NS_ABORT_IF_FALSE(!mTextureClient->IsAllocated(),
|
|
|
|
"This image already has allocated data");
|
|
|
|
if (!mTextureClient->Allocate(aSize)) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return mTextureClient->GetBuffer();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
SharedPlanarYCbCrImage::IsValid() {
|
|
|
|
return mTextureClient->IsAllocated();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
2013-10-01 17:57:50 -07:00
|
|
|
SharedPlanarYCbCrImage::Allocate(PlanarYCbCrData& aData)
|
2013-07-30 02:59:51 -07:00
|
|
|
{
|
|
|
|
NS_ABORT_IF_FALSE(!mTextureClient->IsAllocated(),
|
|
|
|
"This image already has allocated data");
|
|
|
|
|
|
|
|
size_t size = YCbCrImageDataSerializer::ComputeMinBufferSize(aData.mYSize,
|
|
|
|
aData.mCbCrSize);
|
|
|
|
|
|
|
|
if (AllocateBuffer(static_cast<uint32_t>(size)) == nullptr) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2014-02-20 13:04:13 -08:00
|
|
|
YCbCrImageDataSerializer serializer(mTextureClient->GetBuffer(), mTextureClient->GetBufferSize());
|
2013-07-30 02:59:51 -07:00
|
|
|
serializer.InitializeBufferInfo(aData.mYSize,
|
2013-08-04 00:46:17 -07:00
|
|
|
aData.mCbCrSize,
|
|
|
|
aData.mStereoMode);
|
2013-07-30 02:59:51 -07:00
|
|
|
MOZ_ASSERT(serializer.IsValid());
|
|
|
|
|
|
|
|
aData.mYChannel = serializer.GetYData();
|
|
|
|
aData.mCbChannel = serializer.GetCbData();
|
|
|
|
aData.mCrChannel = serializer.GetCrData();
|
|
|
|
|
|
|
|
// copy some of aData's values in mData (most of them)
|
|
|
|
mData.mYChannel = aData.mYChannel;
|
|
|
|
mData.mCbChannel = aData.mCbChannel;
|
|
|
|
mData.mCrChannel = aData.mCrChannel;
|
|
|
|
mData.mYSize = aData.mYSize;
|
|
|
|
mData.mCbCrSize = aData.mCbCrSize;
|
|
|
|
mData.mPicX = aData.mPicX;
|
|
|
|
mData.mPicY = aData.mPicY;
|
|
|
|
mData.mPicSize = aData.mPicSize;
|
|
|
|
mData.mStereoMode = aData.mStereoMode;
|
|
|
|
// those members are not always equal to aData's, due to potentially different
|
|
|
|
// packing.
|
|
|
|
mData.mYSkip = 0;
|
|
|
|
mData.mCbSkip = 0;
|
|
|
|
mData.mCrSkip = 0;
|
|
|
|
mData.mYStride = mData.mYSize.width;
|
|
|
|
mData.mCbCrStride = mData.mCbCrSize.width;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
|
|
|
|
void
|
2013-10-01 17:57:50 -07:00
|
|
|
DeprecatedSharedPlanarYCbCrImage::SetData(const PlanarYCbCrData& aData)
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
{
|
|
|
|
// If mShmem has not been allocated (through Allocate(aData)), allocate it.
|
|
|
|
// This code path is slower than the one used when Allocate has been called
|
|
|
|
// since it will trigger a full copy.
|
|
|
|
if (!mAllocated) {
|
|
|
|
Data data = aData;
|
|
|
|
if (!Allocate(data)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// do not set mBuffer like in PlanarYCbCrImage because the later
|
|
|
|
// will try to manage this memory without knowing it belongs to a
|
|
|
|
// shmem.
|
2013-05-23 00:17:10 -07:00
|
|
|
mBufferSize = YCbCrImageDataSerializer::ComputeMinBufferSize(mData.mYSize,
|
|
|
|
mData.mCbCrSize);
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
mSize = mData.mPicSize;
|
|
|
|
|
2014-02-20 13:04:13 -08:00
|
|
|
YCbCrImageDataSerializer serializer(mShmem.get<uint8_t>(), mShmem.Size<uint8_t>());
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
MOZ_ASSERT(aData.mCbSkip == aData.mCrSkip);
|
2013-05-23 00:17:10 -07:00
|
|
|
if (!serializer.CopyData(aData.mYChannel, aData.mCbChannel, aData.mCrChannel,
|
2013-12-31 01:06:12 -08:00
|
|
|
aData.mYSize, aData.mYStride,
|
|
|
|
aData.mCbCrSize, aData.mCbCrStride,
|
|
|
|
aData.mYSkip, aData.mCbSkip)) {
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
NS_WARNING("Failed to copy image data!");
|
|
|
|
}
|
2013-05-23 00:17:10 -07:00
|
|
|
mData.mYChannel = serializer.GetYData();
|
|
|
|
mData.mCbChannel = serializer.GetCbData();
|
|
|
|
mData.mCrChannel = serializer.GetCrData();
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// needs to be overriden because the parent class sets mBuffer which we
|
|
|
|
// do not want to happen.
|
|
|
|
uint8_t*
|
2013-07-24 09:08:35 -07:00
|
|
|
DeprecatedSharedPlanarYCbCrImage::AllocateAndGetNewBuffer(uint32_t aSize)
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
{
|
|
|
|
NS_ABORT_IF_FALSE(!mAllocated, "This image already has allocated data");
|
2013-05-23 00:17:10 -07:00
|
|
|
size_t size = YCbCrImageDataSerializer::ComputeMinBufferSize(aSize);
|
2013-12-10 22:58:51 -08:00
|
|
|
|
|
|
|
// get new buffer _without_ setting mBuffer.
|
|
|
|
if (!AllocateBuffer(size)) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
// update buffer size
|
|
|
|
mBufferSize = size;
|
|
|
|
|
2014-02-20 13:04:13 -08:00
|
|
|
YCbCrImageDataSerializer serializer(mShmem.get<uint8_t>(), mShmem.Size<uint8_t>());
|
2013-05-23 00:17:10 -07:00
|
|
|
return serializer.GetData();
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2013-07-24 09:08:35 -07:00
|
|
|
DeprecatedSharedPlanarYCbCrImage::SetDataNoCopy(const Data &aData)
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
{
|
|
|
|
mData = aData;
|
|
|
|
mSize = aData.mPicSize;
|
2014-02-20 13:04:13 -08:00
|
|
|
YCbCrImageDataSerializer serializer(mShmem.get<uint8_t>(), mShmem.Size<uint8_t>());
|
2013-05-23 00:17:10 -07:00
|
|
|
serializer.InitializeBufferInfo(aData.mYSize,
|
2013-08-04 00:46:17 -07:00
|
|
|
aData.mCbCrSize,
|
|
|
|
aData.mStereoMode);
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t*
|
2013-07-24 09:08:35 -07:00
|
|
|
DeprecatedSharedPlanarYCbCrImage::AllocateBuffer(uint32_t aSize)
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
{
|
|
|
|
NS_ABORT_IF_FALSE(!mAllocated, "This image already has allocated data");
|
|
|
|
SharedMemory::SharedMemoryType shmType = OptimalShmemType();
|
|
|
|
if (!mSurfaceAllocator->AllocUnsafeShmem(aSize, shmType, &mShmem)) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
mAllocated = true;
|
|
|
|
return mShmem.get<uint8_t>();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
2013-10-01 17:57:50 -07:00
|
|
|
DeprecatedSharedPlanarYCbCrImage::Allocate(PlanarYCbCrData& aData)
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
{
|
|
|
|
NS_ABORT_IF_FALSE(!mAllocated, "This image already has allocated data");
|
|
|
|
|
2013-05-23 00:17:10 -07:00
|
|
|
size_t size = YCbCrImageDataSerializer::ComputeMinBufferSize(aData.mYSize,
|
|
|
|
aData.mCbCrSize);
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
|
|
|
|
if (AllocateBuffer(static_cast<uint32_t>(size)) == nullptr) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2014-02-20 13:04:13 -08:00
|
|
|
YCbCrImageDataSerializer serializer(mShmem.get<uint8_t>(), mShmem.Size<uint8_t>());
|
2013-05-23 00:17:10 -07:00
|
|
|
serializer.InitializeBufferInfo(aData.mYSize,
|
2013-08-04 00:46:17 -07:00
|
|
|
aData.mCbCrSize,
|
|
|
|
aData.mStereoMode);
|
2013-05-23 00:17:10 -07:00
|
|
|
if (!serializer.IsValid() || mShmem.Size<uint8_t>() < size) {
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
mSurfaceAllocator->DeallocShmem(mShmem);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2013-05-23 00:17:10 -07:00
|
|
|
aData.mYChannel = serializer.GetYData();
|
|
|
|
aData.mCbChannel = serializer.GetCbData();
|
|
|
|
aData.mCrChannel = serializer.GetCrData();
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
|
|
|
|
// copy some of aData's values in mData (most of them)
|
|
|
|
mData.mYChannel = aData.mYChannel;
|
|
|
|
mData.mCbChannel = aData.mCbChannel;
|
|
|
|
mData.mCrChannel = aData.mCrChannel;
|
|
|
|
mData.mYSize = aData.mYSize;
|
|
|
|
mData.mCbCrSize = aData.mCbCrSize;
|
|
|
|
mData.mPicX = aData.mPicX;
|
|
|
|
mData.mPicY = aData.mPicY;
|
|
|
|
mData.mPicSize = aData.mPicSize;
|
|
|
|
mData.mStereoMode = aData.mStereoMode;
|
|
|
|
// those members are not always equal to aData's, due to potentially different
|
|
|
|
// packing.
|
|
|
|
mData.mYSkip = 0;
|
|
|
|
mData.mCbSkip = 0;
|
|
|
|
mData.mCrSkip = 0;
|
|
|
|
mData.mYStride = mData.mYSize.width;
|
|
|
|
mData.mCbCrStride = mData.mCbCrSize.width;
|
|
|
|
|
|
|
|
mAllocated = true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
2013-07-24 09:08:35 -07:00
|
|
|
DeprecatedSharedPlanarYCbCrImage::ToSurfaceDescriptor(SurfaceDescriptor& aDesc) {
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
if (!mAllocated) {
|
|
|
|
return false;
|
|
|
|
}
|
2013-05-23 00:17:10 -07:00
|
|
|
aDesc = YCbCrImage(mShmem, reinterpret_cast<uint64_t>(this));
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
this->AddRef();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
2013-07-24 09:08:35 -07:00
|
|
|
DeprecatedSharedPlanarYCbCrImage::DropToSurfaceDescriptor(SurfaceDescriptor& aDesc) {
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
if (!mAllocated) {
|
|
|
|
return false;
|
|
|
|
}
|
2013-05-23 00:17:10 -07:00
|
|
|
aDesc = YCbCrImage(mShmem, 0);
|
2013-11-17 18:07:08 -08:00
|
|
|
mShmem = mozilla::ipc::Shmem();
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
mAllocated = false;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2013-07-24 09:08:35 -07:00
|
|
|
DeprecatedSharedPlanarYCbCrImage*
|
|
|
|
DeprecatedSharedPlanarYCbCrImage::FromSurfaceDescriptor(const SurfaceDescriptor& aDescriptor)
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
{
|
|
|
|
if (aDescriptor.type() != SurfaceDescriptor::TYCbCrImage) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
const YCbCrImage& ycbcr = aDescriptor.get_YCbCrImage();
|
|
|
|
if (ycbcr.owner() == 0) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
2013-07-24 09:08:35 -07:00
|
|
|
return reinterpret_cast<DeprecatedSharedPlanarYCbCrImage*>(ycbcr.owner());
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 02:20:52 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
} // namespace
|