зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1580896 - Make wrench's --chase argument support primitive IDs. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D45703 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a19f899a6f
Коммит
388269850b
|
@ -203,6 +203,7 @@ pub use crate::device::{build_shader_strings, UploadMethod, VertexUsageHint, get
|
|||
pub use crate::device::{ProgramBinary, ProgramCache, ProgramCacheObserver, FormatDesc};
|
||||
pub use crate::device::Device;
|
||||
pub use crate::frame_builder::ChasePrimitive;
|
||||
pub use crate::prim_store::PrimitiveDebugId;
|
||||
pub use crate::profiler::{ProfilerHooks, set_profiler_hooks};
|
||||
pub use crate::renderer::{
|
||||
AsyncPropertySampler, CpuProfile, DebugFlags, OutputImageHandler, RendererKind, ExternalImage,
|
||||
|
|
|
@ -72,7 +72,7 @@ args:
|
|||
help: Disable batching of instanced draw calls
|
||||
- chase:
|
||||
long: chase
|
||||
help: Chase a particular primitive matching the local rect
|
||||
help: Chase a particular primitive matching the local rect or ID
|
||||
takes_value: true
|
||||
- dump_shader_source:
|
||||
long: dump-shader-source
|
||||
|
|
|
@ -471,15 +471,23 @@ fn main() {
|
|||
let zoom_factor = args.value_of("zoom").map(|z| z.parse::<f32>().unwrap());
|
||||
let chase_primitive = match args.value_of("chase") {
|
||||
Some(s) => {
|
||||
let items = s
|
||||
.split(',')
|
||||
.map(|s| s.parse::<f32>().unwrap())
|
||||
.collect::<Vec<_>>();
|
||||
let rect = LayoutRect::new(
|
||||
LayoutPoint::new(items[0], items[1]),
|
||||
LayoutSize::new(items[2], items[3]),
|
||||
);
|
||||
webrender::ChasePrimitive::LocalRect(rect)
|
||||
match s.find(',') {
|
||||
Some(_) => {
|
||||
let items = s
|
||||
.split(',')
|
||||
.map(|s| s.parse::<f32>().unwrap())
|
||||
.collect::<Vec<_>>();
|
||||
let rect = LayoutRect::new(
|
||||
LayoutPoint::new(items[0], items[1]),
|
||||
LayoutSize::new(items[2], items[3]),
|
||||
);
|
||||
webrender::ChasePrimitive::LocalRect(rect)
|
||||
}
|
||||
None => {
|
||||
let id = s.parse::<usize>().unwrap();
|
||||
webrender::ChasePrimitive::Id(webrender::PrimitiveDebugId(id))
|
||||
}
|
||||
}
|
||||
},
|
||||
None => webrender::ChasePrimitive::Nothing,
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче