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/. */
|
|
|
|
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "LayerManagerComposite.h"
|
|
|
|
#include <stddef.h> // for size_t
|
|
|
|
#include <stdint.h> // for uint16_t, uint32_t
|
|
|
|
#include "CanvasLayerComposite.h" // for CanvasLayerComposite
|
|
|
|
#include "ColorLayerComposite.h" // for ColorLayerComposite
|
|
|
|
#include "Composer2D.h" // for Composer2D
|
|
|
|
#include "CompositableHost.h" // for CompositableHost
|
|
|
|
#include "ContainerLayerComposite.h" // for ContainerLayerComposite, etc
|
2014-02-10 14:14:11 -08:00
|
|
|
#include "FPSCounter.h" // for FPSState, FPSCounter
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "FrameMetrics.h" // for FrameMetrics
|
2013-08-22 00:11:51 -07:00
|
|
|
#include "GeckoProfiler.h" // for profiler_set_frame_number, etc
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "ImageLayerComposite.h" // for ImageLayerComposite
|
|
|
|
#include "Layers.h" // for Layer, ContainerLayer, etc
|
|
|
|
#include "ThebesLayerComposite.h" // for ThebesLayerComposite
|
|
|
|
#include "TiledLayerBuffer.h" // for TiledLayerComposer
|
|
|
|
#include "Units.h" // for ScreenIntRect
|
|
|
|
#include "gfx2DGlue.h" // for ToMatrix4x4
|
|
|
|
#include "gfx3DMatrix.h" // for gfx3DMatrix
|
2014-02-26 18:53:31 -08:00
|
|
|
#include "gfxPrefs.h" // for gfxPrefs
|
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
|
|
|
#ifdef XP_MACOSX
|
|
|
|
#include "gfxPlatformMac.h"
|
|
|
|
#endif
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "gfxRect.h" // for gfxRect
|
2014-05-08 13:49:01 -07:00
|
|
|
#include "gfxUtils.h" // for frame color util
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
|
|
|
|
#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef
|
|
|
|
#include "mozilla/gfx/2D.h" // for DrawTarget
|
|
|
|
#include "mozilla/gfx/Matrix.h" // for Matrix4x4
|
|
|
|
#include "mozilla/gfx/Point.h" // for IntSize, Point
|
|
|
|
#include "mozilla/gfx/Rect.h" // for Rect
|
|
|
|
#include "mozilla/gfx/Types.h" // for Color, SurfaceFormat
|
|
|
|
#include "mozilla/layers/Compositor.h" // for Compositor
|
|
|
|
#include "mozilla/layers/CompositorTypes.h"
|
|
|
|
#include "mozilla/layers/Effects.h" // for Effect, EffectChain, etc
|
2013-11-17 13:47:40 -08:00
|
|
|
#include "mozilla/layers/LayersTypes.h" // for etc
|
2014-05-21 10:29:49 -07:00
|
|
|
#include "ipc/CompositorBench.h" // for CompositorBench
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "ipc/ShadowLayerUtils.h"
|
|
|
|
#include "mozilla/mozalloc.h" // for operator new, etc
|
|
|
|
#include "nsAutoPtr.h" // for nsRefPtr
|
|
|
|
#include "nsCOMPtr.h" // for already_AddRefed
|
|
|
|
#include "nsDebug.h" // for NS_WARNING, NS_RUNTIMEABORT, etc
|
|
|
|
#include "nsISupportsImpl.h" // for Layer::AddRef, etc
|
|
|
|
#include "nsIWidget.h" // for nsIWidget
|
|
|
|
#include "nsPoint.h" // for nsIntPoint
|
|
|
|
#include "nsRect.h" // for nsIntRect
|
|
|
|
#include "nsRegion.h" // for nsIntRegion, etc
|
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
|
|
|
#ifdef MOZ_WIDGET_ANDROID
|
|
|
|
#include <android/log.h>
|
|
|
|
#endif
|
2013-09-10 12:56:49 -07:00
|
|
|
#include "GeckoProfiler.h"
|
2014-03-11 19:27:33 -07:00
|
|
|
#include "TextRenderer.h" // for TextRenderer
|
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-11 16:17:23 -07:00
|
|
|
class gfxContext;
|
|
|
|
struct nsIntSize;
|
|
|
|
|
|
|
|
|
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 {
|
|
|
|
|
2013-08-11 16:17:23 -07:00
|
|
|
class ImageLayer;
|
|
|
|
|
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 mozilla::gfx;
|
2013-04-25 15:25:33 -07:00
|
|
|
using namespace mozilla::gl;
|
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
|
|
|
|
|
|
|
static LayerComposite*
|
|
|
|
ToLayerComposite(Layer* aLayer)
|
|
|
|
{
|
|
|
|
return static_cast<LayerComposite*>(aLayer->ImplData());
|
|
|
|
}
|
|
|
|
|
|
|
|
static void ClearSubtree(Layer* aLayer)
|
|
|
|
{
|
|
|
|
ToLayerComposite(aLayer)->CleanupResources();
|
|
|
|
for (Layer* child = aLayer->GetFirstChild(); child;
|
|
|
|
child = child->GetNextSibling()) {
|
|
|
|
ClearSubtree(child);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
LayerManagerComposite::ClearCachedResources(Layer* aSubtree)
|
|
|
|
{
|
|
|
|
MOZ_ASSERT(!aSubtree || aSubtree->Manager() == this);
|
|
|
|
Layer* subtree = aSubtree ? aSubtree : mRoot.get();
|
|
|
|
if (!subtree) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
ClearSubtree(subtree);
|
|
|
|
// FIXME [bjacob]
|
|
|
|
// XXX the old LayerManagerOGL code had a mMaybeInvalidTree that it set to true here.
|
|
|
|
// Do we need that?
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* LayerManagerComposite
|
|
|
|
*/
|
|
|
|
LayerManagerComposite::LayerManagerComposite(Compositor* aCompositor)
|
2013-04-25 15:25:33 -07:00
|
|
|
: mCompositor(aCompositor)
|
2013-11-21 14:07:57 -08:00
|
|
|
, mInTransaction(false)
|
|
|
|
, mIsCompositorReady(false)
|
2013-12-03 07:49:46 -08:00
|
|
|
, mDebugOverlayWantsNextFrame(false)
|
2014-04-03 18:59:13 -07:00
|
|
|
, mGeometryChanged(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
|
|
|
{
|
2014-03-11 19:27:30 -07:00
|
|
|
mTextRenderer = new TextRenderer(aCompositor);
|
2013-08-04 00:46:17 -07:00
|
|
|
MOZ_ASSERT(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-25 15:25:33 -07:00
|
|
|
LayerManagerComposite::~LayerManagerComposite()
|
|
|
|
{
|
|
|
|
Destroy();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
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
|
|
|
|
LayerManagerComposite::Initialize()
|
|
|
|
{
|
2013-06-05 15:14:51 -07:00
|
|
|
bool result = mCompositor->Initialize();
|
|
|
|
return 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
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
LayerManagerComposite::Destroy()
|
|
|
|
{
|
|
|
|
if (!mDestroyed) {
|
2013-04-21 19:40:51 -07:00
|
|
|
mCompositor->GetWidget()->CleanupWindowEffects();
|
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 (mRoot) {
|
|
|
|
RootLayer()->Destroy();
|
|
|
|
}
|
|
|
|
mRoot = nullptr;
|
|
|
|
mDestroyed = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
LayerManagerComposite::UpdateRenderBounds(const nsIntRect& aRect)
|
|
|
|
{
|
|
|
|
mRenderBounds = aRect;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
LayerManagerComposite::BeginTransaction()
|
|
|
|
{
|
|
|
|
mInTransaction = true;
|
2013-11-21 14:07:57 -08:00
|
|
|
|
|
|
|
if (!mCompositor->Ready()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
mIsCompositorReady = true;
|
|
|
|
|
2014-04-03 18:59:13 -07:00
|
|
|
if (Compositor::GetBackend() == LayersBackend::LAYERS_OPENGL ||
|
|
|
|
Compositor::GetBackend() == LayersBackend::LAYERS_BASIC) {
|
2013-11-21 11:25:16 -08:00
|
|
|
mClonedLayerTreeProperties = LayerProperties::CloneFrom(GetRoot());
|
|
|
|
}
|
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
|
2014-05-27 18:21:32 -07:00
|
|
|
LayerManagerComposite::BeginTransactionWithDrawTarget(DrawTarget* aTarget, const nsIntRect& aRect)
|
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
|
|
|
{
|
|
|
|
mInTransaction = true;
|
2013-11-21 14:07:57 -08:00
|
|
|
|
|
|
|
if (!mCompositor->Ready()) {
|
|
|
|
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
|
|
|
|
|
|
|
#ifdef MOZ_LAYERS_HAVE_LOG
|
|
|
|
MOZ_LAYERS_LOG(("[----- BeginTransaction"));
|
|
|
|
Log();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (mDestroyed) {
|
|
|
|
NS_WARNING("Call on destroyed layer manager");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-11-21 14:07:57 -08:00
|
|
|
mIsCompositorReady = true;
|
2014-05-27 18:21:32 -07:00
|
|
|
mCompositor->SetTargetContext(aTarget, aRect);
|
2014-03-04 14:36:52 -08:00
|
|
|
mTarget = aTarget;
|
2014-05-27 18:21:32 -07:00
|
|
|
mTargetBounds = aRect;
|
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
|
|
|
|
LayerManagerComposite::EndEmptyTransaction(EndTransactionFlags aFlags)
|
|
|
|
{
|
2013-11-19 23:27:23 -08:00
|
|
|
NS_ASSERTION(mInTransaction, "Didn't call BeginTransaction?");
|
|
|
|
if (!mRoot) {
|
|
|
|
mInTransaction = false;
|
2013-11-21 14:07:57 -08:00
|
|
|
mIsCompositorReady = 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
|
|
|
return false;
|
2013-11-19 23:27:23 -08: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
|
|
|
|
|
|
|
EndTransaction(nullptr, nullptr);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
LayerManagerComposite::EndTransaction(DrawThebesLayerCallback aCallback,
|
|
|
|
void* aCallbackData,
|
|
|
|
EndTransactionFlags aFlags)
|
|
|
|
{
|
2013-11-19 23:27:23 -08:00
|
|
|
NS_ASSERTION(mInTransaction, "Didn't call BeginTransaction?");
|
2013-12-08 17:40:59 -08:00
|
|
|
NS_ASSERTION(!aCallback && !aCallbackData, "Not expecting callbacks here");
|
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
|
|
|
mInTransaction = false;
|
|
|
|
|
2013-11-21 14:07:57 -08:00
|
|
|
if (!mIsCompositorReady) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
mIsCompositorReady = 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
|
|
|
#ifdef MOZ_LAYERS_HAVE_LOG
|
|
|
|
MOZ_LAYERS_LOG((" ----- (beginning paint)"));
|
|
|
|
Log();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (mDestroyed) {
|
|
|
|
NS_WARNING("Call on destroyed layer manager");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-11-21 11:25:16 -08:00
|
|
|
if (mRoot && mClonedLayerTreeProperties) {
|
2014-05-27 18:21:32 -07:00
|
|
|
MOZ_ASSERT(!mTarget);
|
2014-04-03 18:59:13 -07:00
|
|
|
nsIntRegion invalid =
|
|
|
|
mClonedLayerTreeProperties->ComputeDifferences(mRoot, nullptr, &mGeometryChanged);
|
2013-11-21 11:25:16 -08:00
|
|
|
mClonedLayerTreeProperties = nullptr;
|
|
|
|
|
|
|
|
mInvalidRegion.Or(mInvalidRegion, invalid);
|
2014-05-27 18:21:32 -07:00
|
|
|
} else if (!mTarget) {
|
2013-11-21 11:25:16 -08:00
|
|
|
mInvalidRegion.Or(mInvalidRegion, mRenderBounds);
|
|
|
|
}
|
|
|
|
|
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 (mRoot && !(aFlags & END_NO_IMMEDIATE_REDRAW)) {
|
|
|
|
if (aFlags & END_NO_COMPOSITE) {
|
|
|
|
// Apply pending tree updates before recomputing effective
|
|
|
|
// properties.
|
|
|
|
mRoot->ApplyPendingUpdatesToSubtree();
|
|
|
|
}
|
|
|
|
|
|
|
|
// The results of our drawing always go directly into a pixel buffer,
|
|
|
|
// so we don't need to pass any global transform here.
|
2014-01-27 07:28:04 -08:00
|
|
|
mRoot->ComputeEffectiveTransforms(gfx::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
|
|
|
|
|
|
|
Render();
|
2014-04-03 18:59:13 -07:00
|
|
|
mGeometryChanged = 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-05-27 18:21:32 -07:00
|
|
|
mCompositor->ClearTargetContext();
|
2014-03-04 14:36:52 -08:00
|
|
|
mTarget = 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
|
|
|
|
|
|
|
#ifdef MOZ_LAYERS_HAVE_LOG
|
|
|
|
Log();
|
|
|
|
MOZ_LAYERS_LOG(("]----- EndTransaction"));
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2014-04-10 01:49:49 -07:00
|
|
|
TemporaryRef<DrawTarget>
|
|
|
|
LayerManagerComposite::CreateOptimalMaskDrawTarget(const IntSize &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_RUNTIMEABORT("Should only be called on the drawing side");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<ThebesLayer>
|
|
|
|
LayerManagerComposite::CreateThebesLayer()
|
|
|
|
{
|
|
|
|
NS_RUNTIMEABORT("Should only be called on the drawing side");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<ContainerLayer>
|
|
|
|
LayerManagerComposite::CreateContainerLayer()
|
|
|
|
{
|
|
|
|
NS_RUNTIMEABORT("Should only be called on the drawing side");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<ImageLayer>
|
|
|
|
LayerManagerComposite::CreateImageLayer()
|
|
|
|
{
|
|
|
|
NS_RUNTIMEABORT("Should only be called on the drawing side");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<ColorLayer>
|
|
|
|
LayerManagerComposite::CreateColorLayer()
|
|
|
|
{
|
|
|
|
NS_RUNTIMEABORT("Should only be called on the drawing side");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<CanvasLayer>
|
|
|
|
LayerManagerComposite::CreateCanvasLayer()
|
|
|
|
{
|
|
|
|
NS_RUNTIMEABORT("Should only be called on the drawing side");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
LayerComposite*
|
|
|
|
LayerManagerComposite::RootLayer() const
|
|
|
|
{
|
|
|
|
if (mDestroyed) {
|
|
|
|
NS_WARNING("Call on destroyed layer manager");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2013-12-08 17:41:00 -08:00
|
|
|
return ToLayerComposite(mRoot);
|
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-06 09:19:52 -07:00
|
|
|
static uint16_t sFrameCount = 0;
|
|
|
|
void
|
|
|
|
LayerManagerComposite::RenderDebugOverlay(const Rect& aBounds)
|
|
|
|
{
|
2014-05-08 13:49:01 -07:00
|
|
|
bool drawFps = gfxPrefs::LayersDrawFPS();
|
|
|
|
bool drawFrameCounter = gfxPrefs::DrawFrameCounter();
|
|
|
|
bool drawFrameColorBars = gfxPrefs::CompositorDrawColorBars();
|
|
|
|
|
|
|
|
if (drawFps) {
|
2014-02-10 14:14:11 -08:00
|
|
|
if (!mFPS) {
|
|
|
|
mFPS = new FPSState();
|
|
|
|
}
|
|
|
|
|
|
|
|
float fillRatio = mCompositor->GetFillRatio();
|
2014-05-08 13:49:01 -07:00
|
|
|
mFPS->DrawFPS(TimeStamp::Now(), drawFrameColorBars ? 10 : 0, 0, unsigned(fillRatio), mCompositor);
|
2014-02-10 14:14:11 -08:00
|
|
|
} else {
|
|
|
|
mFPS = nullptr;
|
2013-07-06 09:19:52 -07:00
|
|
|
}
|
|
|
|
|
2014-05-08 13:49:01 -07:00
|
|
|
if (drawFrameColorBars) {
|
|
|
|
gfx::Rect sideRect(0, 0, 10, aBounds.height);
|
|
|
|
|
|
|
|
EffectChain effects;
|
|
|
|
effects.mPrimaryEffect = new EffectSolidColor(gfxUtils::GetColorForFrameNumber(sFrameCount));
|
|
|
|
mCompositor->DrawQuad(sideRect,
|
|
|
|
sideRect,
|
|
|
|
effects,
|
|
|
|
1.0,
|
|
|
|
gfx::Matrix4x4());
|
|
|
|
}
|
|
|
|
|
|
|
|
if (drawFrameCounter) {
|
2014-02-10 14:14:11 -08:00
|
|
|
profiler_set_frame_number(sFrameCount);
|
2013-07-06 09:19:52 -07:00
|
|
|
|
2014-02-10 14:14:11 -08:00
|
|
|
uint16_t frameNumber = sFrameCount;
|
|
|
|
const uint16_t bitWidth = 3;
|
|
|
|
float opacity = 1.0;
|
|
|
|
gfx::Rect clip(0,0, bitWidth*16, bitWidth);
|
|
|
|
for (size_t i = 0; i < 16; i++) {
|
2013-07-06 09:19:52 -07:00
|
|
|
|
2014-02-10 14:14:11 -08:00
|
|
|
gfx::Color bitColor;
|
|
|
|
if ((frameNumber >> i) & 0x1) {
|
|
|
|
bitColor = gfx::Color(0, 0, 0, 1.0);
|
|
|
|
} else {
|
|
|
|
bitColor = gfx::Color(1.0, 1.0, 1.0, 1.0);
|
|
|
|
}
|
|
|
|
EffectChain effects;
|
|
|
|
effects.mPrimaryEffect = new EffectSolidColor(bitColor);
|
|
|
|
mCompositor->DrawQuad(gfx::Rect(bitWidth*i, 0, bitWidth, bitWidth),
|
|
|
|
clip,
|
|
|
|
effects,
|
|
|
|
opacity,
|
|
|
|
gfx::Matrix4x4());
|
2013-07-06 09:19:52 -07:00
|
|
|
}
|
2014-05-08 13:49:01 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
if (drawFrameColorBars || drawFrameCounter) {
|
2014-02-10 14:14:11 -08:00
|
|
|
// We intentionally overflow at 2^16.
|
|
|
|
sFrameCount++;
|
2013-07-06 09:19:52 -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
|
|
|
void
|
|
|
|
LayerManagerComposite::Render()
|
|
|
|
{
|
|
|
|
PROFILER_LABEL("LayerManagerComposite", "Render");
|
|
|
|
if (mDestroyed) {
|
|
|
|
NS_WARNING("Call on destroyed layer manager");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2014-02-26 18:53:31 -08:00
|
|
|
if (gfxPrefs::LayersDump()) {
|
2013-11-17 13:47:40 -08:00
|
|
|
this->Dump();
|
|
|
|
}
|
|
|
|
|
2013-12-17 09:01:39 -08:00
|
|
|
/** Our more efficient but less powerful alter ego, if one is available. */
|
|
|
|
nsRefPtr<Composer2D> composer2D = mCompositor->GetWidget()->GetComposer2D();
|
|
|
|
|
2014-04-03 18:59:13 -07:00
|
|
|
if (!mTarget && composer2D && composer2D->TryRender(mRoot, mWorldMatrix, mGeometryChanged)) {
|
2014-02-12 12:25:52 -08:00
|
|
|
if (mFPS) {
|
|
|
|
double fps = mFPS->mCompositionFps.AddFrameAndGetFps(TimeStamp::Now());
|
2014-02-26 18:53:31 -08:00
|
|
|
if (gfxPrefs::LayersDrawFPS()) {
|
2014-02-12 12:25:52 -08:00
|
|
|
printf_stderr("HWComposer: FPS is %g\n", fps);
|
|
|
|
}
|
2014-02-10 14:14:11 -08: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
|
|
|
mCompositor->EndFrameForExternalComposition(mWorldMatrix);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-09-10 12:56:49 -07:00
|
|
|
{
|
|
|
|
PROFILER_LABEL("LayerManagerComposite", "PreRender");
|
2013-10-09 07:39:22 -07:00
|
|
|
if (!mCompositor->GetWidget()->PreRender(this)) {
|
|
|
|
return;
|
|
|
|
}
|
2013-09-10 12:56:49 -07:00
|
|
|
}
|
2013-05-09 14:02:49 -07:00
|
|
|
|
2014-05-27 18:21:32 -07:00
|
|
|
nsIntRegion invalid;
|
|
|
|
if (mTarget) {
|
|
|
|
invalid = mTargetBounds;
|
|
|
|
} else {
|
|
|
|
invalid = mInvalidRegion;
|
|
|
|
// Reset the invalid region now that we've begun compositing.
|
|
|
|
mInvalidRegion.SetEmpty();
|
|
|
|
}
|
|
|
|
|
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
|
|
|
nsIntRect clipRect;
|
|
|
|
Rect bounds(mRenderBounds.x, mRenderBounds.y, mRenderBounds.width, mRenderBounds.height);
|
|
|
|
Rect actualBounds;
|
2014-05-21 10:29:49 -07:00
|
|
|
|
|
|
|
CompositorBench(mCompositor, bounds);
|
|
|
|
|
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 (mRoot->GetClipRect()) {
|
|
|
|
clipRect = *mRoot->GetClipRect();
|
|
|
|
WorldTransformRect(clipRect);
|
|
|
|
Rect rect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
|
2014-05-27 18:21:32 -07:00
|
|
|
mCompositor->BeginFrame(invalid, &rect, mWorldMatrix, bounds, nullptr, &actualBounds);
|
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
|
|
|
} else {
|
|
|
|
gfx::Rect rect;
|
2014-05-27 18:21:32 -07:00
|
|
|
mCompositor->BeginFrame(invalid, nullptr, mWorldMatrix, bounds, &rect, &actualBounds);
|
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
|
|
|
clipRect = nsIntRect(rect.x, rect.y, rect.width, rect.height);
|
|
|
|
}
|
|
|
|
|
2013-04-30 17:42:05 -07:00
|
|
|
if (actualBounds.IsEmpty()) {
|
2013-10-09 07:39:23 -07:00
|
|
|
mCompositor->GetWidget()->PostRender(this);
|
2013-04-30 17:42:05 -07:00
|
|
|
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
|
|
|
// Allow widget to render a custom background.
|
|
|
|
mCompositor->GetWidget()->DrawWindowUnderlay(this, nsIntRect(actualBounds.x,
|
|
|
|
actualBounds.y,
|
|
|
|
actualBounds.width,
|
|
|
|
actualBounds.height));
|
|
|
|
|
|
|
|
// Render our layers.
|
2013-11-07 01:53:08 -08:00
|
|
|
RootLayer()->RenderLayer(clipRect);
|
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-03-27 20:38:32 -07:00
|
|
|
if (!mRegionToClear.IsEmpty()) {
|
|
|
|
nsIntRegionRectIterator iter(mRegionToClear);
|
|
|
|
const nsIntRect *r;
|
|
|
|
while ((r = iter.Next())) {
|
|
|
|
mCompositor->ClearRect(Rect(r->x, r->y, r->width, r->height));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
|
|
// Allow widget to render a custom foreground.
|
|
|
|
mCompositor->GetWidget()->DrawWindowOverlay(this, nsIntRect(actualBounds.x,
|
|
|
|
actualBounds.y,
|
|
|
|
actualBounds.width,
|
|
|
|
actualBounds.height));
|
|
|
|
|
2013-07-06 09:19:52 -07:00
|
|
|
// Debugging
|
|
|
|
RenderDebugOverlay(actualBounds);
|
|
|
|
|
2013-09-10 12:56:49 -07:00
|
|
|
{
|
|
|
|
PROFILER_LABEL("LayerManagerComposite", "EndFrame");
|
|
|
|
mCompositor->EndFrame();
|
2014-03-17 18:36:56 -07:00
|
|
|
mCompositor->SetFBAcquireFence(mRoot);
|
2013-09-10 12:56:49 -07:00
|
|
|
}
|
2013-10-09 07:39:23 -07:00
|
|
|
|
|
|
|
mCompositor->GetWidget()->PostRender(this);
|
2013-11-26 23:32:19 -08:00
|
|
|
|
|
|
|
RecordFrame();
|
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
|
2014-01-15 23:22:19 -08:00
|
|
|
LayerManagerComposite::SetWorldTransform(const gfx::Matrix& aMatrix)
|
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(aMatrix.PreservesAxisAlignedRectangles(),
|
|
|
|
"SetWorldTransform only accepts matrices that satisfy PreservesAxisAlignedRectangles");
|
|
|
|
NS_ASSERTION(!aMatrix.HasNonIntegerScale(),
|
|
|
|
"SetWorldTransform only accepts matrices with integer scale");
|
|
|
|
|
|
|
|
mWorldMatrix = aMatrix;
|
|
|
|
}
|
|
|
|
|
2014-01-15 23:22:19 -08:00
|
|
|
gfx::Matrix&
|
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
|
|
|
LayerManagerComposite::GetWorldTransform(void)
|
|
|
|
{
|
|
|
|
return mWorldMatrix;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
LayerManagerComposite::WorldTransformRect(nsIntRect& aRect)
|
|
|
|
{
|
2014-01-15 23:22:19 -08:00
|
|
|
gfx::Rect grect(aRect.x, aRect.y, aRect.width, aRect.height);
|
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
|
|
|
grect = mWorldMatrix.TransformBounds(grect);
|
|
|
|
aRect.SetRect(grect.X(), grect.Y(), grect.Width(), grect.Height());
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
SubtractTransformedRegion(nsIntRegion& aRegion,
|
|
|
|
const nsIntRegion& aRegionToSubtract,
|
|
|
|
const gfx3DMatrix& aTransform)
|
|
|
|
{
|
|
|
|
if (aRegionToSubtract.IsEmpty()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// For each rect in the region, find out its bounds in screen space and
|
|
|
|
// subtract it from the screen region.
|
|
|
|
nsIntRegionRectIterator it(aRegionToSubtract);
|
|
|
|
while (const nsIntRect* rect = it.Next()) {
|
|
|
|
gfxRect incompleteRect = aTransform.TransformBounds(gfxRect(*rect));
|
|
|
|
aRegion.Sub(aRegion, nsIntRect(incompleteRect.x,
|
|
|
|
incompleteRect.y,
|
|
|
|
incompleteRect.width,
|
|
|
|
incompleteRect.height));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* static */ void
|
|
|
|
LayerManagerComposite::ComputeRenderIntegrityInternal(Layer* aLayer,
|
|
|
|
nsIntRegion& aScreenRegion,
|
|
|
|
nsIntRegion& aLowPrecisionScreenRegion,
|
|
|
|
const gfx3DMatrix& aTransform)
|
|
|
|
{
|
|
|
|
if (aLayer->GetOpacity() <= 0.f ||
|
|
|
|
(aScreenRegion.IsEmpty() && aLowPrecisionScreenRegion.IsEmpty())) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// If the layer's a container, recurse into all of its children
|
|
|
|
ContainerLayer* container = aLayer->AsContainerLayer();
|
|
|
|
if (container) {
|
|
|
|
// Accumulate the transform of intermediate surfaces
|
|
|
|
gfx3DMatrix transform = aTransform;
|
|
|
|
if (container->UseIntermediateSurface()) {
|
2014-01-24 17:49:19 -08:00
|
|
|
gfx::To3DMatrix(aLayer->GetEffectiveTransform(), transform);
|
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
|
|
|
transform.PreMultiply(aTransform);
|
|
|
|
}
|
|
|
|
for (Layer* child = aLayer->GetFirstChild(); child;
|
|
|
|
child = child->GetNextSibling()) {
|
|
|
|
ComputeRenderIntegrityInternal(child, aScreenRegion, aLowPrecisionScreenRegion, transform);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Only thebes layers can be incomplete
|
|
|
|
ThebesLayer* thebesLayer = aLayer->AsThebesLayer();
|
|
|
|
if (!thebesLayer) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// See if there's any incomplete rendering
|
|
|
|
nsIntRegion incompleteRegion = aLayer->GetEffectiveVisibleRegion();
|
|
|
|
incompleteRegion.Sub(incompleteRegion, thebesLayer->GetValidRegion());
|
|
|
|
|
|
|
|
if (!incompleteRegion.IsEmpty()) {
|
|
|
|
// Calculate the transform to get between screen and layer space
|
2014-01-24 17:49:19 -08:00
|
|
|
gfx3DMatrix transformToScreen;
|
|
|
|
To3DMatrix(aLayer->GetEffectiveTransform(), transformToScreen);
|
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
|
|
|
transformToScreen.PreMultiply(aTransform);
|
|
|
|
|
|
|
|
SubtractTransformedRegion(aScreenRegion, incompleteRegion, transformToScreen);
|
|
|
|
|
|
|
|
// See if there's any incomplete low-precision rendering
|
|
|
|
TiledLayerComposer* composer = nullptr;
|
|
|
|
LayerComposite* shadow = aLayer->AsLayerComposite();
|
|
|
|
if (shadow) {
|
2013-04-16 14:36:06 -07:00
|
|
|
composer = shadow->GetTiledLayerComposer();
|
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 (composer) {
|
|
|
|
incompleteRegion.Sub(incompleteRegion, composer->GetValidLowPrecisionRegion());
|
|
|
|
if (!incompleteRegion.IsEmpty()) {
|
|
|
|
SubtractTransformedRegion(aLowPrecisionScreenRegion, incompleteRegion, transformToScreen);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// If we can't get a valid low precision region, assume it's the same as
|
|
|
|
// the high precision region.
|
|
|
|
if (!composer) {
|
|
|
|
SubtractTransformedRegion(aLowPrecisionScreenRegion, incompleteRegion, transformToScreen);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef MOZ_ANDROID_OMTC
|
|
|
|
static float
|
2013-06-10 06:05:42 -07:00
|
|
|
GetDisplayportCoverage(const CSSRect& aDisplayPort,
|
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 gfx3DMatrix& aTransformToScreen,
|
|
|
|
const nsIntRect& aScreenRect)
|
|
|
|
{
|
|
|
|
gfxRect transformedDisplayport =
|
|
|
|
aTransformToScreen.TransformBounds(gfxRect(aDisplayPort.x,
|
|
|
|
aDisplayPort.y,
|
|
|
|
aDisplayPort.width,
|
|
|
|
aDisplayPort.height));
|
|
|
|
transformedDisplayport.RoundOut();
|
|
|
|
nsIntRect displayport = nsIntRect(transformedDisplayport.x,
|
|
|
|
transformedDisplayport.y,
|
|
|
|
transformedDisplayport.width,
|
|
|
|
transformedDisplayport.height);
|
|
|
|
if (!displayport.Contains(aScreenRect)) {
|
|
|
|
nsIntRegion coveredRegion;
|
|
|
|
coveredRegion.And(aScreenRect, displayport);
|
2013-07-30 14:10:32 -07:00
|
|
|
return coveredRegion.Area() / (float)(aScreenRect.width * aScreenRect.height);
|
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 1.0f;
|
|
|
|
}
|
|
|
|
#endif // MOZ_ANDROID_OMTC
|
|
|
|
|
|
|
|
float
|
|
|
|
LayerManagerComposite::ComputeRenderIntegrity()
|
|
|
|
{
|
|
|
|
// We only ever have incomplete rendering when progressive tiles are enabled.
|
|
|
|
Layer* root = GetRoot();
|
2014-02-26 18:53:31 -08:00
|
|
|
if (!gfxPrefs::UseProgressiveTilePainting() || !root) {
|
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 1.f;
|
|
|
|
}
|
|
|
|
|
|
|
|
const FrameMetrics& rootMetrics = root->AsContainerLayer()->GetFrameMetrics();
|
|
|
|
nsIntRect screenRect(rootMetrics.mCompositionBounds.x,
|
|
|
|
rootMetrics.mCompositionBounds.y,
|
|
|
|
rootMetrics.mCompositionBounds.width,
|
|
|
|
rootMetrics.mCompositionBounds.height);
|
|
|
|
|
|
|
|
float lowPrecisionMultiplier = 1.0f;
|
|
|
|
float highPrecisionMultiplier = 1.0f;
|
|
|
|
|
|
|
|
#ifdef MOZ_ANDROID_OMTC
|
|
|
|
// Use the transform on the primary scrollable layer and its FrameMetrics
|
|
|
|
// to find out how much of the viewport the current displayport covers
|
|
|
|
Layer* primaryScrollable = GetPrimaryScrollableLayer();
|
|
|
|
if (primaryScrollable) {
|
|
|
|
// This is derived from the code in
|
2013-10-29 06:27:50 -07:00
|
|
|
// AsyncCompositionManager::TransformScrollableLayer
|
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 FrameMetrics& metrics = primaryScrollable->AsContainerLayer()->GetFrameMetrics();
|
2014-01-24 17:49:19 -08:00
|
|
|
gfx3DMatrix transform;
|
|
|
|
gfx::To3DMatrix(primaryScrollable->GetEffectiveTransform(), transform);
|
2013-10-29 06:27:50 -07:00
|
|
|
transform.ScalePost(metrics.mResolution.scale, metrics.mResolution.scale, 1);
|
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
|
|
|
|
|
|
|
// Clip the screen rect to the document bounds
|
|
|
|
gfxRect documentBounds =
|
2014-03-12 23:34:34 -07:00
|
|
|
transform.TransformBounds(gfxRect(metrics.mScrollableRect.x - metrics.GetScrollOffset().x,
|
|
|
|
metrics.mScrollableRect.y - metrics.GetScrollOffset().y,
|
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
|
|
|
metrics.mScrollableRect.width,
|
|
|
|
metrics.mScrollableRect.height));
|
|
|
|
documentBounds.RoundOut();
|
|
|
|
screenRect = screenRect.Intersect(nsIntRect(documentBounds.x, documentBounds.y,
|
|
|
|
documentBounds.width, documentBounds.height));
|
|
|
|
|
|
|
|
// If the screen rect is empty, the user has scrolled entirely into
|
|
|
|
// over-scroll and so we can be considered to have full integrity.
|
|
|
|
if (screenRect.IsEmpty()) {
|
|
|
|
return 1.0f;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Work out how much of the critical display-port covers the screen
|
|
|
|
bool hasLowPrecision = false;
|
|
|
|
if (!metrics.mCriticalDisplayPort.IsEmpty()) {
|
|
|
|
hasLowPrecision = true;
|
|
|
|
highPrecisionMultiplier =
|
|
|
|
GetDisplayportCoverage(metrics.mCriticalDisplayPort, transform, screenRect);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Work out how much of the display-port covers the screen
|
|
|
|
if (!metrics.mDisplayPort.IsEmpty()) {
|
|
|
|
if (hasLowPrecision) {
|
|
|
|
lowPrecisionMultiplier =
|
|
|
|
GetDisplayportCoverage(metrics.mDisplayPort, transform, screenRect);
|
|
|
|
} else {
|
|
|
|
lowPrecisionMultiplier = highPrecisionMultiplier =
|
|
|
|
GetDisplayportCoverage(metrics.mDisplayPort, transform, screenRect);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// If none of the screen is covered, we have zero integrity.
|
|
|
|
if (highPrecisionMultiplier <= 0.0f && lowPrecisionMultiplier <= 0.0f) {
|
|
|
|
return 0.0f;
|
|
|
|
}
|
|
|
|
#endif // MOZ_ANDROID_OMTC
|
|
|
|
|
|
|
|
nsIntRegion screenRegion(screenRect);
|
|
|
|
nsIntRegion lowPrecisionScreenRegion(screenRect);
|
|
|
|
gfx3DMatrix transform;
|
|
|
|
ComputeRenderIntegrityInternal(root, screenRegion,
|
|
|
|
lowPrecisionScreenRegion, transform);
|
|
|
|
|
|
|
|
if (!screenRegion.IsEqual(screenRect)) {
|
|
|
|
// Calculate the area of the region. All rects in an nsRegion are
|
|
|
|
// non-overlapping.
|
|
|
|
float screenArea = screenRect.width * screenRect.height;
|
2013-07-30 14:10:32 -07:00
|
|
|
float highPrecisionIntegrity = screenRegion.Area() / screenArea;
|
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
|
|
|
float lowPrecisionIntegrity = 1.f;
|
|
|
|
if (!lowPrecisionScreenRegion.IsEqual(screenRect)) {
|
2013-07-30 14:10:32 -07:00
|
|
|
lowPrecisionIntegrity = lowPrecisionScreenRegion.Area() / screenArea;
|
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 ((highPrecisionIntegrity * highPrecisionMultiplier) +
|
|
|
|
(lowPrecisionIntegrity * lowPrecisionMultiplier)) / 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1.f;
|
|
|
|
}
|
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
already_AddRefed<ThebesLayerComposite>
|
|
|
|
LayerManagerComposite::CreateThebesLayerComposite()
|
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-25 15:25:33 -07:00
|
|
|
if (mDestroyed) {
|
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("Call on destroyed layer manager");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return nsRefPtr<ThebesLayerComposite>(new ThebesLayerComposite(this)).forget();
|
|
|
|
}
|
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
already_AddRefed<ContainerLayerComposite>
|
|
|
|
LayerManagerComposite::CreateContainerLayerComposite()
|
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-25 15:25:33 -07:00
|
|
|
if (mDestroyed) {
|
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("Call on destroyed layer manager");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return nsRefPtr<ContainerLayerComposite>(new ContainerLayerComposite(this)).forget();
|
|
|
|
}
|
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
already_AddRefed<ImageLayerComposite>
|
|
|
|
LayerManagerComposite::CreateImageLayerComposite()
|
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-25 15:25:33 -07:00
|
|
|
if (mDestroyed) {
|
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("Call on destroyed layer manager");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return nsRefPtr<ImageLayerComposite>(new ImageLayerComposite(this)).forget();
|
|
|
|
}
|
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
already_AddRefed<ColorLayerComposite>
|
|
|
|
LayerManagerComposite::CreateColorLayerComposite()
|
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 (LayerManagerComposite::mDestroyed) {
|
|
|
|
NS_WARNING("Call on destroyed layer manager");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return nsRefPtr<ColorLayerComposite>(new ColorLayerComposite(this)).forget();
|
|
|
|
}
|
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
already_AddRefed<CanvasLayerComposite>
|
|
|
|
LayerManagerComposite::CreateCanvasLayerComposite()
|
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 (LayerManagerComposite::mDestroyed) {
|
|
|
|
NS_WARNING("Call on destroyed layer manager");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return nsRefPtr<CanvasLayerComposite>(new CanvasLayerComposite(this)).forget();
|
|
|
|
}
|
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
already_AddRefed<RefLayerComposite>
|
|
|
|
LayerManagerComposite::CreateRefLayerComposite()
|
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 (LayerManagerComposite::mDestroyed) {
|
|
|
|
NS_WARNING("Call on destroyed layer manager");
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return nsRefPtr<RefLayerComposite>(new RefLayerComposite(this)).forget();
|
|
|
|
}
|
|
|
|
|
2013-08-27 21:44:03 -07:00
|
|
|
LayerManagerComposite::AutoAddMaskEffect::AutoAddMaskEffect(Layer* aMaskLayer,
|
|
|
|
EffectChain& aEffects,
|
|
|
|
bool aIs3D)
|
|
|
|
: mCompositable(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
|
|
|
{
|
|
|
|
if (!aMaskLayer) {
|
2013-08-27 21:44:03 -07:00
|
|
|
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
|
|
|
}
|
2013-08-27 21:44:03 -07:00
|
|
|
|
2013-12-08 17:41:00 -08:00
|
|
|
mCompositable = ToLayerComposite(aMaskLayer)->GetCompositableHost();
|
2013-08-27 21:44:03 -07:00
|
|
|
if (!mCompositable) {
|
2013-04-16 22:10:50 -07:00
|
|
|
NS_WARNING("Mask layer with no compositable host");
|
2013-08-27 21:44:03 -07:00
|
|
|
return;
|
2013-04-16 22:10:50 -07:00
|
|
|
}
|
|
|
|
|
2014-01-24 17:49:19 -08:00
|
|
|
if (!mCompositable->AddMaskEffect(aEffects, aMaskLayer->GetEffectiveTransform(), aIs3D)) {
|
2013-12-11 09:32:41 -08:00
|
|
|
mCompositable = 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
|
|
|
}
|
|
|
|
|
2013-08-27 21:44:03 -07:00
|
|
|
LayerManagerComposite::AutoAddMaskEffect::~AutoAddMaskEffect()
|
2013-08-01 18:12:16 -07:00
|
|
|
{
|
2013-08-27 21:44:03 -07:00
|
|
|
if (!mCompositable) {
|
2013-08-01 18:12:16 -07:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-08-27 21:44:03 -07:00
|
|
|
mCompositable->RemoveMaskEffect();
|
2013-08-01 18:12:16 -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
|
|
|
TemporaryRef<DrawTarget>
|
|
|
|
LayerManagerComposite::CreateDrawTarget(const IntSize &aSize,
|
|
|
|
SurfaceFormat aFormat)
|
|
|
|
{
|
|
|
|
#ifdef XP_MACOSX
|
|
|
|
// We don't want to accelerate if the surface is too small which indicates
|
|
|
|
// that it's likely used for an icon/static image. We also don't want to
|
|
|
|
// accelerate anything that is above the maximum texture size of weakest gpu.
|
|
|
|
// Safari uses 5000 area as the minimum for acceleration, we decided 64^2 is more logical.
|
|
|
|
bool useAcceleration = aSize.width <= 4096 && aSize.height <= 4096 &&
|
|
|
|
aSize.width > 64 && aSize.height > 64 &&
|
|
|
|
gfxPlatformMac::GetPlatform()->UseAcceleratedCanvas();
|
|
|
|
if (useAcceleration) {
|
2014-01-10 11:06:16 -08:00
|
|
|
return Factory::CreateDrawTarget(BackendType::COREGRAPHICS_ACCELERATED,
|
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
|
|
|
aSize, aFormat);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
return LayerManager::CreateDrawTarget(aSize, aFormat);
|
|
|
|
}
|
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
LayerComposite::LayerComposite(LayerManagerComposite *aManager)
|
|
|
|
: mCompositeManager(aManager)
|
|
|
|
, mCompositor(aManager->GetCompositor())
|
|
|
|
, mShadowOpacity(1.0)
|
|
|
|
, mUseShadowClipRect(false)
|
2013-05-16 05:34:24 -07:00
|
|
|
, mShadowTransformSetByAnimation(false)
|
2013-04-25 15:25:33 -07:00
|
|
|
, mDestroyed(false)
|
2013-10-15 14:01:42 -07:00
|
|
|
, mLayerComposited(false)
|
2013-04-25 15:25:33 -07:00
|
|
|
{ }
|
|
|
|
|
|
|
|
LayerComposite::~LayerComposite()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
LayerComposite::Destroy()
|
|
|
|
{
|
|
|
|
if (!mDestroyed) {
|
|
|
|
mDestroyed = true;
|
|
|
|
CleanupResources();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-05-09 02:48:29 -07:00
|
|
|
void
|
|
|
|
LayerComposite::AddBlendModeEffect(EffectChain& aEffectChain)
|
|
|
|
{
|
|
|
|
gfx::CompositionOp blendMode = GetLayer()->GetEffectiveMixBlendMode();
|
|
|
|
if (blendMode == gfx::CompositionOp::OP_OVER) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
aEffectChain.mSecondaryEffects[EffectTypes::BLEND_MODE] = new EffectBlendMode(blendMode);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
bool
|
2013-12-20 08:46:29 -08:00
|
|
|
LayerManagerComposite::CanUseCanvasLayerForSize(const IntSize &aSize)
|
2013-04-25 15:25:33 -07:00
|
|
|
{
|
2013-09-26 17:37:19 -07:00
|
|
|
return mCompositor->CanUseCanvasLayerForSize(gfx::IntSize(aSize.width,
|
|
|
|
aSize.height));
|
2013-04-25 15:25:33 -07:00
|
|
|
}
|
|
|
|
|
2014-02-10 14:14:11 -08:00
|
|
|
void
|
|
|
|
LayerManagerComposite::NotifyShadowTreeTransaction()
|
|
|
|
{
|
|
|
|
if (mFPS) {
|
|
|
|
mFPS->NotifyShadowTreeTransaction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-25 15:25:33 -07:00
|
|
|
#ifndef MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS
|
|
|
|
|
|
|
|
/*static*/ bool
|
|
|
|
LayerManagerComposite::SupportsDirectTexturing()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*static*/ void
|
|
|
|
LayerManagerComposite::PlatformSyncBeforeReplyUpdate()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // !defined(MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS)
|
|
|
|
|
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
|
|
|
} /* layers */
|
|
|
|
} /* mozilla */
|