Closed Bug 1576499 Opened 5 years ago Closed 5 years ago

More Compositor cleanup

Categories

(Core :: Graphics: Layers, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

Attachments

(19 files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
No description provided.

There are three circumstances that make these transformations equivalent:

  • aClipRectIn and aClipRectOut are never both non-null.
  • The value of *aClipRectOut is ignored if *aRenderBoundsOut is empty.
  • aRenderBounds.TopLeft() is always (0, 0) because the ClientLayerManager
    calls targetBounds.MoveTo(0, 0) on the rect that eventually becomes
    aRenderBounds.
    (targetBounds -> Transaction::mTargetBounds -> TargetConfig::naturalBounds()
    -> LayerManagerComposite::mRenderBounds)

Depends on D43367

Whenever *aRenderBoundsOut was non-empty and aClipRectOut was non-null,
*aClipRectOut was set to the same value as *aRenderBoundsOut.

Depends on D43368

It turns out there's not much benefit to creating the DrawTarget at the beginning of the frame.
It's only needed between NormalDrawingDone() and EndFrame().

Depends on D43376

None of the three main if branches in TryToEndRemoteDrawing were entered in that case:

  • if (!aForceToEnd && !mTarget && NeedsToDeferEndRemoteDrawing()) wasn't entered because
    mTarget was non-null.
  • if (mRenderTarget->mDrawTarget != mDrawTarget) wasn't entered because mTarget
    drawing doesn't use a back buffer.
  • if (aForceToEnd || !mTarget) wasn't entered because aForceToEnd was false and
    mTarget was non-null.

Depends on D43377

This eliminates a boolean parameter whose meaning is not immediately obvious at the call site.

Depends on D43378

This makes it clear that only one of the possible call paths of
CreateRenderTargetForWindow can use a back buffer.
It causes some unfortunate duplication of the clear region computation.

Depends on D43379

This removes one user of mDrawTarget.

This change only makes a difference when we have a backbuffer; now we will create
DrawTargets that are similar to the back buffer instead of the front buffer.

Depends on D43380

Depends on D43382

The old code was making an autoRestoreTransform around dest and then quickly
overwriting dest with something new. I prefer creating the autoRestoreTransform
for buffer, which doesn't change over the course of this function.

Depends on D43383

It was only used in BeginFrame.

Depends on D43384

Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/d07fa3716e8e
Improve various rect things in BeginFrame implementations, no functional changes. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/9978f0fc0cd4
Change where aClipRectOut is set, in two BeginFrame implementations. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/31c30f46d367
Remove aClipRectOut parameter from Compositor::BeginFrame(). r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/32817ced1d52
Eliminate bounds variable from LayerManagerComposite::Render. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/f2ff20d5af92
Make clipRect an untyped IntRect. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/11dda086945d
Combine the two calls to BeginFrame. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/f55c80b421a9
Turn aClipRectIn into a Maybe and rename it to aClipRect, now that aClipRectOut is gone. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/03bdb2c6d8ce
Another random rect simplification. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/a659e96ceed9
Rename actualBounds to bounds. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/433509fe5892
Turn aRenderBoundsOut outparam into a Maybe<> return value. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/4c9cb18479d2
Move all mFullWindowRenderTarget maintenance to NormalDrawingDone(). r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/18ee06f7326a
Don't call TryToEndRemoteDrawing() in EndFrame when rendering to a copy target. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/4c4cf1a9bd7a
Split off EndRemoteDrawing from TryToEndRemoteDrawing and call it directly instead of calling TryToEndRemoteDrawing(true). r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/8db81887ada8
Move back buffer creation out of CreateRenderTargetForWindow into BeginFrame. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/4bba5287a59d
Use mRenderTarget->mDrawTarget to create similar draw targets in CreateDrawTarget. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/5857954dc2a1
Eliminate mDrawTarget and mDrawTargetBounds. Add mFrontBuffer which is only used when drawing to a back buffer. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/0c2e876254cb
Two random cleanups. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/b80e328a4f86
Clarify dest and buffer a little. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/f3f1c60d1991
Remove BasicCompositor::mInvalidRect. r=mattwoodrow
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: