Closed Bug 1107297 Opened 10 years ago Closed 10 years ago

D3D11 should only composite invalid rect

Categories

(Core :: Graphics: Layers, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: bas.schouten, Assigned: bas.schouten)

References

Details

Attachments

(1 file)

We're currently always recomposing and representing the whole window when using the D3D11 compositor. This is wasteful. Let's not. This essentially is the same behavior as the Basic compositor.
Attachment #8531752 - Flags: review?(jmuizelaar)
Comment on attachment 8531752 [details] [diff] [review] Only recomposite and present the damaged area of the compositor Review of attachment 8531752 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/d3d11/CompositorD3D11.cpp @@ +889,5 @@ > + RefPtr<IDXGISwapChain1> chain; > + HRESULT hr = mSwapChain->QueryInterface((IDXGISwapChain1**)byRef(chain)); > + if (SUCCEEDED(hr) && chain) { > + DXGI_PRESENT_PARAMETERS params; > + memset(&params, 0, sizeof(DXGI_PRESENT_PARAMETERS)); Use mfbt/PodZero @@ +891,5 @@ > + if (SUCCEEDED(hr) && chain) { > + DXGI_PRESENT_PARAMETERS params; > + memset(&params, 0, sizeof(DXGI_PRESENT_PARAMETERS)); > + params.DirtyRectsCount = mInvalidRegion.GetNumRects(); > + std::vector<RECT> rects; rects.reserve(params.DirtyRectsCount)
Attachment #8531752 - Flags: review?(jmuizelaar) → review+
Comment on attachment 8531752 [details] [diff] [review] Only recomposite and present the damaged area of the compositor Review of attachment 8531752 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/d3d11/CompositorD3D11.cpp @@ +621,5 @@ > + if (mCurrentRT == mDefaultRT) { > + scissor.left = std::max(int32_t(aClipRect.x), mCurrentClip.x); > + scissor.right = std::min(int32_t(aClipRect.XMost()), mCurrentClip.XMost()); > + scissor.top = std::max(int32_t(aClipRect.y), mCurrentClip.y); > + scissor.bottom = std::min(int32_t(aClipRect.YMost()), mCurrentClip.YMost()); I'd like this better if you intersected the rects and set from that. i.e. clipRect = aClipRect; if (mCurrentRT == mDefaultRT) { clipRect = intersect(aClipRect, mCurrentClip); } scissor.left = clipRect.x .... @@ +862,5 @@ > if (aRenderBoundsOut) { > *aRenderBoundsOut = Rect(0, 0, mSize.width, mSize.height); > } > > D3D11_RECT scissor; scissor is now unused?
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Depends on: 1108970
Depends on: 1113197
Depends on: 1116177
Depends on: 1121339
This should be backed out.
Flags: needinfo?(bas)
@:bas seems busy. @:jrmuizel], This should be backed out.
Flags: needinfo?(jmuizelaar)
Yes, this should get backed out. I think we should also probably back out bug 1102499 as it depends on this for performance.
We set a Friday deadline for fixing the regressions, otherwise we'll back this out on aurora.
Flags: needinfo?(jmuizelaar)
Flags: needinfo?(bas)
Depends on: 1117925
Depends on: 1124543
Depends on: 1140362
Depends on: 1161978
Depends on: 1167485
Depends on: 1237056
Depends on: 1240073
Depends on: 1316764
Depends on: 1325235
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: