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/. */
|
|
|
|
|
|
|
|
#ifndef GFX_CONTENTHOST_H
|
|
|
|
#define GFX_CONTENTHOST_H
|
|
|
|
|
2013-08-11 16:17:23 -07:00
|
|
|
#include <stdint.h> // for uint32_t
|
|
|
|
#include <stdio.h> // for FILE
|
|
|
|
#include "mozilla-config.h" // for MOZ_DUMP_PAINTING
|
|
|
|
#include "CompositableHost.h" // for CompositableHost, etc
|
2013-11-26 16:29:46 -08:00
|
|
|
#include "RotatedBuffer.h" // for RotatedContentBuffer, etc
|
2015-03-21 09:28:04 -07:00
|
|
|
#include "mozilla/Attributes.h" // for override
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "mozilla/RefPtr.h" // for RefPtr
|
|
|
|
#include "mozilla/gfx/BasePoint.h" // for BasePoint
|
|
|
|
#include "mozilla/gfx/Point.h" // for Point
|
|
|
|
#include "mozilla/gfx/Rect.h" // for Rect
|
|
|
|
#include "mozilla/gfx/Types.h" // for Filter
|
|
|
|
#include "mozilla/layers/CompositorTypes.h" // for TextureInfo, etc
|
|
|
|
#include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator
|
|
|
|
#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor
|
2013-11-17 13:47:40 -08:00
|
|
|
#include "mozilla/layers/LayersTypes.h" // for etc
|
2014-04-02 23:04:04 -07:00
|
|
|
#include "mozilla/layers/TextureHost.h" // for TextureHost
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "mozilla/mozalloc.h" // for operator delete
|
2014-08-25 08:09:39 -07:00
|
|
|
#include "mozilla/UniquePtr.h" // for UniquePtr
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "nsCOMPtr.h" // for already_AddRefed
|
|
|
|
#include "nsDebug.h" // for NS_RUNTIMEABORT
|
2014-02-26 13:36:35 -08:00
|
|
|
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, etc
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "nsPoint.h" // for nsIntPoint
|
|
|
|
#include "nsRect.h" // for nsIntRect
|
|
|
|
#include "nsRegion.h" // for nsIntRegion
|
|
|
|
#include "nsTArray.h" // for nsTArray
|
|
|
|
#include "nscore.h" // for nsACString
|
|
|
|
|
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
|
|
|
namespace layers {
|
2013-08-11 16:17:23 -07:00
|
|
|
class Compositor;
|
|
|
|
class ThebesBufferData;
|
|
|
|
class TiledLayerComposer;
|
|
|
|
struct EffectChain;
|
2014-04-01 23:45:02 -07:00
|
|
|
class TextureImageTextureSourceOGL;
|
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
|
|
|
|
|
|
|
struct TexturedEffect;
|
|
|
|
|
|
|
|
/**
|
2014-09-26 10:07:06 -07:00
|
|
|
* ContentHosts are used for compositing Painted layers, always matched by a
|
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
|
|
|
* ContentClient of the same type.
|
|
|
|
*
|
|
|
|
* ContentHosts support only UpdateThebes(), not Update().
|
|
|
|
*/
|
|
|
|
class ContentHost : public CompositableHost
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// Subclasses should implement this method if they support being used as a
|
|
|
|
// tiling.
|
|
|
|
virtual TiledLayerComposer* AsTiledLayerComposer() { return nullptr; }
|
|
|
|
|
2014-02-20 05:05:32 -08:00
|
|
|
virtual bool UpdateThebes(const ThebesBufferData& 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
|
|
|
const nsIntRegion& aUpdated,
|
|
|
|
const nsIntRegion& aOldValidRegionBack,
|
|
|
|
nsIntRegion* aUpdatedRegionBack) = 0;
|
|
|
|
|
2014-08-03 20:29:55 -07:00
|
|
|
virtual void SetPaintWillResample(bool aResample) { mPaintWillResample = aResample; }
|
|
|
|
bool PaintWillResample() { return mPaintWillResample; }
|
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
|
|
|
|
|
|
|
protected:
|
2014-08-19 21:55:14 -07:00
|
|
|
explicit ContentHost(const TextureInfo& aTextureInfo)
|
2013-04-16 14:36:06 -07:00
|
|
|
: CompositableHost(aTextureInfo)
|
2014-08-03 20:29:55 -07:00
|
|
|
, mPaintWillResample(false)
|
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
|
|
|
{}
|
2014-08-03 20:29:55 -07:00
|
|
|
|
|
|
|
bool mPaintWillResample;
|
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
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Base class for non-tiled ContentHosts.
|
|
|
|
*
|
|
|
|
* Ownership of the SurfaceDescriptor and the resources it represents is passed
|
2014-04-02 23:04:04 -07:00
|
|
|
* from the ContentClient to the ContentHost when the TextureClient/Hosts are
|
|
|
|
* created, that is recevied here by SetTextureHosts which assigns one or two
|
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
|
|
|
* texture hosts (for single and double buffering) to the ContentHost.
|
|
|
|
*
|
|
|
|
* It is the responsibility of the ContentHost to destroy its resources when
|
|
|
|
* they are recreated or the ContentHost dies.
|
|
|
|
*/
|
2013-11-27 13:16:35 -08:00
|
|
|
class ContentHostBase : public ContentHost
|
2013-11-27 13:16:34 -08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
typedef RotatedContentBuffer::ContentType ContentType;
|
|
|
|
typedef RotatedContentBuffer::PaintState PaintState;
|
|
|
|
|
2014-08-19 21:55:14 -07:00
|
|
|
explicit ContentHostBase(const TextureInfo& aTextureInfo);
|
2013-12-05 10:39:22 -08:00
|
|
|
virtual ~ContentHostBase();
|
|
|
|
|
2014-04-01 23:45:02 -07:00
|
|
|
protected:
|
|
|
|
virtual nsIntPoint GetOriginOffset()
|
|
|
|
{
|
|
|
|
return mBufferRect.TopLeft() - mBufferRotation;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
nsIntRect mBufferRect;
|
|
|
|
nsIntPoint mBufferRotation;
|
|
|
|
bool mInitialised;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Shared ContentHostBase implementation for content hosts that
|
|
|
|
* use up to two TextureHosts.
|
|
|
|
*/
|
|
|
|
class ContentHostTexture : public ContentHostBase
|
|
|
|
{
|
|
|
|
public:
|
2014-08-19 21:55:14 -07:00
|
|
|
explicit ContentHostTexture(const TextureInfo& aTextureInfo)
|
2014-04-01 23:45:02 -07:00
|
|
|
: ContentHostBase(aTextureInfo)
|
|
|
|
, mLocked(false)
|
|
|
|
{ }
|
2013-12-05 10:39:22 -08:00
|
|
|
|
2014-10-16 10:08:32 -07:00
|
|
|
virtual void Composite(EffectChain& aEffectChain,
|
|
|
|
float aOpacity,
|
|
|
|
const gfx::Matrix4x4& aTransform,
|
|
|
|
const gfx::Filter& aFilter,
|
|
|
|
const gfx::Rect& aClipRect,
|
2015-03-21 09:28:04 -07:00
|
|
|
const nsIntRegion* aVisibleRegion = nullptr) override;
|
2014-10-16 10:08:32 -07:00
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual void SetCompositor(Compositor* aCompositor) override;
|
2013-12-05 10:39:22 -08:00
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual TemporaryRef<gfx::DataSourceSurface> GetAsSurface() override;
|
2013-12-05 10:39:22 -08:00
|
|
|
|
2014-06-19 15:36:25 -07:00
|
|
|
virtual void Dump(std::stringstream& aStream,
|
2014-12-16 18:32:58 -08:00
|
|
|
const char* aPrefix="",
|
2015-03-21 09:28:04 -07:00
|
|
|
bool aDumpHtml=false) override;
|
2013-12-05 10:39:22 -08:00
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
|
2013-12-05 10:39:22 -08:00
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual void UseTextureHost(TextureHost* aTexture) override;
|
2014-02-06 03:28:29 -08:00
|
|
|
virtual void UseComponentAlphaTextures(TextureHost* aTextureOnBlack,
|
2015-03-21 09:28:04 -07:00
|
|
|
TextureHost* aTextureOnWhite) override;
|
2013-12-05 10:39:22 -08:00
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual bool Lock() override {
|
2014-04-01 23:45:02 -07:00
|
|
|
MOZ_ASSERT(!mLocked);
|
2014-04-23 05:19:29 -07:00
|
|
|
if (!mTextureHost) {
|
|
|
|
return false;
|
|
|
|
}
|
2014-04-01 23:45:02 -07:00
|
|
|
if (!mTextureHost->Lock()) {
|
|
|
|
return false;
|
|
|
|
}
|
2013-12-05 10:39:22 -08:00
|
|
|
|
2014-04-01 23:45:02 -07:00
|
|
|
if (mTextureHostOnWhite && !mTextureHostOnWhite->Lock()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
mLocked = true;
|
|
|
|
return true;
|
|
|
|
}
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual void Unlock() override {
|
2014-04-01 23:45:02 -07:00
|
|
|
MOZ_ASSERT(mLocked);
|
|
|
|
mTextureHost->Unlock();
|
|
|
|
if (mTextureHostOnWhite) {
|
|
|
|
mTextureHostOnWhite->Unlock();
|
|
|
|
}
|
|
|
|
mLocked = false;
|
2013-12-05 10:39:22 -08:00
|
|
|
}
|
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
LayerRenderState GetRenderState() override;
|
2014-10-16 10:08:32 -07:00
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual TemporaryRef<TexturedEffect> GenEffect(const gfx::Filter& aFilter) override;
|
2014-10-16 10:08:32 -07:00
|
|
|
|
2014-04-01 23:45:02 -07:00
|
|
|
protected:
|
2014-11-17 02:06:25 -08:00
|
|
|
CompositableTextureHostRef mTextureHost;
|
|
|
|
CompositableTextureHostRef mTextureHostOnWhite;
|
2014-10-16 10:08:32 -07:00
|
|
|
CompositableTextureSourceRef mTextureSource;
|
|
|
|
CompositableTextureSourceRef mTextureSourceOnWhite;
|
2014-04-01 23:45:02 -07:00
|
|
|
bool mLocked;
|
2013-12-05 10:39:22 -08:00
|
|
|
};
|
2014-03-31 23:28: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
|
|
|
/**
|
2013-12-05 10:39:22 -08:00
|
|
|
* Double buffering is implemented by swapping the front and back TextureHosts.
|
|
|
|
* We assume that whenever we use double buffering, then we have
|
|
|
|
* render-to-texture and thus no texture upload to do.
|
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
|
|
|
*/
|
2014-04-01 23:45:02 -07:00
|
|
|
class ContentHostDoubleBuffered : public ContentHostTexture
|
2013-11-27 13:16:34 -08:00
|
|
|
{
|
|
|
|
public:
|
2014-08-19 21:55:14 -07:00
|
|
|
explicit ContentHostDoubleBuffered(const TextureInfo& aTextureInfo)
|
2014-04-01 23:45:02 -07:00
|
|
|
: ContentHostTexture(aTextureInfo)
|
2013-11-27 13:16:34 -08:00
|
|
|
{}
|
|
|
|
|
2013-12-05 10:39:22 -08:00
|
|
|
virtual ~ContentHostDoubleBuffered() {}
|
|
|
|
|
2014-04-25 19:34:06 -07:00
|
|
|
virtual CompositableType GetType() { return CompositableType::CONTENT_DOUBLE; }
|
2013-12-05 10:39:22 -08:00
|
|
|
|
2014-02-20 05:05:32 -08:00
|
|
|
virtual bool UpdateThebes(const ThebesBufferData& aData,
|
2013-12-05 10:39:22 -08:00
|
|
|
const nsIntRegion& aUpdated,
|
|
|
|
const nsIntRegion& aOldValidRegionBack,
|
|
|
|
nsIntRegion* aUpdatedRegionBack);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
nsIntRegion mValidRegionForNextBackBuffer;
|
|
|
|
};
|
|
|
|
|
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
|
|
|
/**
|
|
|
|
* Single buffered, therefore we must synchronously upload the image from the
|
2014-04-02 23:04:04 -07:00
|
|
|
* TextureHost in the layers transaction (i.e., in UpdateThebes).
|
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
|
|
|
*/
|
2014-04-01 23:45:02 -07:00
|
|
|
class ContentHostSingleBuffered : public ContentHostTexture
|
2013-11-27 13:16:34 -08:00
|
|
|
{
|
|
|
|
public:
|
2014-08-19 21:55:14 -07:00
|
|
|
explicit ContentHostSingleBuffered(const TextureInfo& aTextureInfo)
|
2014-04-01 23:45:02 -07:00
|
|
|
: ContentHostTexture(aTextureInfo)
|
2013-11-27 13:16:34 -08:00
|
|
|
{}
|
2013-12-05 10:39:22 -08:00
|
|
|
virtual ~ContentHostSingleBuffered() {}
|
|
|
|
|
2014-04-25 19:34:06 -07:00
|
|
|
virtual CompositableType GetType() { return CompositableType::CONTENT_SINGLE; }
|
2013-12-05 10:39:22 -08:00
|
|
|
|
2014-02-20 05:05:32 -08:00
|
|
|
virtual bool UpdateThebes(const ThebesBufferData& aData,
|
2013-12-05 10:39:22 -08:00
|
|
|
const nsIntRegion& aUpdated,
|
|
|
|
const nsIntRegion& aOldValidRegionBack,
|
|
|
|
nsIntRegion* aUpdatedRegionBack);
|
|
|
|
};
|
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|