Skip to content

Commit

Permalink
servo: Merge #9781 - Allow user to choose between GL and ES2 (from jd…
Browse files Browse the repository at this point in the history
…m:refactor_gle); r=glennw

Rebase of #8869. Requires servo/rust-layers#232.

Source-Repo: https://github.com/servo/servo
Source-Revision: f3a871ec3ded9efe5dfc07f8a3a39ddd6fb05856

UltraBlame original commit: a174eef4faed2e8280b7e4b5b896e56f6b270d07
  • Loading branch information
marco-c committed Oct 1, 2019
1 parent 4069633 commit 04d8f56
Show file tree
Hide file tree
Showing 5 changed files with 261 additions and 32 deletions.
20 changes: 10 additions & 10 deletions servo/components/servo/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

150 changes: 150 additions & 0 deletions servo/components/util/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,18 @@ pub
use_msaa
:
bool
/
/
Which
rendering
API
to
use
.
pub
render_api
:
RenderApi
}
fn
print_usage
Expand Down Expand Up @@ -3110,6 +3122,35 @@ Desktop
Android
Gonk
}
#
[
derive
(
Clone
Debug
Eq
Deserialize
PartialEq
Serialize
)
]
pub
enum
RenderApi
{
GL
ES2
}
const
DEFAULT_RENDER_API
:
RenderApi
=
RenderApi
:
:
GL
;
fn
default_user_agent_string
(
Expand Down Expand Up @@ -3837,6 +3878,9 @@ false
use_msaa
:
false
render_api
:
DEFAULT_RENDER_API
}
}
pub
Expand Down Expand Up @@ -4567,6 +4611,31 @@ backend
"
)
;
opts
.
optopt
(
"
G
"
"
graphics
"
"
Select
graphics
backend
(
gl
or
es2
)
"
"
gl
"
)
;
let
opt_match
=
Expand Down Expand Up @@ -5866,6 +5935,84 @@ z
)
;
let
render_api
=
match
opt_match
.
opt_str
(
"
G
"
)
{
Some
(
ref
ga
)
if
ga
=
=
"
gl
"
=
>
RenderApi
:
:
GL
Some
(
ref
ga
)
if
ga
=
=
"
es2
"
=
>
RenderApi
:
:
ES2
None
=
>
DEFAULT_RENDER_API
_
=
>
args_fail
(
&
format
!
(
"
error
:
graphics
option
must
be
gl
or
es2
:
"
)
)
}
;
let
opts
=
Opts
Expand Down Expand Up @@ -6013,6 +6160,9 @@ opt_present
S
"
)
render_api
:
render_api
show_debug_borders
:
debug_options
Expand Down
22 changes: 11 additions & 11 deletions servo/ports/cef/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 04d8f56

Please # to comment.