Closed Bug 1319362 Opened 8 years ago Closed 8 years ago

Modify the default minimum rendering size for SkiaGL

Categories

(Core :: Graphics: Canvas2D, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: ethlin, Assigned: ethlin)

References

()

Details

Attachments

(1 file, 1 obsolete file)

The original min rendering size for SkiaGL is 16x16. Bug 905227 changed the limitation to 128x128, so it became hard to use SkiaGL. But Bug 905227 is for turning on SkiaGL on B2G, I don't see why we use the same limitation for browser.

I tested the website reported in bug 1313675 and the playback is smoother after changing the limitation.
Blocks: 1313675
Attached patch change default value (obsolete) — Splinter Review
I use the original value before the patch in bug 905227.
Attachment #8813077 - Flags: review?(nical.bugzilla)
Comment on attachment 8813077 [details] [diff] [review]
change default value

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

I don't know enough about the implications of allowing skiagl for smaller sizes, so deferring the review to Lee. One thing to note is that if we allow very small canvases, we'll suddenly see skiagl used for ad banners in a lot of places where it wasn't used before since some of the standard ad sizes are less than 128 thick (although, that may already be the case with hidpi screens, not sure). I don't know if it's a good or a bad thing.
Attachment #8813077 - Flags: review?(nical.bugzilla) → review?(lsalzman)
Comment on attachment 8813077 [details] [diff] [review]
change default value

I think given the original concerns noted in bug 905227, it is unwise to merely set the value back to 16x16. There is a cost to having a bunch of small SkiaGL canvases, and that will outweigh the benefits here. Can we get away with making this larger, at least 32x32, or possibly 64x64?
Flags: needinfo?(ethlin)
(In reply to Lee Salzman [:lsalzman] from comment #3)
> Comment on attachment 8813077 [details] [diff] [review]
> change default value
> 
> I think given the original concerns noted in bug 905227, it is unwise to
> merely set the value back to 16x16. There is a cost to having a bunch of
> small SkiaGL canvases, and that will outweigh the benefits here. Can we get
> away with making this larger, at least 32x32, or possibly 64x64?

The perf problem in bug 1313675 is about text rendering. I found many text sizes in the page are about 900x50, so we will not use SkiaGL to render them though the text areas are larger than 128x128.
Maybe we should check area value.
Flags: needinfo?(ethlin)
Attached patch Check areaSplinter Review
I check area but not just dimension in this patch. This way should be more precise.
Attachment #8813077 - Attachment is obsolete: true
Attachment #8813077 - Flags: review?(lsalzman)
Attachment #8813498 - Flags: review?(lsalzman)
(In reply to Ethan Lin[:ethlin] from comment #4)
> The perf problem in bug 1313675 is about text rendering. I found many text
> sizes in the page are about 900x50, so we will not use SkiaGL to render them
> though the text areas are larger than 128x128.
> Maybe we should check area value.

Do they render each danmaku in a separate canvas and then move those canvases each frame, or render all danmakus in a large canvas and draw all again each frame?
Attachment #8813498 - Flags: review?(lsalzman) → review+
(In reply to Xidorn Quan [:xidorn] (UTC+10) from comment #6)
> (In reply to Ethan Lin[:ethlin] from comment #4)
> > The perf problem in bug 1313675 is about text rendering. I found many text
> > sizes in the page are about 900x50, so we will not use SkiaGL to render them
> > though the text areas are larger than 128x128.
> > Maybe we should check area value.
> 
> Do they render each danmaku in a separate canvas and then move those
> canvases each frame, or render all danmakus in a large canvas and draw all
> again each frame?

The page renders each danmaku in a separate canvas and then calls DrawImage to draw on a large canvas.
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a38d735c9041
Use area but not just dimension to check SkiaGL minimum size. r=lsalzman
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a38d735c9041
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: