Loading gfx/layers/Compositor.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ Compositor::ShouldDrawDiagnostics(DiagnosticFlags aFlags) void Compositor::DrawDiagnostics(DiagnosticFlags aFlags, const nsIntRegion& aVisibleRegion, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform, uint32_t aFlashCounter) { Loading @@ -72,7 +72,7 @@ Compositor::DrawDiagnostics(DiagnosticFlags aFlags, void Compositor::DrawDiagnostics(DiagnosticFlags aFlags, const gfx::Rect& aVisibleRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform, uint32_t aFlashCounter) { Loading @@ -87,7 +87,7 @@ Compositor::DrawDiagnostics(DiagnosticFlags aFlags, void Compositor::DrawDiagnosticsInternal(DiagnosticFlags aFlags, const gfx::Rect& aVisibleRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform, uint32_t aFlashCounter) { Loading Loading @@ -145,7 +145,7 @@ Compositor::DrawDiagnosticsInternal(DiagnosticFlags aFlags, void Compositor::SlowDrawRect(const gfx::Rect& aRect, const gfx::Color& aColor, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform, int aStrokeWidth) { // TODO This should draw a rect using a single draw call but since Loading Loading @@ -178,7 +178,7 @@ Compositor::SlowDrawRect(const gfx::Rect& aRect, const gfx::Color& aColor, void Compositor::FillRect(const gfx::Rect& aRect, const gfx::Color& aColor, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform) { float opacity = 1.0f; Loading Loading @@ -356,7 +356,7 @@ DecomposeIntoNoRepeatRects(const gfx::Rect& aRect, gfx::IntRect Compositor::ComputeBackdropCopyRect(const gfx::Rect& aRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform, gfx::Matrix4x4* aOutTransform, gfx::Rect* aOutLayerQuad) Loading @@ -365,7 +365,7 @@ Compositor::ComputeBackdropCopyRect(const gfx::Rect& aRect, gfx::IntPoint rtOffset = GetCurrentRenderTarget()->GetOrigin(); gfx::IntSize rtSize = GetCurrentRenderTarget()->GetSize(); gfx::Rect renderBounds(0, 0, rtSize.width, rtSize.height); gfx::IntRect renderBounds(0, 0, rtSize.width, rtSize.height); renderBounds.IntersectRect(renderBounds, aClipRect); renderBounds.MoveBy(rtOffset); Loading gfx/layers/Compositor.h +12 −12 Original line number Diff line number Diff line Loading @@ -319,7 +319,7 @@ public: * aVisibleRect is used to determine which edges should be antialiased, * without applying the effect to the inner edges of a tiled layer. */ virtual void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect, virtual void DrawQuad(const gfx::Rect& aRect, const gfx::IntRect& aClipRect, const EffectChain& aEffectChain, gfx::Float aOpacity, const gfx::Matrix4x4& aTransform, const gfx::Rect& aVisibleRect) = 0; Loading @@ -329,7 +329,7 @@ public: * Use this when you are drawing a single quad that is not part of a tiled * layer. */ void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect, void DrawQuad(const gfx::Rect& aRect, const gfx::IntRect& aClipRect, const EffectChain& aEffectChain, gfx::Float aOpacity, const gfx::Matrix4x4& aTransform) { DrawQuad(aRect, aClipRect, aEffectChain, aOpacity, aTransform, aRect); Loading @@ -339,7 +339,7 @@ public: * Draw an unfilled solid color rect. Typically used for debugging overlays. */ void SlowDrawRect(const gfx::Rect& aRect, const gfx::Color& color, const gfx::Rect& aClipRect = gfx::Rect(), const gfx::IntRect& aClipRect = gfx::IntRect(), const gfx::Matrix4x4& aTransform = gfx::Matrix4x4(), int aStrokeWidth = 1); Loading @@ -347,7 +347,7 @@ public: * Draw a solid color filled rect. This is a simple DrawQuad helper. */ void FillRect(const gfx::Rect& aRect, const gfx::Color& color, const gfx::Rect& aClipRect = gfx::Rect(), const gfx::IntRect& aClipRect = gfx::IntRect(), const gfx::Matrix4x4& aTransform = gfx::Matrix4x4()); /* Loading Loading @@ -378,11 +378,11 @@ public: * opaque content. */ virtual void BeginFrame(const nsIntRegion& aInvalidRegion, const gfx::Rect* aClipRectIn, const gfx::Rect& aRenderBounds, const gfx::IntRect* aClipRectIn, const gfx::IntRect& aRenderBounds, const nsIntRegion& aOpaqueRegion, gfx::Rect* aClipRectOut = nullptr, gfx::Rect* aRenderBoundsOut = nullptr) = 0; gfx::IntRect* aClipRectOut = nullptr, gfx::IntRect* aRenderBoundsOut = nullptr) = 0; /** * Flush the current frame to the screen and tidy up. Loading Loading @@ -417,13 +417,13 @@ public: void DrawDiagnostics(DiagnosticFlags aFlags, const gfx::Rect& visibleRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& transform, uint32_t aFlashCounter = DIAGNOSTIC_FLASH_COUNTER_MAX); void DrawDiagnostics(DiagnosticFlags aFlags, const nsIntRegion& visibleRegion, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& transform, uint32_t aFlashCounter = DIAGNOSTIC_FLASH_COUNTER_MAX); Loading Loading @@ -540,7 +540,7 @@ public: protected: void DrawDiagnosticsInternal(DiagnosticFlags aFlags, const gfx::Rect& aVisibleRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& transform, uint32_t aFlashCounter); Loading @@ -556,7 +556,7 @@ protected: */ gfx::IntRect ComputeBackdropCopyRect( const gfx::Rect& aRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform, gfx::Matrix4x4* aOutTransform, gfx::Rect* aOutLayerQuad = nullptr); Loading gfx/layers/basic/BasicCompositor.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -277,7 +277,7 @@ SetupMask(const EffectChain& aEffectChain, void BasicCompositor::DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const EffectChain &aEffectChain, gfx::Float aOpacity, const gfx::Matrix4x4& aTransform, Loading Loading @@ -323,7 +323,7 @@ BasicCompositor::DrawQuad(const gfx::Rect& aRect, new3DTransform.PreTranslate(aRect.x, aRect.y, 0); } buffer->PushClipRect(aClipRect); buffer->PushClipRect(Rect(aClipRect)); newTransform.PostTranslate(-offset.x, -offset.y); buffer->SetTransform(newTransform); Loading Loading @@ -475,14 +475,14 @@ BasicCompositor::ClearRect(const gfx::Rect& aRect) void BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion, const gfx::Rect *aClipRectIn, const gfx::Rect& aRenderBounds, const gfx::IntRect *aClipRectIn, const gfx::IntRect& aRenderBounds, const nsIntRegion& aOpaqueRegion, gfx::Rect *aClipRectOut /* = nullptr */, gfx::Rect *aRenderBoundsOut /* = nullptr */) gfx::IntRect *aClipRectOut /* = nullptr */, gfx::IntRect *aRenderBoundsOut /* = nullptr */) { LayoutDeviceIntRect intRect(LayoutDeviceIntPoint(), mWidget->GetClientSize()); Rect rect = Rect(0, 0, intRect.width, intRect.height); IntRect rect = IntRect(0, 0, intRect.width, intRect.height); LayoutDeviceIntRegion invalidRegionSafe; if (mDidExternalComposition) { Loading @@ -500,7 +500,7 @@ BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion, mInvalidRect = mInvalidRegion.GetBounds(); if (aRenderBoundsOut) { *aRenderBoundsOut = Rect(); *aRenderBoundsOut = IntRect(); } BufferMode bufferMode = BufferMode::BUFFERED; Loading Loading @@ -560,9 +560,9 @@ BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion, } if (aClipRectIn) { mRenderTarget->mDrawTarget->PushClipRect(*aClipRectIn); mRenderTarget->mDrawTarget->PushClipRect(Rect(*aClipRectIn)); } else { mRenderTarget->mDrawTarget->PushClipRect(rect); mRenderTarget->mDrawTarget->PushClipRect(Rect(rect)); if (aClipRectOut) { *aClipRectOut = rect; } Loading gfx/layers/basic/BasicCompositor.h +5 −5 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ public: } virtual void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const EffectChain &aEffectChain, gfx::Float aOpacity, const gfx::Matrix4x4& aTransform, Loading @@ -100,11 +100,11 @@ public: virtual void ClearRect(const gfx::Rect& aRect) override; virtual void BeginFrame(const nsIntRegion& aInvalidRegion, const gfx::Rect *aClipRectIn, const gfx::Rect& aRenderBounds, const gfx::IntRect *aClipRectIn, const gfx::IntRect& aRenderBounds, const nsIntRegion& aOpaqueRegion, gfx::Rect *aClipRectOut = nullptr, gfx::Rect *aRenderBoundsOut = nullptr) override; gfx::IntRect *aClipRectOut = nullptr, gfx::IntRect *aRenderBoundsOut = nullptr) override; virtual void EndFrame() override; virtual void EndFrameForExternalComposition(const gfx::Matrix& aTransform) override; Loading gfx/layers/composite/CanvasLayerComposite.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ CanvasLayerComposite::RenderLayer(const IntRect& aClipRect) #endif RenderWithAllMasks(this, mCompositor, aClipRect, [&](EffectChain& effectChain, const Rect& clipRect) { [&](EffectChain& effectChain, const IntRect& clipRect) { mCompositableHost->Composite(this, effectChain, GetEffectiveOpacity(), GetEffectiveTransform(), Loading Loading
gfx/layers/Compositor.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ Compositor::ShouldDrawDiagnostics(DiagnosticFlags aFlags) void Compositor::DrawDiagnostics(DiagnosticFlags aFlags, const nsIntRegion& aVisibleRegion, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform, uint32_t aFlashCounter) { Loading @@ -72,7 +72,7 @@ Compositor::DrawDiagnostics(DiagnosticFlags aFlags, void Compositor::DrawDiagnostics(DiagnosticFlags aFlags, const gfx::Rect& aVisibleRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform, uint32_t aFlashCounter) { Loading @@ -87,7 +87,7 @@ Compositor::DrawDiagnostics(DiagnosticFlags aFlags, void Compositor::DrawDiagnosticsInternal(DiagnosticFlags aFlags, const gfx::Rect& aVisibleRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform, uint32_t aFlashCounter) { Loading Loading @@ -145,7 +145,7 @@ Compositor::DrawDiagnosticsInternal(DiagnosticFlags aFlags, void Compositor::SlowDrawRect(const gfx::Rect& aRect, const gfx::Color& aColor, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform, int aStrokeWidth) { // TODO This should draw a rect using a single draw call but since Loading Loading @@ -178,7 +178,7 @@ Compositor::SlowDrawRect(const gfx::Rect& aRect, const gfx::Color& aColor, void Compositor::FillRect(const gfx::Rect& aRect, const gfx::Color& aColor, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform) { float opacity = 1.0f; Loading Loading @@ -356,7 +356,7 @@ DecomposeIntoNoRepeatRects(const gfx::Rect& aRect, gfx::IntRect Compositor::ComputeBackdropCopyRect(const gfx::Rect& aRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform, gfx::Matrix4x4* aOutTransform, gfx::Rect* aOutLayerQuad) Loading @@ -365,7 +365,7 @@ Compositor::ComputeBackdropCopyRect(const gfx::Rect& aRect, gfx::IntPoint rtOffset = GetCurrentRenderTarget()->GetOrigin(); gfx::IntSize rtSize = GetCurrentRenderTarget()->GetSize(); gfx::Rect renderBounds(0, 0, rtSize.width, rtSize.height); gfx::IntRect renderBounds(0, 0, rtSize.width, rtSize.height); renderBounds.IntersectRect(renderBounds, aClipRect); renderBounds.MoveBy(rtOffset); Loading
gfx/layers/Compositor.h +12 −12 Original line number Diff line number Diff line Loading @@ -319,7 +319,7 @@ public: * aVisibleRect is used to determine which edges should be antialiased, * without applying the effect to the inner edges of a tiled layer. */ virtual void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect, virtual void DrawQuad(const gfx::Rect& aRect, const gfx::IntRect& aClipRect, const EffectChain& aEffectChain, gfx::Float aOpacity, const gfx::Matrix4x4& aTransform, const gfx::Rect& aVisibleRect) = 0; Loading @@ -329,7 +329,7 @@ public: * Use this when you are drawing a single quad that is not part of a tiled * layer. */ void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect, void DrawQuad(const gfx::Rect& aRect, const gfx::IntRect& aClipRect, const EffectChain& aEffectChain, gfx::Float aOpacity, const gfx::Matrix4x4& aTransform) { DrawQuad(aRect, aClipRect, aEffectChain, aOpacity, aTransform, aRect); Loading @@ -339,7 +339,7 @@ public: * Draw an unfilled solid color rect. Typically used for debugging overlays. */ void SlowDrawRect(const gfx::Rect& aRect, const gfx::Color& color, const gfx::Rect& aClipRect = gfx::Rect(), const gfx::IntRect& aClipRect = gfx::IntRect(), const gfx::Matrix4x4& aTransform = gfx::Matrix4x4(), int aStrokeWidth = 1); Loading @@ -347,7 +347,7 @@ public: * Draw a solid color filled rect. This is a simple DrawQuad helper. */ void FillRect(const gfx::Rect& aRect, const gfx::Color& color, const gfx::Rect& aClipRect = gfx::Rect(), const gfx::IntRect& aClipRect = gfx::IntRect(), const gfx::Matrix4x4& aTransform = gfx::Matrix4x4()); /* Loading Loading @@ -378,11 +378,11 @@ public: * opaque content. */ virtual void BeginFrame(const nsIntRegion& aInvalidRegion, const gfx::Rect* aClipRectIn, const gfx::Rect& aRenderBounds, const gfx::IntRect* aClipRectIn, const gfx::IntRect& aRenderBounds, const nsIntRegion& aOpaqueRegion, gfx::Rect* aClipRectOut = nullptr, gfx::Rect* aRenderBoundsOut = nullptr) = 0; gfx::IntRect* aClipRectOut = nullptr, gfx::IntRect* aRenderBoundsOut = nullptr) = 0; /** * Flush the current frame to the screen and tidy up. Loading Loading @@ -417,13 +417,13 @@ public: void DrawDiagnostics(DiagnosticFlags aFlags, const gfx::Rect& visibleRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& transform, uint32_t aFlashCounter = DIAGNOSTIC_FLASH_COUNTER_MAX); void DrawDiagnostics(DiagnosticFlags aFlags, const nsIntRegion& visibleRegion, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& transform, uint32_t aFlashCounter = DIAGNOSTIC_FLASH_COUNTER_MAX); Loading Loading @@ -540,7 +540,7 @@ public: protected: void DrawDiagnosticsInternal(DiagnosticFlags aFlags, const gfx::Rect& aVisibleRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& transform, uint32_t aFlashCounter); Loading @@ -556,7 +556,7 @@ protected: */ gfx::IntRect ComputeBackdropCopyRect( const gfx::Rect& aRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const gfx::Matrix4x4& aTransform, gfx::Matrix4x4* aOutTransform, gfx::Rect* aOutLayerQuad = nullptr); Loading
gfx/layers/basic/BasicCompositor.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -277,7 +277,7 @@ SetupMask(const EffectChain& aEffectChain, void BasicCompositor::DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const EffectChain &aEffectChain, gfx::Float aOpacity, const gfx::Matrix4x4& aTransform, Loading Loading @@ -323,7 +323,7 @@ BasicCompositor::DrawQuad(const gfx::Rect& aRect, new3DTransform.PreTranslate(aRect.x, aRect.y, 0); } buffer->PushClipRect(aClipRect); buffer->PushClipRect(Rect(aClipRect)); newTransform.PostTranslate(-offset.x, -offset.y); buffer->SetTransform(newTransform); Loading Loading @@ -475,14 +475,14 @@ BasicCompositor::ClearRect(const gfx::Rect& aRect) void BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion, const gfx::Rect *aClipRectIn, const gfx::Rect& aRenderBounds, const gfx::IntRect *aClipRectIn, const gfx::IntRect& aRenderBounds, const nsIntRegion& aOpaqueRegion, gfx::Rect *aClipRectOut /* = nullptr */, gfx::Rect *aRenderBoundsOut /* = nullptr */) gfx::IntRect *aClipRectOut /* = nullptr */, gfx::IntRect *aRenderBoundsOut /* = nullptr */) { LayoutDeviceIntRect intRect(LayoutDeviceIntPoint(), mWidget->GetClientSize()); Rect rect = Rect(0, 0, intRect.width, intRect.height); IntRect rect = IntRect(0, 0, intRect.width, intRect.height); LayoutDeviceIntRegion invalidRegionSafe; if (mDidExternalComposition) { Loading @@ -500,7 +500,7 @@ BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion, mInvalidRect = mInvalidRegion.GetBounds(); if (aRenderBoundsOut) { *aRenderBoundsOut = Rect(); *aRenderBoundsOut = IntRect(); } BufferMode bufferMode = BufferMode::BUFFERED; Loading Loading @@ -560,9 +560,9 @@ BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion, } if (aClipRectIn) { mRenderTarget->mDrawTarget->PushClipRect(*aClipRectIn); mRenderTarget->mDrawTarget->PushClipRect(Rect(*aClipRectIn)); } else { mRenderTarget->mDrawTarget->PushClipRect(rect); mRenderTarget->mDrawTarget->PushClipRect(Rect(rect)); if (aClipRectOut) { *aClipRectOut = rect; } Loading
gfx/layers/basic/BasicCompositor.h +5 −5 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ public: } virtual void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect, const gfx::IntRect& aClipRect, const EffectChain &aEffectChain, gfx::Float aOpacity, const gfx::Matrix4x4& aTransform, Loading @@ -100,11 +100,11 @@ public: virtual void ClearRect(const gfx::Rect& aRect) override; virtual void BeginFrame(const nsIntRegion& aInvalidRegion, const gfx::Rect *aClipRectIn, const gfx::Rect& aRenderBounds, const gfx::IntRect *aClipRectIn, const gfx::IntRect& aRenderBounds, const nsIntRegion& aOpaqueRegion, gfx::Rect *aClipRectOut = nullptr, gfx::Rect *aRenderBoundsOut = nullptr) override; gfx::IntRect *aClipRectOut = nullptr, gfx::IntRect *aRenderBoundsOut = nullptr) override; virtual void EndFrame() override; virtual void EndFrameForExternalComposition(const gfx::Matrix& aTransform) override; Loading
gfx/layers/composite/CanvasLayerComposite.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ CanvasLayerComposite::RenderLayer(const IntRect& aClipRect) #endif RenderWithAllMasks(this, mCompositor, aClipRect, [&](EffectChain& effectChain, const Rect& clipRect) { [&](EffectChain& effectChain, const IntRect& clipRect) { mCompositableHost->Composite(this, effectChain, GetEffectiveOpacity(), GetEffectiveTransform(), Loading