Closed
Bug 881609
Opened 12 years ago
Closed 9 years ago
Call gfxPlatform::InitLayersAccelerationPrefs eagerly from gfxPlatform::Init rather than lazily every time we check a pref
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: nrc, Assigned: milan)
Details
Attachments
(1 file)
I'm not 100% sure we want to do this (could it affect startup time?), but given we will always check the layers prefs it seems like a win to only call the init method once rather than every time and returning every time but the first. I guess we should assert the prefs have actually been initialised in the methods, but that is debug only. (Note we already do this for sDrawLayerBorders).
Assignee | ||
Comment 1•12 years ago
|
||
You're right, it's safe, but suboptimal, especially if that function doesn't get inlined. I left it that way because it wasn't clear to me gfxPlatform::Init() will always get called before we call these pref getting functions from nsBaseWidget.cpp. I'm not saying it won't, just that I couldn't find the code that was making sure that happens.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → milan
Assignee | ||
Comment 2•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/36869/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/36869/
Attachment #8724110 -
Flags: review?(ncameron)
Assignee | ||
Comment 3•9 years ago
|
||
The code has changed enough that we can satisfy "don't call it each time" as well as "what if Init doesn't get called". Or come close enough (two calls total, instead of one + per preference check)
Reporter | ||
Comment 4•9 years ago
|
||
Sorry it took me a while to get to this - I've been on vacation for the past three weeks.
Reporter | ||
Comment 5•9 years ago
|
||
Comment on attachment 8724110 [details]
MozReview Request: Bug 881609: Call InitLayersAccelerationPrefs only once. r?nrc
https://reviewboard.mozilla.org/r/36869/#review36313
Attachment #8724110 -
Flags: review?(ncameron) → review+
Comment 7•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•