Closed Bug 967794 Opened 10 years ago Closed 10 years ago

GetLowPrecisionResolution not doing what it appears to want to do

Categories

(Core :: Graphics, defect)

28 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: milan, Assigned: milan)

References

Details

Attachments

(1 file, 1 obsolete file)

gfxPlatform::GetLowPrecisionResolution() is written as if we want the latest value (e.g., if the preference is updated during the session, the new value is picked up), but it isn't actually doing that.
It wasn't clear if we wanted to pick up the up to date version during the session, but the way it was written, I think that changing the preference during the session would do bad things or crash, as we're using local variable in the callback.

This change makes it so that we pick up the new value - if we want to just do the "once per session", we want to get rid of the callback.
Attachment #8370303 - Flags: review?(chrislord.net)
Assignee: nobody → milan
Blocks: 818169
Huh, I'm pretty sure vlad brought this code up on IRC at some point and how it was broken. Guess he never actually fixed it?
Comment on attachment 8370303 [details] [diff] [review]
Make sure that in-session changes to the preference are picked up.

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

r+ with the changes below. Sorry for messing this up in the first place :)

::: gfx/thebes/gfxPlatform.cpp
@@ +1610,5 @@
>  
>  float
>  gfxPlatform::GetLowPrecisionResolution()
>  {
> +    static int32_t sLowPrecisionResolutionX1000;

Let's put the = 250 here and remove line 1618 (sLowPrecisionResolutionX1000 = 250;)

@@ +1621,2 @@
>                                               "layers.low-precision-resolution",
>                                               250);

with the above change, the 250 here should be sLowPrecisionResolutionX1000 so we don't have the 250 in more than one place.
Attachment #8370303 - Flags: review?(chrislord.net) → review+
https://hg.mozilla.org/mozilla-central/rev/3515cd83e2aa
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: