Closed Bug 793923 Opened 13 years ago Closed 13 years ago

[Azure] Content using wrong pref

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: ajones, Assigned: ajones)

Details

Attachments

(1 file)

Azure content is using gfx.canvas.azure.backends instead of gfx.content.backends.
Assignee: nobody → ajones
Status: NEW → ASSIGNED
Attachment #665768 - Flags: review?(ncameron)
I don't see how this patch addresses this bug: I expected to see the name of a pref changed, but the patch doesn't seem to do that. It does turn a global into a local and recompute the backend list for every call of GetBackendPref rather than just once, and I don't see why you would want to do that? (In particular, does GetBackendPref get called a lot or just once?)
The pref is only read once for the first pref and it doesn't get read again. Removing the use of the global variable means that it will read the pref every time but it also means it will read the correct pref. GetBackendPref would usually be called either 3 or 6 times depending on whether the init function is called once or twice for the given platform.
I think this is OK. Given that we only check for two different kinds of backends, we might want to just keep two globals around and save on parsing and pref lookup (we are sensitive about startup time). OTOH, it is a drop in the ocean, really, so maybe it doesn't matter. I guess if we expect the number of calls to GetBackendPref increase we should use two globals, and if we expect the number of kinds of backend to increase we should use this more generic code.
Comment on attachment 665768 [details] [diff] [review] Fixed gfxPlatform to use gfx.content.azure.backends properly Review of attachment 665768 [details] [diff] [review]: ----------------------------------------------------------------- lgtm, but asking roc for another review just to make sure if we want to take the minor hit to startup time (see comment above).
Attachment #665768 - Flags: review?(roc)
Attachment #665768 - Flags: review?(ncameron)
Attachment #665768 - Flags: review+
Ignore that last comment.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: