Closed
Bug 963821
Opened 11 years ago
Closed 11 years ago
Port FPS counter to the Compositor API
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: BenWa, Assigned: BenWa)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
Works well on Windows now and should work fine when the basic compositor is ready.
Attachment #8365375 -
Flags: review?(bas)
Assignee | ||
Comment 1•11 years ago
|
||
Comment on attachment 8365375 [details] [diff] [review]
patch
Review of attachment 8365375 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/composite/LayerManagerComposite.cpp
@@ +316,5 @@
> + int aOffsetX, int aOffsetY,
> + Compositor* aCompositor,
> + EffectChain& aEffectChain)
> +{
> + unsigned int divisor = 100;
NOTE TO SELF: > 1000 -> 999
Comment 2•11 years ago
|
||
see also bug 874781
Yeah, I keep meaning to get back to bug 874781 :/
Assignee | ||
Comment 4•11 years ago
|
||
Comment on attachment 8365375 [details] [diff] [review]
patch
Vlad are you happy with going with this version instead of yours?
Our approach are very different. I'm not sure how they compare in performance but my patch is simpler and the performance is good enough. We could speed it up by extending Compositor API to support a DrawQuad API and possible add a way to retain an abtraction over VBO for accelerated backends.
Attachment #8365375 -
Flags: feedback?(vladimir)
Assignee | ||
Updated•11 years ago
|
Comment 5•11 years ago
|
||
Comment on attachment 8365375 [details] [diff] [review]
patch
Review of attachment 8365375 [details] [diff] [review]:
-----------------------------------------------------------------
Things that make things more cross-platform are generally good...
::: gfx/layers/composite/LayerManagerComposite.cpp
@@ +440,5 @@
> /** Our more efficient but less powerful alter ego, if one is available. */
> nsRefPtr<Composer2D> composer2D = mCompositor->GetWidget()->GetComposer2D();
>
> if (composer2D && composer2D->TryRender(mRoot, mWorldMatrix)) {
> + double fps = mFPS->mCompositionFps.AddFrameAndGetFps(TimeStamp::Now());
shouldn't this only be called if mFPS != nullptr?
Assignee | ||
Comment 6•11 years ago
|
||
Yes, another other review comments?
Assignee | ||
Comment 7•11 years ago
|
||
Assignee: nobody → bgirard
Attachment #8365375 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8365375 -
Flags: review?(bas)
Attachment #8365375 -
Flags: feedback?(vladimir)
Attachment #8373639 -
Flags: review?(bas)
Updated•11 years ago
|
Attachment #8373639 -
Flags: review?(bas) → review+
Assignee | ||
Comment 8•11 years ago
|
||
Assignee | ||
Comment 9•11 years ago
|
||
Comment 10•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Comment 11•11 years ago
|
||
BenWa, the following code causes the regression as not to use HWComposer at all. Can you fix it?
------------------------------------------------
/** Our more efficient but less powerful alter ego, if one is available. */
nsRefPtr<Composer2D> composer2D = mCompositor->GetWidget()->GetComposer2D();
- if (composer2D && composer2D->TryRender(mRoot, mWorldMatrix)) {
+ if (mFPS && composer2D && composer2D->TryRender(mRoot, mWorldMatrix)) {
+ double fps = mFPS->mCompositionFps.AddFrameAndGetFps(TimeStamp::Now());
+ if (gfxPlatform::GetPrefLayersDrawFPS()) {
+ printf_stderr("HWComposer: FPS is %g\n", fps);
+ }
mCompositor->EndFrameForExternalComposition(mWorldMatrix);
return;
}
Flags: needinfo?(bgirard)
(In reply to Benoit Girard (:BenWa) from comment #4)
> Comment on attachment 8365375 [details] [diff] [review]
> patch
>
> Vlad are you happy with going with this version instead of yours?
>
> Our approach are very different. I'm not sure how they compare in
> performance but my patch is simpler and the performance is good enough. We
> could speed it up by extending Compositor API to support a DrawQuad API and
> possible add a way to retain an abtraction over VBO for accelerated backends.
Oh yeah, go nuts. Getting something in is way better than blocking; the world has changed quite a bit since my patches too. It shouldn't hard to get any of the interesting bits from my patches back in again at some point.
Assignee | ||
Comment 13•11 years ago
|
||
Opps, filed bug 971875 to fix the regression.
It's really bad that we don't have any test for HWC on checkin :(
Flags: needinfo?(bgirard)
You need to log in
before you can comment on or make changes to this bug.
Description
•