Closed
Bug 633344
Opened 14 years ago
Closed 13 years ago
Revert to exact resolution for static transformed ThebesLayers
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 637852
Tracking | Status | |
---|---|---|
blocking2.0 | --- | - |
People
(Reporter: roc, Assigned: mattwoodrow)
References
Details
(Whiteboard: [needs-review (roc)][not-ready])
Attachments
(5 files, 2 obsolete files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
In bug 586683 we clamp the scale factors we use to set resolution to a power of 2, to avoid rerendering too much as the scale factor changes. But if the transform is static we shouldn't clamp, we should use the optimal resolution.
This should be a softblocker, it'll be a quality regression over 3.6.
Reporter | ||
Comment 1•14 years ago
|
||
I think the best way to fix this might be to add a new flag on layers "transform is active", only clamp if that flag is set, and set the flag from nsDisplayTransform when the transform is known to be active there.
I'm not sure how this should interact with shadowlayers and their transforms though. Should we have them set the flag too, and possibly back out the patch in bug 633040 because it should be fixed by this bug?
Reporter | ||
Comment 2•14 years ago
|
||
The text is all fuzzy. It shouldn't be.
I think the patch in bug 633040 is still correct. BasicManager resolution is for all intents and purposes always an "exact resolution", so I don't think it would affect the "active flag". However we twiddle scales on active/inactive transformed *ShadowableLayers (et al.) doesn't affect *ShadowLayers either because the shadows just draw buffers that have a final computed resolution attached to them, they don't care how the resolution was computed. But maybe I misunderstand something.
Reporter | ||
Comment 4•14 years ago
|
||
Matt, can you work on this? I expect it should be quite easy.
Assignee: nobody → matt.woodrow+bugzilla
Assignee | ||
Comment 5•14 years ago
|
||
Assignee | ||
Comment 6•14 years ago
|
||
WIP, going to bed.
Assignee | ||
Comment 7•14 years ago
|
||
Clipping needs to happen before we scale the context. This is really ugly, any ideas how we can do this cleanly?
Attachment #514753 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Attachment #514752 -
Flags: review?(roc)
Assignee | ||
Updated•14 years ago
|
Attachment #514916 -
Flags: review?(roc)
Reporter | ||
Updated•14 years ago
|
Attachment #514752 -
Flags: review?(roc)
Attachment #514752 -
Flags: review+
Attachment #514752 -
Flags: approval2.0+
Updated•14 years ago
|
tracking-fennec: --- → ?
Reporter | ||
Comment 8•14 years ago
|
||
- float paintXRes = BasicManager()->XResolution() * gfxUtils::ClampToScaleFactor(scale.width);
- float paintYRes = BasicManager()->YResolution() * gfxUtils::ClampToScaleFactor(scale.height);
+ float paintXRes = BasicManager()->XResolution() * scale.width;
+ float paintYRes = BasicManager()->YResolution() * scale.height;
+ if (GetParent() && GetParent()->IsTransformActive()) {
+ //Parent (container) has an active transform, clamp to scale factors, otherwise paint at exact resolution.
+ paintXRes = gfxUtils::ClampToScaleFactor(paintXRes);
+ paintYRes = gfxUtils::ClampToScaleFactor(paintYRes);
Isn't this going to regress 633040 again, because we're going to go back to clamping the resolution * scale instead of just the scale?
Assignee | ||
Comment 9•14 years ago
|
||
Only while the transform component is actively changing! Probably worth fixing though :)
Assignee | ||
Comment 10•14 years ago
|
||
Only clamp the transform component.
Attachment #514916 -
Attachment is obsolete: true
Attachment #515401 -
Flags: review?(roc)
Attachment #514916 -
Flags: review?(roc)
Assignee | ||
Comment 11•14 years ago
|
||
Attachment #515402 -
Flags: review?(roc)
Reporter | ||
Updated•14 years ago
|
Attachment #515401 -
Flags: review?(roc) → review+
Reporter | ||
Comment 12•14 years ago
|
||
I don't understand the clipping changes in the OGL code here. Why are you adding a new clipping call? Why aren't we doing the "transform, round out, clip, inverse transform, round out, clip" dance?
Reporter | ||
Comment 13•14 years ago
|
||
It seems we won't be taking this for desktop FF4.
blocking2.0: final+ → -
Reporter | ||
Updated•14 years ago
|
Attachment #514752 -
Flags: approval2.0+ → approval2.0-
Assignee | ||
Comment 14•14 years ago
|
||
We already do this to pass a scaled region into BeginUpdate. Though the second clip should be moved outside of the gfxASurface::CONTENT_COLOR_ALPHA if condition.
Comment 15•14 years ago
|
||
This should hard block Fennec because it causes corruption for Fennec, which tends to always render at non-identity resolutions.
Comment 16•14 years ago
|
||
(In reply to comment #13)
> It seems we won't be taking this for desktop FF4.
Robert, we'd like to take this for Fennec. Any technical issues or risk with landing it (regarding FF4)?
Comment 17•14 years ago
|
||
The smallest fix would be to stop clamping and stop using ExtendToScale with some sort of mobile-only ifdef. That's all we care about.
Comment 18•14 years ago
|
||
Fennec needs this so we stop thrashing ashm memory
tracking-fennec: ? → 2.0+
Comment 19•14 years ago
|
||
Comment on attachment 514752 [details] [diff] [review]
Part 1: Add IsActiveTransform interface to container layers
for fennec
Attachment #514752 -
Flags: approval2.0- → approval2.0?
Comment 20•14 years ago
|
||
Comment on attachment 515401 [details] [diff] [review]
Part 2: BasicLayers can draw at exact resolutions for inactive transforms v3
for fennec
Attachment #515401 -
Flags: approval2.0?
Updated•14 years ago
|
Attachment #515401 -
Flags: approval2.0?
Updated•14 years ago
|
Attachment #514752 -
Flags: approval2.0?
Comment 21•14 years ago
|
||
Comment on attachment 514752 [details] [diff] [review]
Part 1: Add IsActiveTransform interface to container layers
drivers thought an sr is all that is needed
Attachment #514752 -
Flags: superreview?(roc)
Comment 22•14 years ago
|
||
Comment on attachment 515401 [details] [diff] [review]
Part 2: BasicLayers can draw at exact resolutions for inactive transforms v3
drivers thought an sr is all that is needed
Attachment #515401 -
Flags: superreview?
Reporter | ||
Updated•14 years ago
|
Attachment #514752 -
Flags: superreview?(roc) → superreview+
Reporter | ||
Comment 23•14 years ago
|
||
Comment on attachment 515401 [details] [diff] [review]
Part 2: BasicLayers can draw at exact resolutions for inactive transforms v3
No problem taking this for FF4 if Fennec needs it.
Attachment #515401 -
Flags: superreview? → superreview+
Comment 24•14 years ago
|
||
This patch breaks some things in Fennec. STR:
1. Go to news.google.com
2. Scroll down to Google Fast Flip
3. Hit the arrows
We are busting the assertion that the region to draw bounds be a subset of quadrantRect because we are rounding out the region in the GetContext call. The new region to draw gets passed to BasicLayers.cpp, and when it calls GetContext with the rounded out version which it seems messes up the calculation for what quadrant we are in.
Also, moving clipping into GetContext isn't exactly equivalent. We don't apply the clip in BasicLayers.cpp in the content process for non-identity resolutions for better or worse. I've seen that this causes problems with your patch rebased for patches in 635373 (now landed) and 635035. It seems that the regions we are passing back and forth for the buffers aren't working quite properly.
Comment 25•14 years ago
|
||
So on, mozilla-central, if I force clipping on in BasicLayers.cpp I see this rendering issue. Hm.
Updated•14 years ago
|
Whiteboard: [softblocker] → [softblocker][needs-review (roc)]
Comment 26•14 years ago
|
||
Trying to understand if we still need/want this bug. roc/mattwoodrow can you comment?
Assignee | ||
Comment 27•14 years ago
|
||
On basic layers (where the layer manager has a specified resolution), we don't clamp this value (to avoid the fuzzy text) and end up with non integer/reciprocal values. ExtendForScaling can't actually handle these, and we get assertions and unknown results.
So yes, I believe we need this for fennec.
These patches were ready to land, but we need to investigate the broken rendering the Ben is seeing.
Assignee | ||
Comment 28•14 years ago
|
||
Removed the now unnecessary call to ExtendForScaling
Carrying forward r/sr=roc.
I see the "Messed up quadrants" assertion even without this patch, I don't think this is related (the assertion checks the region before we modify it).
I can't reproduce any rendering glitches either, but I can't see a "Google Fast Flip" option on news.google.com to test using the STR.
Attachment #517656 -
Flags: review+
Updated•14 years ago
|
Whiteboard: [softblocker][needs-review (roc)] → [needs-review (roc)]
Assignee | ||
Comment 29•14 years ago
|
||
Managed to find Fast flip on the US version of google news, still can't reproduce any corruption different to what I see with tip.
Comment 30•14 years ago
|
||
Matt: not sure about tip anymore, but I just now rebased your patches on top of 635035 and there are corruption issues. We could land this now and deal with it in 635035?
If this isn't fixing any fennec bugs I don't see why we should land it. Bug 635035 shouldn't cause corruption (can you be more specific?) but there will be seaming. Are these patches or bug 635035 on their own the cause of the corruption? Bug 637852, which bug 635035 is blocked on, will fix the seaming, and its approach avoids the "ASSERTION: Multiplication factors must be integers or 1/integer" problem for fennec's common case.
Comment 32•14 years ago
|
||
Moving discussion to 635035 because I'm seeing the problem without these patches.
Updated•14 years ago
|
tracking-fennec: 2.0+ → 2.0-
Comment 33•14 years ago
|
||
This bug seems to fix some rendering issues in about:config.
Updated•14 years ago
|
tracking-fennec: 2.0- → 2.0next+
Updated•14 years ago
|
Whiteboard: [needs-review (roc)] → [needs-review (roc)][not-ready]
Reporter | ||
Updated•14 years ago
|
Attachment #515402 -
Flags: review?(roc) → review+
Updated•14 years ago
|
tracking-fennec: 2.0next+ → 6+
Comment 34•14 years ago
|
||
what is the plan/status here?
Reporter | ||
Comment 35•14 years ago
|
||
This is fixed in my patches in bug 637852.
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Updated•13 years ago
|
tracking-fennec: 6+ → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•