top window accelerated ENV variable

RESOLVED FIXED

Status

()

Core
Widget
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: romaxa, Assigned: romaxa)

Tracking

Other Branch
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

8 years ago
would be nice to have some environment variable which allow us to enable or disable accelerated mode for top-level XUL window.

something like MOZ_ACCELERATED="0"/"1"

if it is exported then it will override value in top level Xul window

It is a bit annoying to modify browser.xul every time and cleanup *.mfasl files...

What do you think about it?
(Assignee)

Comment 1

8 years ago
Created attachment 455127 [details] [diff] [review]
MOZ_ACCELERATED

It would be nice to have way just take upstream build and export this var...
instead of unpacking/packing chrome.jar files, cleaning up *.mfasl files e.t.c
(Assignee)

Updated

8 years ago
Attachment #455127 - Flags: review?(bas.schouten)

Comment 2

8 years ago
Comment on attachment 455127 [details] [diff] [review]
MOZ_ACCELERATED

>+  const char *acceleratedEnv = PR_GetEnv("MOZ_ACCELERATED");

we generally hide this stuff behind a static....
Attachment #455127 - Flags: review?(bas.schouten) → review-
(Assignee)

Comment 3

8 years ago
Created attachment 455151 [details] [diff] [review]
Make env var static
Attachment #455151 - Flags: review?(neil)
(Assignee)

Updated

8 years ago
Attachment #455127 - Attachment is obsolete: true

Comment 4

8 years ago
Comment on attachment 455151 [details] [diff] [review]
Make env var static

You'll want to get a different neil to review this.
Attachment #455151 - Flags: review?(neil) → review?

Comment 5

8 years ago
Comment on attachment 455151 [details] [diff] [review]
Make env var static

>   rv = windowElement->HasAttribute(NS_LITERAL_STRING("accelerated"), &isAccelerated);
(We could move this into the else block, since we don't need to check the
attribute if the environment variable exists.)

>+    isAccelerated = *acceleratedEnv == '0' ? PR_FALSE : PR_TRUE;
Just use *acceleratedEnv != '0';
(Assignee)

Updated

8 years ago
Attachment #455151 - Flags: review? → review?(roc)
(Assignee)

Comment 6

8 years ago
Created attachment 455431 [details] [diff] [review]
a bit optimized by timeless suggestion
Assignee: nobody → romaxa
Attachment #455151 - Attachment is obsolete: true
Attachment #455431 - Flags: review?(roc)
Attachment #455151 - Flags: review?(roc)
+    isAccelerated = *acceleratedEnv == '0' ? PR_FALSE : PR_TRUE;

isAccelerated = *acceleratedEnv != '0'
(Assignee)

Comment 8

8 years ago
Created attachment 455443 [details] [diff] [review]
Updated comment
Attachment #455431 - Attachment is obsolete: true
Attachment #455443 - Flags: review?(roc)
Attachment #455431 - Flags: review?(roc)
(Assignee)

Updated

8 years ago
Keywords: checkin-needed
(Assignee)

Comment 9

8 years ago
http://hg.mozilla.org/mozilla-central/rev/116fc1788b1d
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.