Closed
Bug 1107297
Opened 10 years ago
Closed 10 years ago
D3D11 should only composite invalid rect
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: bas.schouten, Assigned: bas.schouten)
References
Details
Attachments
(1 file)
6.32 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
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 1•10 years ago
|
||
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(¶ms, 0, sizeof(DXGI_PRESENT_PARAMETERS));
Use mfbt/PodZero
@@ +891,5 @@
> + if (SUCCEEDED(hr) && chain) {
> + DXGI_PRESENT_PARAMETERS params;
> + memset(¶ms, 0, sizeof(DXGI_PRESENT_PARAMETERS));
> + params.DirtyRectsCount = mInvalidRegion.GetNumRects();
> + std::vector<RECT> rects;
rects.reserve(params.DirtyRectsCount)
Attachment #8531752 -
Flags: review?(jmuizelaar) → review+
Comment 2•10 years ago
|
||
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?
Comment 3•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Comment 4•10 years ago
|
||
I landed a trivial crosscompilation fixup:
https://hg.mozilla.org/integration/mozilla-inbound/rev/16ea12664917
Comment 5•10 years ago
|
||
Comment 7•10 years ago
|
||
@:bas seems busy.
@:jrmuizel], This should be backed out.
Flags: needinfo?(jmuizelaar)
Comment 8•10 years ago
|
||
Yes, this should get backed out. I think we should also probably back out bug 1102499 as it depends on this for performance.
Depends on: 1113155
Assignee | ||
Comment 9•10 years ago
|
||
We set a Friday deadline for fixing the regressions, otherwise we'll back this out on aurora.
Flags: needinfo?(jmuizelaar)
Flags: needinfo?(bas)
You need to log in
before you can comment on or make changes to this bug.
Description
•