зеркало из https://github.com/mozilla/gecko-dev.git
Bug 35380 - Part 5: Remove aOffset from everywhere. r=nrc
This commit is contained in:
Родитель
374a9070c7
Коммит
9f29749647
|
@ -53,8 +53,7 @@ void
|
|||
Compositor::DrawDiagnostics(DiagnosticFlags aFlags,
|
||||
const nsIntRegion& aVisibleRegion,
|
||||
const gfx::Rect& aClipRect,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset)
|
||||
const gfx::Matrix4x4& aTransform)
|
||||
{
|
||||
if (!ShouldDrawDiagnostics(aFlags)) {
|
||||
return;
|
||||
|
@ -66,36 +65,33 @@ Compositor::DrawDiagnostics(DiagnosticFlags aFlags,
|
|||
while (const nsIntRect* rect = screenIter.Next())
|
||||
{
|
||||
DrawDiagnostics(aFlags | DIAGNOSTIC_REGION_RECT,
|
||||
ToRect(*rect), aClipRect, aTransform, aOffset);
|
||||
ToRect(*rect), aClipRect, aTransform);
|
||||
}
|
||||
}
|
||||
|
||||
DrawDiagnostics(aFlags, ToRect(aVisibleRegion.GetBounds()),
|
||||
aClipRect, aTransform, aOffset);
|
||||
aClipRect, aTransform);
|
||||
}
|
||||
|
||||
void
|
||||
Compositor::DrawDiagnostics(DiagnosticFlags aFlags,
|
||||
const gfx::Rect& aVisibleRect,
|
||||
const gfx::Rect& aClipRect,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset)
|
||||
const gfx::Matrix4x4& aTransform)
|
||||
{
|
||||
if (!ShouldDrawDiagnostics(aFlags)) {
|
||||
return;
|
||||
}
|
||||
|
||||
DrawDiagnosticsInternal(aFlags, aVisibleRect,
|
||||
aClipRect, aTransform,
|
||||
aOffset);
|
||||
aClipRect, aTransform);
|
||||
}
|
||||
|
||||
void
|
||||
Compositor::DrawDiagnosticsInternal(DiagnosticFlags aFlags,
|
||||
const gfx::Rect& aVisibleRect,
|
||||
const gfx::Rect& aClipRect,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset)
|
||||
const gfx::Matrix4x4& aTransform)
|
||||
{
|
||||
#ifdef MOZ_B2G
|
||||
int lWidth = 4;
|
||||
|
@ -138,22 +134,22 @@ Compositor::DrawDiagnosticsInternal(DiagnosticFlags aFlags,
|
|||
this->DrawQuad(gfx::Rect(aVisibleRect.x, aVisibleRect.y,
|
||||
lWidth, aVisibleRect.height),
|
||||
aClipRect, effects, opacity,
|
||||
aTransform, aOffset);
|
||||
aTransform);
|
||||
// top
|
||||
this->DrawQuad(gfx::Rect(aVisibleRect.x + lWidth, aVisibleRect.y,
|
||||
aVisibleRect.width - 2 * lWidth, lWidth),
|
||||
aClipRect, effects, opacity,
|
||||
aTransform, aOffset);
|
||||
aTransform);
|
||||
// right
|
||||
this->DrawQuad(gfx::Rect(aVisibleRect.x + aVisibleRect.width - lWidth, aVisibleRect.y,
|
||||
lWidth, aVisibleRect.height),
|
||||
aClipRect, effects, opacity,
|
||||
aTransform, aOffset);
|
||||
aTransform);
|
||||
// bottom
|
||||
this->DrawQuad(gfx::Rect(aVisibleRect.x + lWidth, aVisibleRect.y + aVisibleRect.height-lWidth,
|
||||
aVisibleRect.width - 2 * lWidth, lWidth),
|
||||
aClipRect, effects, opacity,
|
||||
aTransform, aOffset);
|
||||
aTransform);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -282,14 +282,12 @@ public:
|
|||
/**
|
||||
* Tell the compositor to actually draw a quad. What to do draw and how it is
|
||||
* drawn is specified by aEffectChain. aRect is the quad to draw, in user space.
|
||||
* aTransform transforms from user space to screen space. aOffset is the
|
||||
* offset of the render target from 0,0 of the screen. If texture coords are
|
||||
* aTransform transforms from user space to screen space. If texture coords are
|
||||
* required, these will be in the primary effect in the effect chain.
|
||||
*/
|
||||
virtual void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect,
|
||||
const EffectChain& aEffectChain,
|
||||
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
||||
const gfx::Point& aOffset) = 0;
|
||||
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform) = 0;
|
||||
|
||||
/**
|
||||
* Start a new frame.
|
||||
|
@ -351,14 +349,12 @@ public:
|
|||
void DrawDiagnostics(DiagnosticFlags aFlags,
|
||||
const gfx::Rect& visibleRect,
|
||||
const gfx::Rect& aClipRect,
|
||||
const gfx::Matrix4x4& transform,
|
||||
const gfx::Point& aOffset);
|
||||
const gfx::Matrix4x4& transform);
|
||||
|
||||
void DrawDiagnostics(DiagnosticFlags aFlags,
|
||||
const nsIntRegion& visibleRegion,
|
||||
const gfx::Rect& aClipRect,
|
||||
const gfx::Matrix4x4& transform,
|
||||
const gfx::Point& aOffset);
|
||||
const gfx::Matrix4x4& transform);
|
||||
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
|
@ -434,8 +430,7 @@ protected:
|
|||
void DrawDiagnosticsInternal(DiagnosticFlags aFlags,
|
||||
const gfx::Rect& aVisibleRect,
|
||||
const gfx::Rect& aClipRect,
|
||||
const gfx::Matrix4x4& transform,
|
||||
const gfx::Point& aOffset);
|
||||
const gfx::Matrix4x4& transform);
|
||||
|
||||
bool ShouldDrawDiagnostics(DiagnosticFlags);
|
||||
|
||||
|
|
|
@ -331,10 +331,11 @@ DrawSurfaceWithTextureCoords(DrawTarget *aDest,
|
|||
}
|
||||
|
||||
void
|
||||
BasicCompositor::DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect,
|
||||
BasicCompositor::DrawQuad(const gfx::Rect& aRect,
|
||||
const gfx::Rect& aClipRect,
|
||||
const EffectChain &aEffectChain,
|
||||
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
||||
const gfx::Point& aOffset)
|
||||
gfx::Float aOpacity,
|
||||
const gfx::Matrix4x4 &aTransform)
|
||||
{
|
||||
DrawTarget *dest = mRenderTarget->mDrawTarget;
|
||||
|
||||
|
|
|
@ -78,10 +78,11 @@ public:
|
|||
return mRenderTarget;
|
||||
}
|
||||
|
||||
virtual void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect,
|
||||
virtual void DrawQuad(const gfx::Rect& aRect,
|
||||
const gfx::Rect& aClipRect,
|
||||
const EffectChain &aEffectChain,
|
||||
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
||||
const gfx::Point& aOffset) MOZ_OVERRIDE;
|
||||
gfx::Float aOpacity,
|
||||
const gfx::Matrix4x4 &aTransform) MOZ_OVERRIDE;
|
||||
|
||||
virtual void BeginFrame(const gfx::Rect *aClipRectIn,
|
||||
const gfxMatrix& aTransform,
|
||||
|
|
|
@ -61,8 +61,7 @@ CanvasLayerComposite::GetRenderState()
|
|||
}
|
||||
|
||||
void
|
||||
CanvasLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
||||
const nsIntRect& aClipRect)
|
||||
CanvasLayerComposite::RenderLayer(const nsIntRect& aClipRect)
|
||||
{
|
||||
if (!mImageHost || !mImageHost->IsAttached()) {
|
||||
return;
|
||||
|
@ -98,7 +97,6 @@ CanvasLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
|||
mImageHost->Composite(effectChain,
|
||||
GetEffectiveOpacity(),
|
||||
transform,
|
||||
gfx::Point(aOffset.x, aOffset.y),
|
||||
gfx::ToFilter(filter),
|
||||
clipRect);
|
||||
}
|
||||
|
|
|
@ -48,8 +48,7 @@ public:
|
|||
}
|
||||
|
||||
virtual Layer* GetLayer() MOZ_OVERRIDE;
|
||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
||||
const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||
virtual void RenderLayer(const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||
|
||||
virtual void CleanupResources() MOZ_OVERRIDE;
|
||||
|
||||
|
|
|
@ -22,8 +22,7 @@ namespace mozilla {
|
|||
namespace layers {
|
||||
|
||||
void
|
||||
ColorLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
||||
const nsIntRect& aClipRect)
|
||||
ColorLayerComposite::RenderLayer(const nsIntRect& aClipRect)
|
||||
{
|
||||
EffectChain effects;
|
||||
gfxRGBA color(GetColor());
|
||||
|
@ -46,11 +45,10 @@ ColorLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
|||
gfx::Matrix4x4 transform;
|
||||
ToMatrix4x4(GetEffectiveTransform(), transform);
|
||||
|
||||
mCompositor->DrawQuad(rect, clipRect, effects, opacity,
|
||||
transform, gfx::Point(aOffset.x, aOffset.y));
|
||||
mCompositor->DrawQuad(rect, clipRect, effects, opacity, transform);
|
||||
mCompositor->DrawDiagnostics(DIAGNOSTIC_COLOR,
|
||||
rect, clipRect,
|
||||
transform, gfx::Point(aOffset.x, aOffset.y));
|
||||
transform);
|
||||
}
|
||||
|
||||
} /* layers */
|
||||
|
|
|
@ -42,8 +42,7 @@ public:
|
|||
|
||||
virtual void Destroy() MOZ_OVERRIDE { mDestroyed = true; }
|
||||
|
||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
||||
const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||
virtual void RenderLayer(const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||
virtual void CleanupResources() MOZ_OVERRIDE {};
|
||||
|
||||
CompositableHost* GetCompositableHost() MOZ_OVERRIDE { return nullptr; }
|
||||
|
|
|
@ -114,7 +114,6 @@ public:
|
|||
virtual void Composite(EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset,
|
||||
const gfx::Filter& aFilter,
|
||||
const gfx::Rect& aClipRect,
|
||||
const nsIntRegion* aVisibleRegion = nullptr,
|
||||
|
|
|
@ -81,7 +81,6 @@ GetOpaqueRect(Layer* aLayer)
|
|||
|
||||
template<class ContainerT> void
|
||||
ContainerRender(ContainerT* aContainer,
|
||||
const nsIntPoint& aOffset,
|
||||
LayerManagerComposite* aManager,
|
||||
const nsIntRect& aClipRect)
|
||||
{
|
||||
|
@ -94,7 +93,6 @@ ContainerRender(ContainerT* aContainer,
|
|||
|
||||
RefPtr<CompositingRenderTarget> previousTarget = compositor->GetCurrentRenderTarget();
|
||||
|
||||
nsIntPoint childOffset(aOffset);
|
||||
nsIntRect visibleRect = aContainer->GetEffectiveVisibleRegion().GetBounds();
|
||||
|
||||
aContainer->mSupportsComponentAlphaChildren = false;
|
||||
|
@ -140,7 +138,7 @@ ContainerRender(ContainerT* aContainer,
|
|||
}
|
||||
}
|
||||
|
||||
sourcePoint -= gfx::IntPoint(aOffset.x, aOffset.y);
|
||||
sourcePoint -= compositor->GetCurrentRenderTarget()->GetOrigin();
|
||||
if (surfaceCopyNeeded) {
|
||||
surface = compositor->CreateRenderTargetFromSource(surfaceRect, previousTarget, sourcePoint);
|
||||
} else {
|
||||
|
@ -152,8 +150,6 @@ ContainerRender(ContainerT* aContainer,
|
|||
}
|
||||
|
||||
compositor->SetRenderTarget(surface);
|
||||
childOffset.x = visibleRect.x;
|
||||
childOffset.y = visibleRect.y;
|
||||
} else {
|
||||
surface = previousTarget;
|
||||
aContainer->mSupportsComponentAlphaChildren = (aContainer->GetContentFlags() & Layer::CONTENT_OPAQUE) ||
|
||||
|
@ -202,7 +198,7 @@ ContainerRender(ContainerT* aContainer,
|
|||
// this time & reset composition flag for next composition phase
|
||||
layerToRender->SetLayerComposited(false);
|
||||
} else {
|
||||
layerToRender->RenderLayer(childOffset, clipRect);
|
||||
layerToRender->RenderLayer(clipRect);
|
||||
}
|
||||
// invariant: our GL context should be current here, I don't think we can
|
||||
// assert it though
|
||||
|
@ -231,7 +227,7 @@ ContainerRender(ContainerT* aContainer,
|
|||
gfx::Rect rect(visibleRect.x, visibleRect.y, visibleRect.width, visibleRect.height);
|
||||
gfx::Rect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
|
||||
aManager->GetCompositor()->DrawQuad(rect, clipRect, effectChain, opacity,
|
||||
transform, gfx::Point(aOffset.x, aOffset.y));
|
||||
transform);
|
||||
}
|
||||
|
||||
if (aContainer->GetFrameMetrics().IsScrollable()) {
|
||||
|
@ -244,7 +240,7 @@ ContainerRender(ContainerT* aContainer,
|
|||
gfx::Rect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
|
||||
aManager->GetCompositor()->DrawDiagnostics(DIAGNOSTIC_CONTAINER,
|
||||
rect, clipRect,
|
||||
transform, gfx::Point(aOffset.x, aOffset.y));
|
||||
transform);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -296,10 +292,9 @@ ContainerLayerComposite::GetFirstChildComposite()
|
|||
}
|
||||
|
||||
void
|
||||
ContainerLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
||||
const nsIntRect& aClipRect)
|
||||
ContainerLayerComposite::RenderLayer(const nsIntRect& aClipRect)
|
||||
{
|
||||
ContainerRender(this, aOffset, mCompositeManager, aClipRect);
|
||||
ContainerRender(this, mCompositeManager, aClipRect);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -340,10 +335,9 @@ RefLayerComposite::GetFirstChildComposite()
|
|||
}
|
||||
|
||||
void
|
||||
RefLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
||||
const nsIntRect& aClipRect)
|
||||
RefLayerComposite::RenderLayer(const nsIntRect& aClipRect)
|
||||
{
|
||||
ContainerRender(this, aOffset, mCompositeManager, aClipRect);
|
||||
ContainerRender(this, mCompositeManager, aClipRect);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -25,7 +25,6 @@ class ContainerLayerComposite : public ContainerLayer,
|
|||
{
|
||||
template<class ContainerT>
|
||||
friend void ContainerRender(ContainerT* aContainer,
|
||||
const nsIntPoint& aOffset,
|
||||
LayerManagerComposite* aManager,
|
||||
const nsIntRect& aClipRect);
|
||||
public:
|
||||
|
@ -40,8 +39,7 @@ public:
|
|||
|
||||
LayerComposite* GetFirstChildComposite();
|
||||
|
||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
||||
const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||
virtual void RenderLayer(const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||
|
||||
virtual void ComputeEffectiveTransforms(const gfx3DMatrix& aTransformToSurface) MOZ_OVERRIDE
|
||||
{
|
||||
|
@ -65,7 +63,6 @@ class RefLayerComposite : public RefLayer,
|
|||
{
|
||||
template<class ContainerT>
|
||||
friend void ContainerRender(ContainerT* aContainer,
|
||||
const nsIntPoint& aOffset,
|
||||
LayerManagerComposite* aManager,
|
||||
const nsIntRect& aClipRect);
|
||||
public:
|
||||
|
@ -79,8 +76,7 @@ public:
|
|||
|
||||
LayerComposite* GetFirstChildComposite();
|
||||
|
||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
||||
const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||
virtual void RenderLayer(const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||
|
||||
virtual void ComputeEffectiveTransforms(const gfx3DMatrix& aTransformToSurface) MOZ_OVERRIDE
|
||||
{
|
||||
|
|
|
@ -56,7 +56,6 @@ void
|
|||
ContentHostBase::Composite(EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const Point& aOffset,
|
||||
const Filter& aFilter,
|
||||
const Rect& aClipRect,
|
||||
const nsIntRegion* aVisibleRegion,
|
||||
|
@ -188,12 +187,12 @@ ContentHostBase::Composite(EffectChain& aEffectChain,
|
|||
Float(tileRegionRect.y) / texRect.height,
|
||||
Float(tileRegionRect.width) / texRect.width,
|
||||
Float(tileRegionRect.height) / texRect.height);
|
||||
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain, aOpacity, aTransform, aOffset);
|
||||
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain, aOpacity, aTransform);
|
||||
if (usingTiles) {
|
||||
DiagnosticTypes diagnostics = DIAGNOSTIC_CONTENT | DIAGNOSTIC_BIGIMAGE;
|
||||
diagnostics |= iterOnWhite ? DIAGNOSTIC_COMPONENT_ALPHA : 0;
|
||||
GetCompositor()->DrawDiagnostics(diagnostics, rect, aClipRect,
|
||||
aTransform, aOffset);
|
||||
aTransform);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -213,7 +212,7 @@ ContentHostBase::Composite(EffectChain& aEffectChain,
|
|||
|
||||
DiagnosticTypes diagnostics = DIAGNOSTIC_CONTENT;
|
||||
diagnostics |= iterOnWhite ? DIAGNOSTIC_COMPONENT_ALPHA : 0;
|
||||
GetCompositor()->DrawDiagnostics(diagnostics, *aVisibleRegion, aClipRect, aTransform, aOffset);
|
||||
GetCompositor()->DrawDiagnostics(diagnostics, *aVisibleRegion, aClipRect, aTransform);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -96,7 +96,6 @@ public:
|
|||
virtual void Composite(EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset,
|
||||
const gfx::Filter& aFilter,
|
||||
const gfx::Rect& aClipRect,
|
||||
const nsIntRegion* aVisibleRegion = nullptr,
|
||||
|
@ -275,7 +274,6 @@ public:
|
|||
virtual void Composite(EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset,
|
||||
const gfx::Filter& aFilter,
|
||||
const gfx::Rect& aClipRect,
|
||||
const nsIntRegion* aVisibleRegion = nullptr,
|
||||
|
@ -284,7 +282,7 @@ public:
|
|||
ProcessTextureUpdates();
|
||||
|
||||
ContentHostBase::Composite(aEffectChain, aOpacity,
|
||||
aTransform, aOffset, aFilter,
|
||||
aTransform, aFilter,
|
||||
aClipRect, aVisibleRegion,
|
||||
aLayerProperties);
|
||||
}
|
||||
|
|
|
@ -61,7 +61,6 @@ void
|
|||
ImageHost::Composite(EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset,
|
||||
const gfx::Filter& aFilter,
|
||||
const gfx::Rect& aClipRect,
|
||||
const nsIntRegion* aVisibleRegion,
|
||||
|
@ -115,15 +114,15 @@ ImageHost::Composite(EffectChain& aEffectChain,
|
|||
effect->mTextureCoords = Rect(0, 0, 1, 1);
|
||||
}
|
||||
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
||||
aOpacity, aTransform, aOffset);
|
||||
aOpacity, aTransform);
|
||||
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE|DIAGNOSTIC_BIGIMAGE,
|
||||
rect, aClipRect, aTransform, aOffset);
|
||||
rect, aClipRect, aTransform);
|
||||
} while (it->NextTile());
|
||||
it->EndTileIteration();
|
||||
// layer border
|
||||
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE,
|
||||
gfxPictureRect, aClipRect,
|
||||
aTransform, aOffset);
|
||||
aTransform);
|
||||
} else {
|
||||
IntSize textureSize = source->GetSize();
|
||||
gfx::Rect rect;
|
||||
|
@ -144,10 +143,10 @@ ImageHost::Composite(EffectChain& aEffectChain,
|
|||
}
|
||||
|
||||
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
||||
aOpacity, aTransform, aOffset);
|
||||
aOpacity, aTransform);
|
||||
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE,
|
||||
rect, aClipRect,
|
||||
aTransform, aOffset);
|
||||
aTransform);
|
||||
}
|
||||
mFrontBuffer->Unlock();
|
||||
}
|
||||
|
@ -265,7 +264,6 @@ void
|
|||
DeprecatedImageHostSingle::Composite(EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset,
|
||||
const gfx::Filter& aFilter,
|
||||
const gfx::Rect& aClipRect,
|
||||
const nsIntRegion* aVisibleRegion,
|
||||
|
@ -303,9 +301,9 @@ DeprecatedImageHostSingle::Composite(EffectChain& aEffectChain,
|
|||
nsIntRect tileRect = it->GetTileRect();
|
||||
gfx::Rect rect(tileRect.x, tileRect.y, tileRect.width, tileRect.height);
|
||||
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
||||
aOpacity, aTransform, aOffset);
|
||||
aOpacity, aTransform);
|
||||
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE|DIAGNOSTIC_BIGIMAGE,
|
||||
rect, aClipRect, aTransform, aOffset);
|
||||
rect, aClipRect, aTransform);
|
||||
} while (it->NextTile());
|
||||
it->EndTileIteration();
|
||||
} else {
|
||||
|
@ -329,9 +327,9 @@ DeprecatedImageHostSingle::Composite(EffectChain& aEffectChain,
|
|||
}
|
||||
|
||||
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
||||
aOpacity, aTransform, aOffset);
|
||||
aOpacity, aTransform);
|
||||
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE,
|
||||
rect, aClipRect, aTransform, aOffset);
|
||||
rect, aClipRect, aTransform);
|
||||
}
|
||||
|
||||
mDeprecatedTextureHost->Unlock();
|
||||
|
|
|
@ -49,7 +49,6 @@ public:
|
|||
virtual void Composite(EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset,
|
||||
const gfx::Filter& aFilter,
|
||||
const gfx::Rect& aClipRect,
|
||||
const nsIntRegion* aVisibleRegion = nullptr,
|
||||
|
@ -110,7 +109,6 @@ public:
|
|||
virtual void Composite(EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset,
|
||||
const gfx::Filter& aFilter,
|
||||
const gfx::Rect& aClipRect,
|
||||
const nsIntRegion* aVisibleRegion = nullptr,
|
||||
|
|
|
@ -78,8 +78,7 @@ ImageLayerComposite::GetLayer()
|
|||
}
|
||||
|
||||
void
|
||||
ImageLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
||||
const nsIntRect& aClipRect)
|
||||
ImageLayerComposite::RenderLayer(const nsIntRect& aClipRect)
|
||||
{
|
||||
if (!mImageHost || !mImageHost->IsAttached()) {
|
||||
return;
|
||||
|
@ -104,7 +103,6 @@ ImageLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
|||
mImageHost->Composite(effectChain,
|
||||
GetEffectiveOpacity(),
|
||||
transform,
|
||||
gfx::Point(aOffset.x, aOffset.y),
|
||||
gfx::ToFilter(mFilter),
|
||||
clipRect);
|
||||
}
|
||||
|
|
|
@ -44,8 +44,7 @@ public:
|
|||
|
||||
virtual Layer* GetLayer() MOZ_OVERRIDE;
|
||||
|
||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
||||
const nsIntRect& aClipRect);
|
||||
virtual void RenderLayer(const nsIntRect& aClipRect);
|
||||
|
||||
virtual void ComputeEffectiveTransforms(const gfx3DMatrix& aTransformToSurface) MOZ_OVERRIDE;
|
||||
|
||||
|
|
|
@ -303,8 +303,7 @@ LayerManagerComposite::RenderDebugOverlay(const Rect& aBounds)
|
|||
clip,
|
||||
effects,
|
||||
opacity,
|
||||
gfx::Matrix4x4(),
|
||||
gfx::Point());
|
||||
gfx::Matrix4x4());
|
||||
}
|
||||
// We intentionally overflow at 2^16.
|
||||
sFrameCount++;
|
||||
|
@ -359,7 +358,7 @@ LayerManagerComposite::Render()
|
|||
mCompositor->RestoreState();
|
||||
|
||||
// Render our layers.
|
||||
RootLayer()->RenderLayer(nsIntPoint(0, 0), clipRect);
|
||||
RootLayer()->RenderLayer(clipRect);
|
||||
|
||||
// Allow widget to render a custom foreground.
|
||||
mCompositor->SaveState();
|
||||
|
|
|
@ -317,8 +317,7 @@ public:
|
|||
|
||||
virtual Layer* GetLayer() = 0;
|
||||
|
||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
||||
const nsIntRect& aClipRect) = 0;
|
||||
virtual void RenderLayer(const nsIntRect& aClipRect) = 0;
|
||||
|
||||
virtual void SetCompositableHost(CompositableHost* aHost)
|
||||
{
|
||||
|
|
|
@ -95,8 +95,7 @@ ThebesLayerComposite::GetRenderState()
|
|||
}
|
||||
|
||||
void
|
||||
ThebesLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
||||
const nsIntRect& aClipRect)
|
||||
ThebesLayerComposite::RenderLayer(const nsIntRect& aClipRect)
|
||||
{
|
||||
if (!mBuffer || !mBuffer->IsAttached()) {
|
||||
return;
|
||||
|
@ -139,7 +138,6 @@ ThebesLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
|||
mBuffer->Composite(effectChain,
|
||||
GetEffectiveOpacity(),
|
||||
transform,
|
||||
gfx::Point(aOffset.x, aOffset.y),
|
||||
gfx::FILTER_LINEAR,
|
||||
clipRect,
|
||||
&visibleRegion,
|
||||
|
|
|
@ -53,8 +53,7 @@ public:
|
|||
|
||||
virtual TiledLayerComposer* GetTiledLayerComposer() MOZ_OVERRIDE;
|
||||
|
||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
||||
const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||
virtual void RenderLayer(const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||
|
||||
virtual void CleanupResources() MOZ_OVERRIDE;
|
||||
|
||||
|
|
|
@ -146,7 +146,6 @@ void
|
|||
TiledContentHost::Composite(EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset,
|
||||
const gfx::Filter& aFilter,
|
||||
const gfx::Rect& aClipRect,
|
||||
const nsIntRegion* aVisibleRegion /* = nullptr */,
|
||||
|
@ -164,8 +163,8 @@ TiledContentHost::Composite(EffectChain& aEffectChain,
|
|||
|
||||
RenderLayerBuffer(mLowPrecisionVideoMemoryTiledBuffer,
|
||||
mLowPrecisionVideoMemoryTiledBuffer.GetValidRegion(), aEffectChain, aOpacity,
|
||||
aOffset, aFilter, aClipRect, aLayerProperties->mValidRegion, visibleRect, aTransform);
|
||||
RenderLayerBuffer(mVideoMemoryTiledBuffer, aLayerProperties->mValidRegion, aEffectChain, aOpacity, aOffset,
|
||||
aFilter, aClipRect, aLayerProperties->mValidRegion, visibleRect, aTransform);
|
||||
RenderLayerBuffer(mVideoMemoryTiledBuffer, aLayerProperties->mValidRegion, aEffectChain, aOpacity,
|
||||
aFilter, aClipRect, nsIntRegion(), visibleRect, aTransform);
|
||||
}
|
||||
|
||||
|
@ -175,7 +174,6 @@ TiledContentHost::RenderTile(const TiledTexture& aTile,
|
|||
EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset,
|
||||
const gfx::Filter& aFilter,
|
||||
const gfx::Rect& aClipRect,
|
||||
const nsIntRegion& aScreenRegion,
|
||||
|
@ -202,9 +200,9 @@ TiledContentHost::RenderTile(const TiledTexture& aTile,
|
|||
textureRect.y / aTextureBounds.height,
|
||||
textureRect.width / aTextureBounds.width,
|
||||
textureRect.height / aTextureBounds.height);
|
||||
mCompositor->DrawQuad(graphicsRect, aClipRect, aEffectChain, aOpacity, aTransform, aOffset);
|
||||
mCompositor->DrawQuad(graphicsRect, aClipRect, aEffectChain, aOpacity, aTransform);
|
||||
mCompositor->DrawDiagnostics(DIAGNOSTIC_CONTENT|DIAGNOSTIC_TILE,
|
||||
graphicsRect, aClipRect, aTransform, aOffset);
|
||||
graphicsRect, aClipRect, aTransform);
|
||||
}
|
||||
|
||||
aTile.mDeprecatedTextureHost->Unlock();
|
||||
|
@ -215,7 +213,6 @@ TiledContentHost::RenderLayerBuffer(TiledLayerBufferComposite& aLayerBuffer,
|
|||
const nsIntRegion& aValidRegion,
|
||||
EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Point& aOffset,
|
||||
const gfx::Filter& aFilter,
|
||||
const gfx::Rect& aClipRect,
|
||||
const nsIntRegion& aMaskRegion,
|
||||
|
@ -276,7 +273,7 @@ TiledContentHost::RenderLayerBuffer(TiledLayerBufferComposite& aLayerBuffer,
|
|||
nsIntPoint tileOffset((x - tileStartX) * resolution,
|
||||
(y - tileStartY) * resolution);
|
||||
uint32_t tileSize = aLayerBuffer.GetTileLength();
|
||||
RenderTile(tileTexture, aEffectChain, aOpacity, aTransform, aOffset, aFilter, aClipRect, tileDrawRegion,
|
||||
RenderTile(tileTexture, aEffectChain, aOpacity, aTransform, aFilter, aClipRect, tileDrawRegion,
|
||||
tileOffset, nsIntSize(tileSize, tileSize));
|
||||
}
|
||||
}
|
||||
|
@ -289,7 +286,7 @@ TiledContentHost::RenderLayerBuffer(TiledLayerBufferComposite& aLayerBuffer,
|
|||
gfx::Rect rect(aVisibleRect.x, aVisibleRect.y,
|
||||
aVisibleRect.width, aVisibleRect.height);
|
||||
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_CONTENT,
|
||||
rect, aClipRect, aTransform, aOffset);
|
||||
rect, aClipRect, aTransform);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -202,7 +202,6 @@ public:
|
|||
EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset,
|
||||
const gfx::Filter& aFilter,
|
||||
const gfx::Rect& aClipRect,
|
||||
const nsIntRegion& aScreenRegion,
|
||||
|
@ -212,7 +211,6 @@ public:
|
|||
void Composite(EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset,
|
||||
const gfx::Filter& aFilter,
|
||||
const gfx::Rect& aClipRect,
|
||||
const nsIntRegion* aVisibleRegion = nullptr,
|
||||
|
@ -260,7 +258,6 @@ private:
|
|||
const nsIntRegion& aValidRegion,
|
||||
EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
const gfx::Point& aOffset,
|
||||
const gfx::Filter& aFilter,
|
||||
const gfx::Rect& aClipRect,
|
||||
const nsIntRegion& aMaskRegion,
|
||||
|
|
|
@ -481,8 +481,7 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect,
|
|||
const gfx::Rect& aClipRect,
|
||||
const EffectChain& aEffectChain,
|
||||
gfx::Float aOpacity,
|
||||
const gfx::Matrix4x4& aTransform,
|
||||
const gfx::Point& aOffset)
|
||||
const gfx::Matrix4x4& aTransform)
|
||||
{
|
||||
MOZ_ASSERT(mCurrentRT, "No render target");
|
||||
memcpy(&mVSConstants.layerTransform, &aTransform._11, 64);
|
||||
|
|
|
@ -94,8 +94,7 @@ public:
|
|||
const gfx::Rect &aClipRect,
|
||||
const EffectChain &aEffectChain,
|
||||
gfx::Float aOpacity,
|
||||
const gfx::Matrix4x4 &aTransform,
|
||||
const gfx::Point &aOffset) MOZ_OVERRIDE;
|
||||
const gfx::Matrix4x4 &aTransform) MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Start a new frame. If aClipRectIn is null, sets *aClipRectOut to the
|
||||
|
|
|
@ -191,10 +191,11 @@ ShaderModeForEffectType(EffectTypes aEffectType)
|
|||
}
|
||||
|
||||
void
|
||||
CompositorD3D9::DrawQuad(const gfx::Rect &aRect, const gfx::Rect &aClipRect,
|
||||
CompositorD3D9::DrawQuad(const gfx::Rect &aRect,
|
||||
const gfx::Rect &aClipRect,
|
||||
const EffectChain &aEffectChain,
|
||||
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
||||
const gfx::Point &aOffset)
|
||||
gfx::Float aOpacity,
|
||||
const gfx::Matrix4x4 &aTransform)
|
||||
{
|
||||
MOZ_ASSERT(mCurrentRT, "No render target");
|
||||
device()->SetVertexShaderConstantF(CBmLayerTransform, &aTransform._11, 4);
|
||||
|
|
|
@ -55,10 +55,11 @@ public:
|
|||
|
||||
virtual void SetDestinationSurfaceSize(const gfx::IntSize& aSize) MOZ_OVERRIDE {}
|
||||
|
||||
virtual void DrawQuad(const gfx::Rect &aRect, const gfx::Rect &aClipRect,
|
||||
virtual void DrawQuad(const gfx::Rect &aRect,
|
||||
const gfx::Rect &aClipRect,
|
||||
const EffectChain &aEffectChain,
|
||||
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
||||
const gfx::Point &aOffset) MOZ_OVERRIDE;
|
||||
gfx::Float aOpacity,
|
||||
const gfx::Matrix4x4 &aTransform) MOZ_OVERRIDE;
|
||||
|
||||
virtual void BeginFrame(const gfx::Rect *aClipRectIn,
|
||||
const gfxMatrix& aTransform,
|
||||
|
|
|
@ -983,10 +983,11 @@ private:
|
|||
};
|
||||
|
||||
void
|
||||
CompositorOGL::DrawQuad(const Rect& aRect, const Rect& aClipRect,
|
||||
CompositorOGL::DrawQuad(const Rect& aRect,
|
||||
const Rect& aClipRect,
|
||||
const EffectChain &aEffectChain,
|
||||
Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
||||
const Point& aOffset)
|
||||
Float aOpacity,
|
||||
const gfx::Matrix4x4 &aTransform)
|
||||
{
|
||||
PROFILER_LABEL("CompositorOGL", "DrawQuad");
|
||||
MOZ_ASSERT(mFrameInProgress, "frame not started");
|
||||
|
|
|
@ -94,10 +94,11 @@ public:
|
|||
virtual void SetRenderTarget(CompositingRenderTarget *aSurface) MOZ_OVERRIDE;
|
||||
virtual CompositingRenderTarget* GetCurrentRenderTarget() MOZ_OVERRIDE;
|
||||
|
||||
virtual void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect,
|
||||
virtual void DrawQuad(const gfx::Rect& aRect,
|
||||
const gfx::Rect& aClipRect,
|
||||
const EffectChain &aEffectChain,
|
||||
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
||||
const gfx::Point& aOffset) MOZ_OVERRIDE;
|
||||
gfx::Float aOpacity,
|
||||
const gfx::Matrix4x4 &aTransform) MOZ_OVERRIDE;
|
||||
|
||||
virtual void EndFrame() MOZ_OVERRIDE;
|
||||
virtual void EndFrameForExternalComposition(const gfxMatrix& aTransform) MOZ_OVERRIDE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче