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 "ImageHost.h"
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "LayersLogging.h" // for AppendToString
|
|
|
|
#include "composite/CompositableHost.h" // for CompositableHost, etc
|
|
|
|
#include "ipc/IPCMessageUtils.h" // for null_t
|
|
|
|
#include "mozilla/layers/Compositor.h" // for Compositor
|
|
|
|
#include "mozilla/layers/Effects.h" // for TexturedEffect, Effect, etc
|
|
|
|
#include "nsAString.h"
|
|
|
|
#include "nsDebug.h" // for NS_WARNING, NS_ASSERTION
|
|
|
|
#include "nsPrintfCString.h" // for nsPrintfCString
|
|
|
|
#include "nsString.h" // for nsAutoCString
|
|
|
|
|
|
|
|
class nsIntRegion;
|
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 {
|
2013-08-11 16:17:23 -07:00
|
|
|
namespace gfx {
|
|
|
|
class Matrix4x4;
|
|
|
|
}
|
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
|
|
|
|
|
|
|
using namespace gfx;
|
|
|
|
|
|
|
|
namespace layers {
|
|
|
|
|
2013-08-11 16:17:23 -07:00
|
|
|
class ISurfaceAllocator;
|
|
|
|
|
2013-07-30 02:59:51 -07:00
|
|
|
ImageHost::ImageHost(const TextureInfo& aTextureInfo)
|
|
|
|
: CompositableHost(aTextureInfo)
|
|
|
|
, mFrontBuffer(nullptr)
|
|
|
|
, mHasPictureRect(false)
|
|
|
|
{}
|
|
|
|
|
|
|
|
ImageHost::~ImageHost() {}
|
|
|
|
|
|
|
|
void
|
|
|
|
ImageHost::UseTextureHost(TextureHost* aTexture)
|
|
|
|
{
|
|
|
|
mFrontBuffer = aTexture;
|
|
|
|
}
|
|
|
|
|
2013-09-12 07:50:35 -07:00
|
|
|
void
|
2013-12-05 10:39:22 -08:00
|
|
|
ImageHost::RemoveTextureHost(TextureHost* aTexture)
|
2013-09-12 07:50:35 -07:00
|
|
|
{
|
2013-12-05 10:39:22 -08:00
|
|
|
CompositableHost::RemoveTextureHost(aTexture);
|
|
|
|
if (mFrontBuffer && mFrontBuffer->GetID() == aTexture->GetID()) {
|
2013-09-12 07:50:35 -07:00
|
|
|
mFrontBuffer = nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-07-30 02:59:51 -07:00
|
|
|
TextureHost*
|
2013-12-05 10:39:22 -08:00
|
|
|
ImageHost::GetAsTextureHost()
|
2013-07-30 02:59:51 -07:00
|
|
|
{
|
|
|
|
return mFrontBuffer;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ImageHost::Composite(EffectChain& aEffectChain,
|
|
|
|
float aOpacity,
|
|
|
|
const gfx::Matrix4x4& aTransform,
|
|
|
|
const gfx::Filter& aFilter,
|
|
|
|
const gfx::Rect& aClipRect,
|
|
|
|
const nsIntRegion* aVisibleRegion,
|
|
|
|
TiledLayerProperties* aLayerProperties)
|
|
|
|
{
|
|
|
|
if (!GetCompositor()) {
|
|
|
|
// should only happen when a tab is dragged to another window and
|
|
|
|
// async-video is still sending frames but we haven't attached the
|
|
|
|
// set the new compositor yet.
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (!mFrontBuffer) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (!mFrontBuffer->Lock()) {
|
|
|
|
NS_WARNING("failed to lock front buffer");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
RefPtr<NewTextureSource> source = mFrontBuffer->GetTextureSources();
|
|
|
|
if (!source) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
RefPtr<TexturedEffect> effect = CreateTexturedEffect(mFrontBuffer->GetFormat(),
|
|
|
|
source,
|
|
|
|
aFilter);
|
2013-11-21 14:07:56 -08:00
|
|
|
if (!effect) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-07-30 02:59:51 -07:00
|
|
|
aEffectChain.mPrimaryEffect = effect;
|
2013-08-02 15:50:17 -07:00
|
|
|
IntSize textureSize = source->GetSize();
|
|
|
|
gfx::Rect gfxPictureRect
|
|
|
|
= mHasPictureRect ? gfx::Rect(0, 0, mPictureRect.width, mPictureRect.height)
|
|
|
|
: gfx::Rect(0, 0, textureSize.width, textureSize.height);
|
2013-08-01 18:12:16 -07:00
|
|
|
|
|
|
|
gfx::Rect pictureRect(0, 0,
|
|
|
|
mPictureRect.width,
|
|
|
|
mPictureRect.height);
|
|
|
|
//XXX: We might have multiple texture sources here (e.g. 3 YCbCr textures), and we're
|
|
|
|
// only iterating over the tiles of the first one. Are we assuming that the tiling
|
|
|
|
// will be identical? Can we ensure that somehow?
|
2013-07-30 02:59:51 -07:00
|
|
|
TileIterator* it = source->AsTileIterator();
|
|
|
|
if (it) {
|
|
|
|
it->BeginTileIteration();
|
|
|
|
do {
|
|
|
|
nsIntRect tileRect = it->GetTileRect();
|
|
|
|
gfx::Rect rect(tileRect.x, tileRect.y, tileRect.width, tileRect.height);
|
2013-08-01 18:12:16 -07:00
|
|
|
if (mHasPictureRect) {
|
|
|
|
rect = rect.Intersect(pictureRect);
|
|
|
|
effect->mTextureCoords = Rect(Float(rect.x - tileRect.x)/ tileRect.width,
|
|
|
|
Float(rect.y - tileRect.y) / tileRect.height,
|
|
|
|
Float(rect.width) / tileRect.width,
|
|
|
|
Float(rect.height) / tileRect.height);
|
|
|
|
} else {
|
|
|
|
effect->mTextureCoords = Rect(0, 0, 1, 1);
|
|
|
|
}
|
2013-07-30 02:59:51 -07:00
|
|
|
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
2013-11-07 01:53:08 -08:00
|
|
|
aOpacity, aTransform);
|
2013-08-02 15:50:17 -07:00
|
|
|
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE|DIAGNOSTIC_BIGIMAGE,
|
2013-11-07 01:53:08 -08:00
|
|
|
rect, aClipRect, aTransform);
|
2013-07-30 02:59:51 -07:00
|
|
|
} while (it->NextTile());
|
|
|
|
it->EndTileIteration();
|
2013-08-02 15:50:17 -07:00
|
|
|
// layer border
|
|
|
|
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE,
|
|
|
|
gfxPictureRect, aClipRect,
|
2013-11-07 01:53:08 -08:00
|
|
|
aTransform);
|
2013-07-30 02:59:51 -07:00
|
|
|
} else {
|
|
|
|
IntSize textureSize = source->GetSize();
|
2013-08-01 18:12:16 -07:00
|
|
|
gfx::Rect rect;
|
2013-07-30 02:59:51 -07:00
|
|
|
if (mHasPictureRect) {
|
|
|
|
effect->mTextureCoords = Rect(Float(mPictureRect.x) / textureSize.width,
|
|
|
|
Float(mPictureRect.y) / textureSize.height,
|
|
|
|
Float(mPictureRect.width) / textureSize.width,
|
|
|
|
Float(mPictureRect.height) / textureSize.height);
|
2013-08-01 18:12:16 -07:00
|
|
|
rect = pictureRect;
|
2013-07-30 02:59:51 -07:00
|
|
|
} else {
|
|
|
|
effect->mTextureCoords = Rect(0, 0, 1, 1);
|
|
|
|
rect = gfx::Rect(0, 0, textureSize.width, textureSize.height);
|
|
|
|
}
|
|
|
|
|
2013-08-06 10:36:35 -07:00
|
|
|
if (mFrontBuffer->GetFlags() & TEXTURE_NEEDS_Y_FLIP) {
|
2013-07-30 02:59:51 -07:00
|
|
|
effect->mTextureCoords.y = effect->mTextureCoords.YMost();
|
|
|
|
effect->mTextureCoords.height = -effect->mTextureCoords.height;
|
|
|
|
}
|
|
|
|
|
|
|
|
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
2013-11-07 01:53:08 -08:00
|
|
|
aOpacity, aTransform);
|
2013-08-02 15:50:17 -07:00
|
|
|
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE,
|
|
|
|
rect, aClipRect,
|
2013-11-07 01:53:08 -08:00
|
|
|
aTransform);
|
2013-07-30 02:59:51 -07:00
|
|
|
}
|
|
|
|
mFrontBuffer->Unlock();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ImageHost::PrintInfo(nsACString& aTo, const char* aPrefix)
|
|
|
|
{
|
|
|
|
aTo += aPrefix;
|
|
|
|
aTo += nsPrintfCString("ImageHost (0x%p)", this);
|
|
|
|
|
|
|
|
AppendToString(aTo, mPictureRect, " [picture-rect=", "]");
|
|
|
|
|
|
|
|
if (mFrontBuffer) {
|
|
|
|
nsAutoCString pfx(aPrefix);
|
|
|
|
pfx += " ";
|
|
|
|
aTo += "\n";
|
|
|
|
mFrontBuffer->PrintInfo(aTo, pfx.get());
|
|
|
|
}
|
|
|
|
}
|
2013-08-08 05:53:12 -07:00
|
|
|
|
|
|
|
#ifdef MOZ_DUMP_PAINTING
|
2013-07-30 02:59:51 -07:00
|
|
|
void
|
|
|
|
ImageHost::Dump(FILE* aFile,
|
|
|
|
const char* aPrefix,
|
|
|
|
bool aDumpHtml)
|
|
|
|
{
|
|
|
|
if (!aFile) {
|
|
|
|
aFile = stderr;
|
|
|
|
}
|
|
|
|
if (mFrontBuffer) {
|
2013-11-23 14:44:18 -08:00
|
|
|
fprintf_stderr(aFile, "%s", aPrefix);
|
|
|
|
fprintf_stderr(aFile, aDumpHtml ? "<ul><li>TextureHost: "
|
2013-07-30 02:59:51 -07:00
|
|
|
: "TextureHost: ");
|
|
|
|
DumpTextureHost(aFile, mFrontBuffer);
|
2013-11-23 14:44:18 -08:00
|
|
|
fprintf_stderr(aFile, aDumpHtml ? " </li></ul> " : " ");
|
2013-07-30 02:59:51 -07:00
|
|
|
}
|
|
|
|
}
|
2013-08-08 05:53:12 -07:00
|
|
|
#endif
|
2013-07-30 02:59:51 -07:00
|
|
|
|
|
|
|
LayerRenderState
|
|
|
|
ImageHost::GetRenderState()
|
|
|
|
{
|
|
|
|
if (mFrontBuffer) {
|
|
|
|
return mFrontBuffer->GetRenderState();
|
|
|
|
}
|
|
|
|
return LayerRenderState();
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef MOZ_DUMP_PAINTING
|
2013-11-27 01:59:01 -08:00
|
|
|
TemporaryRef<gfx::DataSourceSurface>
|
2013-07-30 02:59:51 -07:00
|
|
|
ImageHost::GetAsSurface()
|
|
|
|
{
|
|
|
|
return mFrontBuffer->GetAsSurface();
|
|
|
|
}
|
|
|
|
#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
|
|
|
void
|
2013-07-24 09:08:35 -07:00
|
|
|
DeprecatedImageHostSingle::SetCompositor(Compositor* aCompositor) {
|
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
|
|
|
CompositableHost::SetCompositor(aCompositor);
|
2013-07-08 14:30:44 -07:00
|
|
|
if (mDeprecatedTextureHost) {
|
|
|
|
mDeprecatedTextureHost->SetCompositor(aCompositor);
|
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-04-24 07:32:43 -07:00
|
|
|
void
|
2013-07-24 09:08:35 -07:00
|
|
|
DeprecatedImageHostSingle::EnsureDeprecatedTextureHost(TextureIdentifier aTextureId,
|
|
|
|
const SurfaceDescriptor& aSurface,
|
|
|
|
ISurfaceAllocator* aAllocator,
|
|
|
|
const TextureInfo& aTextureInfo)
|
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
|
|
|
if (mDeprecatedTextureHost &&
|
|
|
|
mDeprecatedTextureHost->GetBuffer() &&
|
|
|
|
mDeprecatedTextureHost->GetBuffer()->type() == aSurface.type()) {
|
2013-04-24 07:32:43 -07:00
|
|
|
return;
|
2013-04-12 00:28:55 -07:00
|
|
|
}
|
|
|
|
|
2013-07-08 14:30:44 -07:00
|
|
|
MakeDeprecatedTextureHost(aTextureId,
|
2013-04-24 07:32:43 -07:00
|
|
|
aSurface,
|
|
|
|
aAllocator,
|
|
|
|
aTextureInfo);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2013-07-24 09:08:35 -07:00
|
|
|
DeprecatedImageHostSingle::MakeDeprecatedTextureHost(TextureIdentifier aTextureId,
|
|
|
|
const SurfaceDescriptor& aSurface,
|
|
|
|
ISurfaceAllocator* aAllocator,
|
|
|
|
const TextureInfo& aTextureInfo)
|
2013-04-24 07:32:43 -07:00
|
|
|
{
|
2013-07-08 14:30:44 -07:00
|
|
|
mDeprecatedTextureHost = DeprecatedTextureHost::CreateDeprecatedTextureHost(aSurface.type(),
|
|
|
|
mTextureInfo.mDeprecatedTextureHostFlags,
|
2013-09-12 19:39:26 -07:00
|
|
|
mTextureInfo.mTextureFlags,
|
|
|
|
this);
|
2013-04-12 00:28:55 -07:00
|
|
|
|
2013-07-08 14:30:44 -07:00
|
|
|
NS_ASSERTION(mDeprecatedTextureHost, "Failed to create texture host");
|
2013-04-24 07:32:43 -07:00
|
|
|
|
2013-04-12 00:28:55 -07:00
|
|
|
Compositor* compositor = GetCompositor();
|
2013-07-08 14:30:44 -07:00
|
|
|
if (compositor && mDeprecatedTextureHost) {
|
|
|
|
mDeprecatedTextureHost->SetCompositor(compositor);
|
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-30 02:59:51 -07:00
|
|
|
LayerRenderState
|
|
|
|
DeprecatedImageHostSingle::GetRenderState()
|
|
|
|
{
|
|
|
|
if (mDeprecatedTextureHost) {
|
|
|
|
return mDeprecatedTextureHost->GetRenderState();
|
|
|
|
}
|
|
|
|
return LayerRenderState();
|
|
|
|
}
|
|
|
|
|
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
|
|
|
DeprecatedImageHostSingle::Composite(EffectChain& aEffectChain,
|
|
|
|
float aOpacity,
|
|
|
|
const gfx::Matrix4x4& aTransform,
|
|
|
|
const gfx::Filter& aFilter,
|
|
|
|
const gfx::Rect& aClipRect,
|
|
|
|
const nsIntRegion* aVisibleRegion,
|
|
|
|
TiledLayerProperties* aLayerProperties)
|
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
|
|
|
if (!mDeprecatedTextureHost) {
|
|
|
|
NS_WARNING("Can't composite an invalid or null DeprecatedTextureHost");
|
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;
|
|
|
|
}
|
|
|
|
|
2013-07-08 14:30:44 -07:00
|
|
|
if (!mDeprecatedTextureHost->IsValid()) {
|
|
|
|
NS_WARNING("Can't composite an invalid DeprecatedTextureHost");
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!GetCompositor()) {
|
|
|
|
// should only happen during tabswitch if async-video is still sending frames.
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-07-08 14:30:44 -07:00
|
|
|
if (!mDeprecatedTextureHost->Lock()) {
|
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_ASSERTION(false, "failed to lock texture host");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
RefPtr<TexturedEffect> effect =
|
2013-07-08 14:30:44 -07:00
|
|
|
CreateTexturedEffect(mDeprecatedTextureHost, aFilter);
|
2013-11-21 14:07:56 -08:00
|
|
|
if (!effect) {
|
|
|
|
return;
|
|
|
|
}
|
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
|
|
|
|
|
|
|
aEffectChain.mPrimaryEffect = effect;
|
|
|
|
|
2013-07-08 14:30:44 -07:00
|
|
|
TileIterator* it = mDeprecatedTextureHost->AsTileIterator();
|
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 (it) {
|
|
|
|
it->BeginTileIteration();
|
|
|
|
do {
|
|
|
|
nsIntRect tileRect = it->GetTileRect();
|
|
|
|
gfx::Rect rect(tileRect.x, tileRect.y, tileRect.width, tileRect.height);
|
|
|
|
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
2013-11-07 01:53:08 -08:00
|
|
|
aOpacity, aTransform);
|
2013-08-02 15:50:17 -07:00
|
|
|
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE|DIAGNOSTIC_BIGIMAGE,
|
2013-11-07 01:53:08 -08:00
|
|
|
rect, aClipRect, aTransform);
|
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
|
|
|
} while (it->NextTile());
|
|
|
|
it->EndTileIteration();
|
|
|
|
} else {
|
2013-07-08 14:30:44 -07:00
|
|
|
IntSize textureSize = mDeprecatedTextureHost->GetSize();
|
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
|
|
|
gfx::Rect rect(0, 0,
|
|
|
|
mPictureRect.width,
|
|
|
|
mPictureRect.height);
|
|
|
|
if (mHasPictureRect) {
|
|
|
|
effect->mTextureCoords = Rect(Float(mPictureRect.x) / textureSize.width,
|
|
|
|
Float(mPictureRect.y) / textureSize.height,
|
|
|
|
Float(mPictureRect.width) / textureSize.width,
|
|
|
|
Float(mPictureRect.height) / textureSize.height);
|
|
|
|
} else {
|
|
|
|
effect->mTextureCoords = Rect(0, 0, 1, 1);
|
|
|
|
rect = gfx::Rect(0, 0, textureSize.width, textureSize.height);
|
|
|
|
}
|
|
|
|
|
2013-08-06 10:36:35 -07:00
|
|
|
if (mDeprecatedTextureHost->GetFlags() & TEXTURE_NEEDS_Y_FLIP) {
|
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
|
|
|
effect->mTextureCoords.y = effect->mTextureCoords.YMost();
|
|
|
|
effect->mTextureCoords.height = -effect->mTextureCoords.height;
|
|
|
|
}
|
|
|
|
|
|
|
|
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
2013-11-07 01:53:08 -08:00
|
|
|
aOpacity, aTransform);
|
2013-08-02 15:50:17 -07:00
|
|
|
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE,
|
2013-11-07 01:53:08 -08:00
|
|
|
rect, aClipRect, aTransform);
|
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
|
|
|
mDeprecatedTextureHost->Unlock();
|
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
|
|
|
DeprecatedImageHostSingle::PrintInfo(nsACString& aTo, const char* aPrefix)
|
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
|
|
|
{
|
|
|
|
aTo += aPrefix;
|
2013-07-24 09:08:35 -07:00
|
|
|
aTo += nsPrintfCString("DeprecatedImageHostSingle (0x%p)", 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
|
|
|
|
|
|
|
AppendToString(aTo, mPictureRect, " [picture-rect=", "]");
|
|
|
|
|
2013-07-08 14:30:44 -07:00
|
|
|
if (mDeprecatedTextureHost) {
|
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
|
|
|
nsAutoCString pfx(aPrefix);
|
|
|
|
pfx += " ";
|
|
|
|
aTo += "\n";
|
2013-07-08 14:30:44 -07:00
|
|
|
mDeprecatedTextureHost->PrintInfo(aTo, pfx.get());
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
2013-07-24 09:08:35 -07:00
|
|
|
DeprecatedImageHostBuffered::Update(const SurfaceDescriptor& aImage,
|
|
|
|
SurfaceDescriptor* aResult) {
|
2013-07-08 14:30:44 -07:00
|
|
|
if (!GetDeprecatedTextureHost()) {
|
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
|
|
|
*aResult = aImage;
|
|
|
|
return false;
|
|
|
|
}
|
2013-07-08 14:30:44 -07:00
|
|
|
GetDeprecatedTextureHost()->SwapTextures(aImage, aResult);
|
|
|
|
return GetDeprecatedTextureHost()->IsValid();
|
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-04-24 07:32:43 -07:00
|
|
|
void
|
2013-07-24 09:08:35 -07:00
|
|
|
DeprecatedImageHostBuffered::MakeDeprecatedTextureHost(TextureIdentifier aTextureId,
|
|
|
|
const SurfaceDescriptor& aSurface,
|
|
|
|
ISurfaceAllocator* aAllocator,
|
|
|
|
const TextureInfo& aTextureInfo)
|
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-24 09:08:35 -07:00
|
|
|
DeprecatedImageHostSingle::MakeDeprecatedTextureHost(aTextureId,
|
|
|
|
aSurface,
|
|
|
|
aAllocator,
|
|
|
|
aTextureInfo);
|
2013-07-08 14:30:44 -07:00
|
|
|
if (mDeprecatedTextureHost) {
|
|
|
|
mDeprecatedTextureHost->SetBuffer(new SurfaceDescriptor(null_t()), aAllocator);
|
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-08-08 05:53:12 -07:00
|
|
|
#ifdef MOZ_DUMP_PAINTING
|
2013-05-25 19:44:24 -07:00
|
|
|
void
|
2013-07-24 09:08:35 -07:00
|
|
|
DeprecatedImageHostSingle::Dump(FILE* aFile,
|
|
|
|
const char* aPrefix,
|
|
|
|
bool aDumpHtml)
|
2013-05-25 19:44:24 -07:00
|
|
|
{
|
|
|
|
if (!aFile) {
|
|
|
|
aFile = stderr;
|
|
|
|
}
|
2013-07-08 14:30:44 -07:00
|
|
|
if (mDeprecatedTextureHost) {
|
2013-11-23 14:44:18 -08:00
|
|
|
fprintf_stderr(aFile, "%s", aPrefix);
|
|
|
|
fprintf_stderr(aFile, aDumpHtml ? "<ul><li>DeprecatedTextureHost: "
|
2013-07-08 14:30:44 -07:00
|
|
|
: "DeprecatedTextureHost: ");
|
|
|
|
DumpDeprecatedTextureHost(aFile, mDeprecatedTextureHost);
|
2013-11-23 14:44:18 -08:00
|
|
|
fprintf_stderr(aFile, aDumpHtml ? " </li></ul> " : " ");
|
2013-05-25 19:44:24 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-11-27 01:59:01 -08:00
|
|
|
TemporaryRef<gfx::DataSourceSurface>
|
2013-07-30 02:59:51 -07:00
|
|
|
DeprecatedImageHostSingle::GetAsSurface()
|
|
|
|
{
|
|
|
|
return mDeprecatedTextureHost->GetAsSurface();
|
|
|
|
}
|
|
|
|
#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
|
|
|
}
|
|
|
|
}
|