Closed Bug 1008412 Opened 10 years ago Closed 10 years ago

With low-precision buffer enabled the displayport exceeds max texture size

Categories

(Core :: Layout, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file, 1 obsolete file)

When low-precision buffer is enabled with the default settings, the displayport ends up exceeding 4096 pixels in some cases. This causes us to trigger the DisplayportExceedsMaxTextureSize check in nsGfxScrollFrame, and switches back to sync scrolling.
Component: Graphics: Layers → Layout
This fixes the problem for me, thanks for the suggestion!
Assignee: nobody → bugmail.mozilla
Attachment #8420361 - Flags: review?(tnikkel)
Comment on attachment 8420361 [details] [diff] [review]
Account for low-precision resolution too

Presumably we want the same size limit on the "critical display port" size. But I think right now this will accomplish that since the size of the display port and critical display port are related by a scale factor of the low prec resolution. Are we planning on changing that relation?
Attachment #8420361 - Flags: review?(tnikkel) → review+
Comment on attachment 8420361 [details] [diff] [review]
Account for low-precision resolution too

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

::: layout/generic/nsGfxScrollFrame.cpp
@@ +2416,5 @@
>    // Note also that if we don't do this here, it is quite likely that the parent B2G process
>    // will kill this child process to prevent OOMs (see the patch that landed as part of bug
>    // 965945 for details).
>    gfxSize resolution = aPresContext->PresShell()->GetCumulativeResolution();
> +  if (gfxPrefs::UseLowPrecisionBuffer()) {

I think this should also check that the critical displayport isn't empty? If we have low precision rendering enabled but an empty critical displayport, I think we just use high precision rendering in the displayport, iirc.
(In reply to Timothy Nikkel (:tn) from comment #2)
> Presumably we want the same size limit on the "critical display port" size.
> But I think right now this will accomplish that since the size of the
> display port and critical display port are related by a scale factor of the
> low prec resolution. Are we planning on changing that relation?

We might change that relationship eventually, although I have no plans to do so in the immediate future. Still, it's a good idea to check for that.

(In reply to Chris Lord [:cwiiis] from comment #3)
> I think this should also check that the critical displayport isn't empty? If
> we have low precision rendering enabled but an empty critical displayport, I
> think we just use high precision rendering in the displayport, iirc.

With the patches on bug 1001438 this won't happen any more. Front-end code will only set a displayport and then low precision rendering is enabled it will automatically get used as  the critical display port, and the displayport will be a multiple of it. However since bug 1001438 is still pending review/test-fixing and I'd like to not have to wait on that, I'll add a check for this too.
Updated patch that deals with both comments above.
Attachment #8420361 - Attachment is obsolete: true
Attachment #8420939 - Flags: review?(tnikkel)
Attachment #8420939 - Flags: review?(tnikkel) → review+
https://hg.mozilla.org/mozilla-central/rev/2ffd315c525f
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: