Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd Wrench to WebRender #585
Conversation
|
One question, otherwise r=me |
| ] | ||
|
|
||
| [profile.release] | ||
| debug = true |
This comment has been minimized.
This comment has been minimized.
glennw
Nov 23, 2016
Member
Does this have any effect on runtime performance? Should we just enable it when profiling?
|
Got a few questions/comments, otherwise looks good! |
| panic!("Can't layout simple ascii on this platform"); | ||
| } | ||
|
|
||
| pub trait WrenchThing { |
This comment has been minimized.
This comment has been minimized.
|
|
||
| impl WrenchThing for BinaryFrameReader { | ||
| fn do_frame(&mut self, wrench: &mut Wrench) -> u32 { | ||
| if self.do_frame(wrench) == false { |
This comment has been minimized.
This comment has been minimized.
| use webrender_traits::*; | ||
|
|
||
| mod wrench; | ||
| use wrench::{Wrench, WrenchThing}; |
This comment has been minimized.
This comment has been minimized.
kvark
Nov 24, 2016
Member
I think this is against rust style guidelines, where you are supposed to have all the use to follow all the mod things
| static ref BLACK_COLOR: ColorF = ColorF::new(0.0, 0.0, 0.0, 1.0); | ||
| } | ||
|
|
||
| pub static mut CURRENT_FRAME_NUMBER: u32 = 0; |
This comment has been minimized.
This comment has been minimized.
|
|
||
| pub static mut CURRENT_FRAME_NUMBER: u32 = 0; | ||
|
|
||
| enum ThingKind { |
This comment has been minimized.
This comment has been minimized.
| } | ||
|
|
||
| pub struct Wrench { | ||
| pub window: glutin::Window, |
This comment has been minimized.
This comment has been minimized.
kvark
Nov 24, 2016
Member
does it all have to be public?
I know this is not much important, given that it's not a used API but just a tool
wondering just out of interest
| .build().unwrap(); | ||
|
|
||
| unsafe { | ||
| window.make_current().ok(); |
This comment has been minimized.
This comment has been minimized.
kvark
Nov 24, 2016
Member
I think we should be using unwrap() here, because ok() will not crash, and our behavior would be undefined later on
| } | ||
|
|
||
| let gl_version = unsafe { | ||
| let data = CStr::from_ptr(gl::GetString(gl::VERSION) as *const _).to_bytes().to_vec(); |
This comment has been minimized.
This comment has been minimized.
| } | ||
|
|
||
| fn handle_rect(&self, wrench: &mut Wrench, clip_region: &ClipRegion, item: &Yaml) | ||
| { |
This comment has been minimized.
This comment has been minimized.
| } | ||
|
|
||
| fn handle_image(&self, wrench: &mut Wrench, clip_region: &ClipRegion, item: &Yaml) | ||
| { |
This comment has been minimized.
This comment has been minimized.
|
|
|
@vvuk Happy to merge this when you are ready - let me know when it's good to go. |
|
@bors-servo r+ |
|
|
|
|
Add Wrench to WebRender This moves Wrench to WebRender. It can now replay binary recordings (replaces the wr-replay tool, though I haven't removed that one), show frames from YAML, and write YAML while replaying a binary recording. The YAML stuff is very much WIP, but what's there works and can be built on top of. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/585) <!-- Reviewable:end -->
vvuk commentedNov 22, 2016
•
edited by larsbergstrom
This moves Wrench to WebRender. It can now replay binary recordings (replaces the wr-replay tool, though I haven't removed that one), show frames from YAML, and write YAML while replaying a binary recording. The YAML stuff is very much WIP, but what's there works and can be built on top of.
This change is