Closed Bug 1052857 Opened 10 years ago Closed 10 years ago

Overdraw should report dst pixels, not src pixels

Categories

(Core :: Graphics: Layers, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34
blocking-b2g 2.0+
Tracking Status
firefox32 --- wontfix
firefox33 --- wontfix
firefox34 --- fixed
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed

People

(Reporter: BenWa, Assigned: BenWa)

References

Details

Attachments

(1 file, 1 obsolete file)

This is noticeable in the camera app where the video preview doesn't (cant?) match the destination 1:1.
Attached patch transform src rect (obsolete) — Splinter Review
Assignee: nobody → bgirard
Status: NEW → ASSIGNED
Attachment #8471922 - Flags: review?(jmuizelaar)
Comment on attachment 8471922 [details] [diff] [review]
transform src rect

Review of attachment 8471922 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/opengl/CompositorOGL.cpp
@@ +1068,5 @@
>  
> +  {
> +    const Rect destRect = aTransform.TransformBounds(aRect);
> +    mPixelsFilled += destRect.width * destRect.height;
> +  }

This doesn't really compute the right thing because of TransformBounds.
Attachment #8471922 - Flags: review?(jmuizelaar) → review+
Attached patch patchSplinter Review
I added a comment, we can fix it when we hit these cases.
Attachment #8471922 - Attachment is obsolete: true
Attachment #8471930 - Flags: review+
Would mPixelsFilled += aRect.width * aRect.height * aTransform.Determinant() work for simple transforms?
https://hg.mozilla.org/integration/mozilla-inbound/rev/4ae9574c9834

(In reply to Markus Stange [:mstange] from comment #4)
> Would mPixelsFilled += aRect.width * aRect.height * aTransform.Determinant()
> work for simple transforms?

My linear algebra is very poor so I don't know. If it's better then this please amend this patch. If not I'll look into it tomorrow.
My linear algebra is very poor, too, I was just curious if you knew. Don't worry about it. What you landed is fine I think.
https://hg.mozilla.org/mozilla-central/rev/4ae9574c9834
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Comment on attachment 8471930 [details] [diff] [review]
patch

Camera - Flame (KK)
-------------------
Photo: 392
Video: 542
Recording: 529

Camera - Flame (KK) WITH PATCH
------------------------------
Photo: 450
Video: 417
Recording: 404

So, overdraw *increases* slightly with this patch for the regular photo viewfinder. However, it goes down significantly for the video viewfinder and while recording video.
[Blocking Requested - why for this release]: This isn't really required, this change has no user visible impact and is very unlikely to causes stability issues. However if we compare overdraw with 2.0 and master the numbers will be wrong and it might lead us to chasing down ghosts so I rather uplift this.
blocking-b2g: --- → 2.0?
blocking-b2g: 2.0? → 2.0+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: