Closed
Bug 1255703
Opened 9 years ago
Closed 9 years ago
Investigate using an image surfaces instead of win32 surfaces for basic compositor
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla49
People
(Reporter: jrmuizel, Assigned: sotaro)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 6 obsolete files)
10.33 KB,
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
Once we're using a dibsection for the backbuffer I don't think we have anything to gain from using win32 surfaces to do the actual composition. In all of the cases where we actually use gdi, I expect pixman is actually faster.
Reporter | ||
Updated•9 years ago
|
Blocks: unaccel-video
Updated•9 years ago
|
Component: Audio/Video → Graphics
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8738434 -
Attachment is obsolete: true
Assignee | ||
Comment 2•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → sotaro.ikeda.g
Assignee | ||
Comment 5•9 years ago
|
||
https://treeherder.mozilla.org/perf.html#/compare?originalProject=try&originalRevision=a8991a5d5450&newProject=try&newRevision=d692ed4a02ec&framework=1&showOnlyImportant=0
compare performance with/without patch applied with BasicCompositor. It seemed to improve "tscrollx opt e10s" and "tresize opt" a lot. But there are some tests that decreased performance a little bit.
Assignee | ||
Comment 6•9 years ago
|
||
:jrmuizel, can you comment to comment 5?
Flags: needinfo?(jmuizelaar)
Reporter | ||
Comment 7•9 years ago
|
||
I'm quite surprised by tscrollx opt e10s improvements. We should not be using basic compositor in the win7 and win8 cases.
Flags: needinfo?(jmuizelaar)
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #7)
> I'm quite surprised by tscrollx opt e10s improvements. We should not be
> using basic compositor in the win7 and win8 cases.
The Tryserver push just enabled BasicCompositor in all cases to check BasicCompositor's performance.
Reporter | ||
Comment 9•9 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #8)
> (In reply to Jeff Muizelaar [:jrmuizel] from comment #7)
> > I'm quite surprised by tscrollx opt e10s improvements. We should not be
> > using basic compositor in the win7 and win8 cases.
>
> The Tryserver push just enabled BasicCompositor in all cases to check
> BasicCompositor's performance.
Ah. That talos numbers look good then.
Assignee | ||
Updated•9 years ago
|
Attachment #8738902 -
Flags: review?(matt.woodrow)
Comment 10•9 years ago
|
||
Comment on attachment 8738902 [details] [diff] [review]
patch - Use image surfaces for basic compositor
Review of attachment 8738902 [details] [diff] [review]:
-----------------------------------------------------------------
This feels a bit awkward to me.
Can we instead just have windows/nsWindow override nsBaseWidget::GetBackBufferDrawTarget, call the nsBaseWidget version and then add the CreateDrawTargetForData code to the end?
That would mean the ClearRect call would still go through GDI (which I doubt matters), but if we really care then we could factor the nsBaseWidget version out into a few helpers and call those from nsWindow instead.
::: widget/nsIWidget.h
@@ +1326,5 @@
> + virtual already_AddRefed<mozilla::gfx::DrawTarget> GetBackBufferDrawTarget(mozilla::gfx::DrawTarget* aScreenTarget,
> + const LayoutDeviceIntRect& aRect,
> + const LayoutDeviceIntRect& aClearRect) = 0;
> +
> + virtual mozilla::gfx::DrawTarget* EndRemoteBackBufferDrawing() = 0;
Might as well return a SourceSurface from this, since that's what the callers want.
Drop the word 'Remote' from this, or add it to GetBackBufferDrawTarget so that it's clearer that they are a pair and need to be matched (a comment would be good too).
Attachment #8738902 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 11•9 years ago
|
||
Thanks for the advice. I agree the patch is a bit awkward. I rethink about it related to bug 1263527.
Assignee | ||
Comment 12•9 years ago
|
||
Apply the comment.
Attachment #8738902 -
Attachment is obsolete: true
Assignee | ||
Comment 13•9 years ago
|
||
Attachment #8751182 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8751185 -
Flags: review?(matt.woodrow)
Comment 14•9 years ago
|
||
Comment on attachment 8751185 [details] [diff] [review]
patch - Use image surfaces for basic compositor on Windows
Review of attachment 8751185 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/basic/BasicCompositor.cpp
@@ +173,5 @@
> RefPtr<BasicCompositingRenderTarget> rt;
> IntRect rect = aRect.ToUnknownRect();
>
> if (aBufferMode != BufferMode::BUFFER_NONE) {
> + RefPtr<DrawTarget> target = mWidget->GetBackBufferDrawTarget(mDrawTarget, aRect, aClearRect);
Can you please either assert that target != mDrawTarget, or add a 'mNeedsEndBackBufferDrawing' var, so that it's obvious that we always call EndBackBufferDrawing if we called GetBackBufferDrawTarget.
The current code relies on the implementation of GetBackBufferDrawTarget to not return aDrawTarget to be correct. I know that should always be true, but it requires looking up that function to know.
::: widget/windows/WinCompositorWidgetProxy.cpp
@@ +107,5 @@
>
> void
> WinCompositorWidgetProxy::EndRemoteDrawing()
> {
> + if (mLockedBackBufferData) {
Should we just make BasicCompositor call EndBackBufferDrawing from AbortFrame (if required), and then just assert that this never happens?
Attachment #8751185 -
Flags: review?(matt.woodrow) → review+
Assignee | ||
Comment 15•9 years ago
|
||
Apply the comment. Carry "r=mattwoodrow".
Attachment #8751185 -
Attachment is obsolete: true
Attachment #8751579 -
Flags: review+
Assignee | ||
Comment 16•9 years ago
|
||
Comment 17•9 years ago
|
||
Comment 18•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Comment 19•9 years ago
|
||
some wins on winxp talos:
https://treeherder.mozilla.org/perf.html#/alerts?id=1177
Reporter | ||
Comment 20•8 years ago
|
||
This brings general performance improvements when not using hardware acceleration on Windows.
relnote-firefox:
--- → 49+
You need to log in
before you can comment on or make changes to this bug.
Description
•