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 "mozilla/layers/CompositableClient.h"
|
2013-08-11 16:17:23 -07:00
|
|
|
#include <stdint.h> // for uint64_t, uint32_t
|
|
|
|
#include "gfxPlatform.h" // for gfxPlatform
|
2013-08-11 19:21:17 -07:00
|
|
|
#include "mozilla/layers/CompositableForwarder.h"
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "mozilla/layers/TextureClient.h" // for DeprecatedTextureClient, etc
|
|
|
|
#include "mozilla/layers/TextureClientOGL.h"
|
|
|
|
#include "mozilla/mozalloc.h" // for operator delete, etc
|
2013-09-23 18:14:12 -07:00
|
|
|
#include "gfxASurface.h" // for gfxContentType
|
2013-05-03 10:34:29 -07:00
|
|
|
#ifdef XP_WIN
|
2014-03-07 13:34:04 -08:00
|
|
|
#include "gfxWindowsPlatform.h" // for gfxWindowsPlatform
|
2013-05-03 10:34:29 -07:00
|
|
|
#include "mozilla/layers/TextureD3D11.h"
|
2014-03-07 13:34:04 -08:00
|
|
|
#include "mozilla/layers/TextureD3D9.h"
|
2014-02-13 06:46:59 -08:00
|
|
|
#endif
|
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
|
|
|
|
2013-12-05 10:39:22 -08:00
|
|
|
using namespace mozilla::gfx;
|
|
|
|
|
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 {
|
|
|
|
|
2014-03-07 13:34:04 -08:00
|
|
|
CompositableClient::CompositableClient(CompositableForwarder* aForwarder,
|
|
|
|
TextureFlags aTextureFlags)
|
2013-12-11 17:44:47 -08:00
|
|
|
: mCompositableChild(nullptr)
|
2013-07-30 02:59:51 -07:00
|
|
|
, mForwarder(aForwarder)
|
2014-03-07 13:34:04 -08:00
|
|
|
, mTextureFlags(aTextureFlags)
|
2013-07-30 02:59:51 -07:00
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(CompositableClient);
|
|
|
|
}
|
|
|
|
|
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
|
|
|
CompositableClient::~CompositableClient()
|
|
|
|
{
|
|
|
|
MOZ_COUNT_DTOR(CompositableClient);
|
|
|
|
Destroy();
|
2013-09-12 07:50:35 -07:00
|
|
|
}
|
|
|
|
|
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
|
|
|
LayersBackend
|
|
|
|
CompositableClient::GetCompositorBackendType() const
|
|
|
|
{
|
|
|
|
return mForwarder->GetCompositorBackendType();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CompositableClient::SetIPDLActor(CompositableChild* aChild)
|
|
|
|
{
|
|
|
|
mCompositableChild = aChild;
|
|
|
|
}
|
|
|
|
|
|
|
|
CompositableChild*
|
|
|
|
CompositableClient::GetIPDLActor() const
|
|
|
|
{
|
|
|
|
return mCompositableChild;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
CompositableClient::Connect()
|
|
|
|
{
|
|
|
|
if (!GetForwarder() || GetIPDLActor()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
GetForwarder()->Connect(this);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CompositableClient::Destroy()
|
|
|
|
{
|
|
|
|
if (!mCompositableChild) {
|
|
|
|
return;
|
|
|
|
}
|
2013-09-27 02:48:42 -07:00
|
|
|
mCompositableChild->SetClient(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
|
|
|
mCompositableChild->Destroy();
|
|
|
|
mCompositableChild = nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint64_t
|
|
|
|
CompositableClient::GetAsyncID() const
|
|
|
|
{
|
|
|
|
if (mCompositableChild) {
|
|
|
|
return mCompositableChild->GetAsyncID();
|
|
|
|
}
|
|
|
|
return 0; // zero is always an invalid async ID
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
CompositableChild::Destroy()
|
|
|
|
{
|
|
|
|
Send__delete__(this);
|
|
|
|
}
|
|
|
|
|
2013-07-08 14:30:44 -07:00
|
|
|
TemporaryRef<DeprecatedTextureClient>
|
2013-09-23 18:14:12 -07:00
|
|
|
CompositableClient::CreateDeprecatedTextureClient(DeprecatedTextureClientType aDeprecatedTextureClientType,
|
2013-09-24 13:45:13 -07:00
|
|
|
gfxContentType aContentType)
|
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(GetForwarder(), "Can't create a texture client if the compositable is not connected to the compositor.");
|
|
|
|
LayersBackend parentBackend = GetForwarder()->GetCompositorBackendType();
|
2013-07-08 14:30:44 -07:00
|
|
|
RefPtr<DeprecatedTextureClient> result;
|
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
|
|
|
|
2013-07-08 14:30:44 -07:00
|
|
|
switch (aDeprecatedTextureClientType) {
|
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
|
|
|
case TEXTURE_SHARED_GL:
|
|
|
|
case TEXTURE_SHARED_GL_EXTERNAL:
|
|
|
|
case TEXTURE_STREAM_GL:
|
2014-02-04 12:47:20 -08:00
|
|
|
MOZ_CRASH("Unsupported. this should not be reached");
|
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
|
|
|
case TEXTURE_YCBCR:
|
2014-02-04 12:47:20 -08:00
|
|
|
if (parentBackend == LayersBackend::LAYERS_D3D9 ||
|
2014-01-23 10:26:41 -08:00
|
|
|
parentBackend == LayersBackend::LAYERS_D3D11 ||
|
|
|
|
parentBackend == LayersBackend::LAYERS_BASIC) {
|
2013-07-08 14:30:44 -07:00
|
|
|
result = new DeprecatedTextureClientShmemYCbCr(GetForwarder(), GetTextureInfo());
|
2014-02-04 12:47:20 -08:00
|
|
|
} else {
|
|
|
|
MOZ_CRASH("Unsupported. this should not be reached");
|
2013-04-30 17:42:05 -07:00
|
|
|
}
|
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
|
|
|
break;
|
|
|
|
case TEXTURE_CONTENT:
|
2013-05-03 10:34:29 -07:00
|
|
|
#ifdef XP_WIN
|
2014-01-23 10:26:41 -08:00
|
|
|
if (parentBackend == LayersBackend::LAYERS_D3D11 && gfxWindowsPlatform::GetPlatform()->GetD2DDevice()) {
|
2013-07-08 14:30:44 -07:00
|
|
|
result = new DeprecatedTextureClientD3D11(GetForwarder(), GetTextureInfo());
|
2013-05-03 10:34:29 -07:00
|
|
|
break;
|
|
|
|
}
|
2014-01-23 10:26:41 -08:00
|
|
|
if (parentBackend == LayersBackend::LAYERS_D3D9 &&
|
2014-03-07 13:34:04 -08:00
|
|
|
GetForwarder()->IsSameProcess()) {
|
2013-11-21 14:07:57 -08:00
|
|
|
// We can't use a d3d9 texture for an RGBA surface because we cannot get a DC for
|
|
|
|
// for a gfxWindowsSurface.
|
|
|
|
// We have to wait for the compositor thread to create a d3d9 device before we
|
|
|
|
// can create d3d9 textures on the main thread (because we need to reset on the
|
|
|
|
// compositor thread, and the d3d9 device must be reset on the same thread it was
|
|
|
|
// created on).
|
2014-01-23 10:26:40 -08:00
|
|
|
if (aContentType == gfxContentType::COLOR_ALPHA ||
|
2013-11-21 14:07:57 -08:00
|
|
|
!gfxWindowsPlatform::GetPlatform()->GetD3D9Device()) {
|
2013-09-23 18:14:12 -07:00
|
|
|
result = new DeprecatedTextureClientDIB(GetForwarder(), GetTextureInfo());
|
|
|
|
} else {
|
|
|
|
result = new DeprecatedTextureClientD3D9(GetForwarder(), GetTextureInfo());
|
|
|
|
}
|
2013-08-04 00:46:17 -07:00
|
|
|
break;
|
|
|
|
}
|
2013-05-03 10:34:29 -07:00
|
|
|
#endif
|
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
|
|
|
// fall through to TEXTURE_SHMEM
|
|
|
|
case TEXTURE_SHMEM:
|
2013-07-08 14:30:44 -07:00
|
|
|
result = new DeprecatedTextureClientShmem(GetForwarder(), GetTextureInfo());
|
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
|
|
|
break;
|
2013-08-04 00:46:17 -07:00
|
|
|
case TEXTURE_FALLBACK:
|
|
|
|
#ifdef XP_WIN
|
2014-01-23 10:26:41 -08:00
|
|
|
if (parentBackend == LayersBackend::LAYERS_D3D11 ||
|
|
|
|
parentBackend == LayersBackend::LAYERS_D3D9) {
|
2013-08-04 00:46:17 -07:00
|
|
|
result = new DeprecatedTextureClientShmem(GetForwarder(), GetTextureInfo());
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
break;
|
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
|
|
|
default:
|
|
|
|
MOZ_ASSERT(false, "Unhandled texture client type");
|
|
|
|
}
|
|
|
|
|
2013-04-30 17:42:05 -07:00
|
|
|
// If we couldn't create an appropriate texture client,
|
|
|
|
// then return nullptr so the caller can chose another
|
|
|
|
// type.
|
|
|
|
if (!result) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2013-07-08 14:30:44 -07:00
|
|
|
MOZ_ASSERT(result->SupportsType(aDeprecatedTextureClientType),
|
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
|
|
|
"Created the wrong texture client?");
|
2013-04-12 00:28:55 -07:00
|
|
|
result->SetFlags(GetTextureInfo().mTextureFlags);
|
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
|
|
|
|
|
|
|
return result.forget();
|
|
|
|
}
|
|
|
|
|
2013-07-30 02:59:51 -07:00
|
|
|
TemporaryRef<BufferTextureClient>
|
2013-12-05 10:39:22 -08:00
|
|
|
CompositableClient::CreateBufferTextureClient(SurfaceFormat aFormat,
|
2014-03-17 14:35:20 -07:00
|
|
|
TextureFlags aTextureFlags,
|
|
|
|
gfx::BackendType aMoz2DBackend)
|
2013-07-30 02:59:51 -07:00
|
|
|
{
|
2014-03-07 13:34:04 -08:00
|
|
|
return TextureClient::CreateBufferTextureClient(GetForwarder(), aFormat,
|
2014-03-17 14:35:20 -07:00
|
|
|
aTextureFlags | mTextureFlags,
|
|
|
|
aMoz2DBackend);
|
2014-02-13 06:46:59 -08:00
|
|
|
}
|
|
|
|
|
2013-12-05 10:39:22 -08:00
|
|
|
TemporaryRef<TextureClient>
|
|
|
|
CompositableClient::CreateTextureClientForDrawing(SurfaceFormat aFormat,
|
2014-03-12 05:16:37 -07:00
|
|
|
TextureFlags aTextureFlags,
|
2014-03-17 14:35:20 -07:00
|
|
|
gfx::BackendType aMoz2DBackend,
|
2014-03-12 05:16:37 -07:00
|
|
|
const IntSize& aSizeHint)
|
2013-12-05 10:39:22 -08:00
|
|
|
{
|
2014-03-07 13:34:04 -08:00
|
|
|
return TextureClient::CreateTextureClientForDrawing(GetForwarder(), aFormat,
|
2014-03-12 05:16:37 -07:00
|
|
|
aTextureFlags | mTextureFlags,
|
2014-03-17 14:35:20 -07:00
|
|
|
aMoz2DBackend,
|
2014-03-12 05:16:37 -07:00
|
|
|
aSizeHint);
|
2013-12-05 10:39:22 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
CompositableClient::AddTextureClient(TextureClient* aClient)
|
|
|
|
{
|
2013-12-11 17:44:44 -08:00
|
|
|
return aClient->InitIPDLActor(mForwarder);
|
2013-12-11 11:52:50 -08:00
|
|
|
}
|
|
|
|
|
2013-07-30 02:59:51 -07:00
|
|
|
void
|
|
|
|
CompositableClient::OnTransaction()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
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 layers
|
|
|
|
} // namespace mozilla
|