Skip to content

Commit

Permalink
# This is a combination of 61 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

Don't access the reflector when dropping a Promise (fixes servo#18651)

The reflector may be dead already.

# This is the commit message servo#2:

Run automated test for memory report charter.
# This is the commit message servo#3:

Run memory charting test on CI.
# This is the commit message servo#4:

Move the TravisCI test to the quick group.
# This is the commit message servo#5:

Add timeout pref to the mozilla/worklets wpt tests

# This is the commit message servo#6:

Added .ini for test_paint_worklet_timeout.html

# This is the commit message servo#7:

Update the in-tree status of WPT syncing.

# This is the commit message servo#8:

refactor(window): reference winit where applicable

- relates with servo#20299

# This is the commit message servo#9:

Update mozangle to 0.1.6.

# This is the commit message servo#10:

Update to handle WebRender API changes

Items now only take a clipping rectangle instead of a LocalClip.

# This is the commit message servo#11:

Update WR (local clip API change, texture cache optimizations).

# This is the commit message servo#12:

Update the MULTIPROCESS static when changing default options

# This is the commit message servo#13:

Add Windows support to the --nightly | -n flag.

# This is the commit message servo#14:

build(cargo): enable webrender capture feature

# This is the commit message servo#15:

feat(windowevent): expose CaptureWebRender event

# This is the commit message servo#16:

feat(window): bind hotkey to trigger capture event

# This is the commit message servo#17:

Avoid using WPT test runner to update the test manifest.

# This is the commit message servo#18:

Use typed coordinates.

We use Size2D and Point2D across compositing, constellation and script,
losing the type of pixels we use (DevicePixel, DeviceIndepententPixel
or CSSPixel) along the way, which might lead to bugs like
window.outerHeight not taking into account the page zoom (using
DeviceIndepententPixel instead of CSSPixel).

# This is the commit message servo#19:

alias some euclid types

# This is the commit message servo#20:

remove WindowMethods::size()

# This is the commit message servo#21:

Remove update-manifest argument that is no longer valid.
# This is the commit message servo#22:

Update web-platform-tests to revision e87f38097902e16348d4e17f4fe3bc2d0112bff1

# This is the commit message servo#23:

Add icon to servo.exe

# This is the commit message servo#24:

Use mozjs 0.3 fork without Heap::new

# This is the commit message servo#25:

Root JS object members in dictionaries

# This is the commit message servo#26:

Root `any` members in dictionaries

# This is the commit message servo#27:

Add key/value iterable HTML benchmark

# This is the commit message servo#28:

Fix tabs

# This is the commit message servo#29:

Use upstream mozjs 0.3

# This is the commit message servo#30:

Update WR (radial gradient optimizations).

# This is the commit message servo#31:

CounterBound::Integer made to store an Integer

# This is the commit message servo#32:

style: Remove unsound Atom From implementations.

Fixes servo#20158

# This is the commit message servo#33:

style: Cleanup @-moz-document parsing a bit.

MozReview-Commit-ID: 7vd0BLAqM0v
Bug: 1446470
Reviewed-by: xidorn

# This is the commit message servo#34:

style: Allow @-moz-document url-prefix() on content.

MozReview-Commit-ID: zaT41fpsDT
Bug: 1446470
Reviewed-by: xidorn

# This is the commit message servo#35:

style: Add another pref to control the url-prefix hack.

MozReview-Commit-ID: D4qL0oO69Uh
Bug: 1446470
Reviewed-by: xidorn

# This is the commit message servo#36:

style: Update bindings.

# This is the commit message servo#37:

Update web-platform-tests to revision 790e6601ee8b4b412b6ad9f6fde466b7ccb9cb7e

# This is the commit message servo#38:

style: Better Shadow DOM assertions.

Bug: 1445682
Reviewed-by: xidorn
Differential Revision: https://phabricator.services.mozilla.com/D748

# This is the commit message servo#39:

Support memory report logs with interleaved non-report output, added automated tests

# This is the commit message servo#40:

Update WR revision.
# This is the commit message servo#41:

Add Servo_Property_IsShorthand to geckolib/glue.rs

# This is the commit message servo#42:

Re-expose webrender debugger feature in components/servo

Update ws in debugger  to 0.7.3

Update lockfile

# This is the commit message servo#43:

Update web-platform-tests to revision 3ec34e5a2c8cbeeb7fad521cce0daf923b272a92

# This is the commit message servo#44:

Make `type` argument as optional and ignore it in open method

# This is the commit message servo#45:

Update steps with new spec

# This is the commit message servo#46:

Make type-argument.window.js test as pass

# This is the commit message servo#47:

Simplify GetTexParameter

# This is the commit message servo#48:

Simplify VertexAttribOffset

# This is the commit message servo#49:

Simplify BufferParameter

# This is the commit message servo#50:

Simplify GetShaderPrecisionFormat

# This is the commit message servo#51:

Update web-platform-tests to revision 3a8328470d53c4501e31cec2775c4d33821c2275

# This is the commit message servo#52:

Mouse position from glutin is DevicePixel

# This is the commit message servo#53:

Update servo-websocket to 0.21

# This is the commit message servo#54:

Bump ipc-channel and bincode

This required bumping uuid too which unfortunately duplicated rand.

# This is the commit message servo#55:

Remove our dependency on the gcc crate

# This is the commit message servo#56:

Blobs support typed arrays now

# This is the commit message servo#57:

Bump parking_lot to 0.5

# This is the commit message servo#58:

initial shot at initial steps

# This is the commit message servo#59:

Second shot at initial steps

# This is the commit message servo#60:

Progress on initial steps

# This is the commit message servo#61:

initial shot at initial steps
  • Loading branch information
nox authored and pmocher committed Mar 30, 2018
1 parent 8e6cfbc commit 506ceb6
Show file tree
Hide file tree
Showing 558 changed files with 15,427 additions and 6,244 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
Servo.app
.config.mk.last
/glfw
capture_webrender/

# Editors

Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ matrix:
script:
- ./mach test-tidy --no-progress --all
- ./mach test-tidy --no-progress --self-test
- python ./etc/memory_reports_over_time.py --test
- bash etc/ci/check_no_panic.sh
- bash etc/ci/manifest_changed.sh
cache: false
Expand Down
308 changes: 181 additions & 127 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions components/bluetooth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ path = "lib.rs"
bitflags = "1.0"
bluetooth_traits = {path = "../bluetooth_traits"}
device = {git = "https://github.com/servo/devices", features = ["bluetooth-test"]}
ipc-channel = "0.9"
ipc-channel = "0.10"
servo_config = {path = "../config"}
servo_rand = {path = "../rand"}
uuid = {version = "0.5", features = ["v4"]}
uuid = {version = "0.6", features = ["v4"]}

[target.'cfg(target_os = "linux")'.dependencies]
tinyfiledialogs = "3.0"
2 changes: 1 addition & 1 deletion components/bluetooth_traits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name = "bluetooth_traits"
path = "lib.rs"

[dependencies]
ipc-channel = "0.9"
ipc-channel = "0.10"
regex = "0.2"
serde = "1.0"
servo_config = {path = "../config"}
2 changes: 1 addition & 1 deletion components/canvas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cssparser = "0.23.0"
euclid = "0.17"
fnv = "1.0"
gleam = "0.4"
ipc-channel = "0.9"
ipc-channel = "0.10"
log = "0.3.5"
num-traits = "0.1.32"
offscreen_gl_context = { version = "0.15", features = ["serde", "osmesa"] }
Expand Down
37 changes: 25 additions & 12 deletions components/canvas/canvas_paint_thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ pub struct CanvasPaintThread<'a> {
old_image_key: Option<webrender_api::ImageKey>,
/// An old webrender image key that can be deleted when the current epoch ends.
very_old_image_key: Option<webrender_api::ImageKey>,
canvas_id: CanvasId,
}

#[derive(Clone)]
Expand Down Expand Up @@ -98,7 +99,8 @@ impl<'a> CanvasPaintState<'a> {
impl<'a> CanvasPaintThread<'a> {
fn new(size: Size2D<i32>,
webrender_api_sender: webrender_api::RenderApiSender,
antialias: AntialiasMode) -> CanvasPaintThread<'a> {
antialias: AntialiasMode,
canvas_id: CanvasId) -> CanvasPaintThread<'a> {
let draw_target = CanvasPaintThread::create(size);
let path_builder = draw_target.create_path_builder();
let webrender_api = webrender_api_sender.create_api();
Expand All @@ -111,14 +113,16 @@ impl<'a> CanvasPaintThread<'a> {
image_key: None,
old_image_key: None,
very_old_image_key: None,
canvas_id: canvas_id,
}
}

/// Creates a new `CanvasPaintThread` and returns an `IpcSender` to
/// communicate with it.
pub fn start(size: Size2D<i32>,
webrender_api_sender: webrender_api::RenderApiSender,
antialias: bool)
antialias: bool,
canvas_id: CanvasId)
-> IpcSender<CanvasMsg> {
let (sender, receiver) = ipc::channel::<CanvasMsg>().unwrap();
let antialias = if antialias {
Expand All @@ -127,11 +131,12 @@ impl<'a> CanvasPaintThread<'a> {
AntialiasMode::None
};
thread::Builder::new().name("CanvasThread".to_owned()).spawn(move || {
let mut painter = CanvasPaintThread::new(size, webrender_api_sender, antialias);
let mut painter = CanvasPaintThread::new(size, webrender_api_sender, antialias, canvas_id);
loop {
let msg = receiver.recv();
match msg.unwrap() {
CanvasMsg::Canvas2d(message) => {
CanvasMsg::Canvas2d(message, canvas_id) => {
assert!(canvas_id == painter.canvas_id);
match message {
Canvas2dMsg::FillText(text, x, y, max_width) => painter.fill_text(text, x, y, max_width),
Canvas2dMsg::FillRect(ref rect) => painter.fill_rect(rect),
Expand All @@ -153,10 +158,10 @@ impl<'a> CanvasPaintThread<'a> {
painter.draw_image_self(image_size, dest_rect, source_rect, smoothing_enabled)
}
Canvas2dMsg::DrawImageInOther(
renderer, image_size, dest_rect, source_rect, smoothing, sender
renderer, other_canvas_id, image_size, dest_rect, source_rect, smoothing, sender
) => {
painter.draw_image_in_other(
renderer, image_size, dest_rect, source_rect, smoothing, sender)
renderer, other_canvas_id, image_size, dest_rect, source_rect, smoothing, sender)
}
Canvas2dMsg::MoveTo(ref point) => painter.move_to(point),
Canvas2dMsg::LineTo(ref point) => painter.line_to(point),
Expand Down Expand Up @@ -197,22 +202,29 @@ impl<'a> CanvasPaintThread<'a> {
Canvas2dMsg::SetShadowColor(ref color) => painter.set_shadow_color(color.to_azure_style()),
}
},
CanvasMsg::Close => break,
CanvasMsg::Recreate(size) => painter.recreate(size),
CanvasMsg::FromScript(message) => {
CanvasMsg::Close(canvas_id) =>{
assert!(canvas_id == painter.canvas_id);
break;
},
CanvasMsg::Recreate(size,canvas_id) =>{
assert!(canvas_id == painter.canvas_id);
painter.recreate(size);
},
CanvasMsg::FromScript(message,canvas_id) => {
assert!(canvas_id == painter.canvas_id);
match message {
FromScriptMsg::SendPixels(chan) => {
painter.send_pixels(chan)
}
}
}
},
CanvasMsg::FromLayout(message) => {
match message {
FromLayoutMsg::SendData(chan) => {
painter.send_data(chan)
}
}
}
},
}
}
}).expect("Thread spawning failed");
Expand Down Expand Up @@ -392,6 +404,7 @@ impl<'a> CanvasPaintThread<'a> {

fn draw_image_in_other(&self,
renderer: IpcSender<CanvasMsg>,
other_canvas_id: CanvasId,
image_size: Size2D<f64>,
dest_rect: Rect<f64>,
source_rect: Rect<f64>,
Expand All @@ -402,7 +415,7 @@ impl<'a> CanvasPaintThread<'a> {
byte_swap(&mut image_data);

let msg = CanvasMsg::Canvas2d(Canvas2dMsg::DrawImage(
image_data, source_rect.size, dest_rect, source_rect, smoothing_enabled));
image_data, source_rect.size, dest_rect, source_rect, smoothing_enabled),other_canvas_id);
renderer.send(msg).unwrap();
// We acknowledge to the caller here that the data was sent to the
// other canvas so that if JS immediately afterwards try to get the
Expand Down
51 changes: 8 additions & 43 deletions components/canvas/webgl_thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1066,21 +1066,8 @@ impl WebGLImpl {
fn get_tex_parameter(gl: &gl::Gl,
target: u32,
pname: u32,
chan: WebGLSender<WebGLResult<WebGLParameter>> ) {
let result = match pname {
gl::TEXTURE_MAG_FILTER |
gl::TEXTURE_MIN_FILTER |
gl::TEXTURE_WRAP_S |
gl::TEXTURE_WRAP_T => {
let parameter = gl.get_tex_parameter_iv(target, pname);
if parameter == 0 {
Ok(WebGLParameter::Invalid)
} else {
Ok(WebGLParameter::Int(parameter))
}
}
_ => Err(WebGLError::InvalidEnum)
};
chan: WebGLSender<i32> ) {
let result = gl.get_tex_parameter_iv(target, pname);
chan.send(result).unwrap();
}

Expand Down Expand Up @@ -1117,25 +1104,16 @@ impl WebGLImpl {
fn vertex_attrib_offset(gl: &gl::Gl,
index: u32,
pname: u32,
chan: WebGLSender<WebGLResult<isize>>) {
let result = match pname {
gl::VERTEX_ATTRIB_ARRAY_POINTER => Ok(gl.get_vertex_attrib_pointer_v(index, pname)),
_ => Err(WebGLError::InvalidEnum),
};

chan: WebGLSender<isize>) {
let result = gl.get_vertex_attrib_pointer_v(index, pname);
chan.send(result).unwrap();
}

fn buffer_parameter(gl: &gl::Gl,
target: u32,
param_id: u32,
chan: WebGLSender<WebGLResult<WebGLParameter>>) {
let result = match param_id {
gl::BUFFER_SIZE |
gl::BUFFER_USAGE =>
Ok(WebGLParameter::Int(gl.get_buffer_parameter_iv(target, param_id))),
_ => Err(WebGLError::InvalidEnum),
};
chan: WebGLSender<i32>) {
let result = gl.get_buffer_parameter_iv(target, param_id);

chan.send(result).unwrap();
}
Expand Down Expand Up @@ -1178,21 +1156,8 @@ impl WebGLImpl {
fn shader_precision_format(gl: &gl::Gl,
shader_type: u32,
precision_type: u32,
chan: WebGLSender<WebGLResult<(i32, i32, i32)>>) {
let result = match precision_type {
gl::LOW_FLOAT |
gl::MEDIUM_FLOAT |
gl::HIGH_FLOAT |
gl::LOW_INT |
gl::MEDIUM_INT |
gl::HIGH_INT => {
Ok(gl.get_shader_precision_format(shader_type, precision_type))
},
_=> {
Err(WebGLError::InvalidEnum)
}
};

chan: WebGLSender<(i32, i32, i32)>) {
let result = gl.get_shader_precision_format(shader_type, precision_type);
chan.send(result).unwrap();
}

Expand Down
2 changes: 1 addition & 1 deletion components/canvas_traits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ path = "lib.rs"
[dependencies]
cssparser = "0.23.0"
euclid = "0.17"
ipc-channel = "0.9"
ipc-channel = "0.10"
lazy_static = "1"
malloc_size_of = { path = "../malloc_size_of" }
malloc_size_of_derive = { path = "../malloc_size_of_derive" }
Expand Down
13 changes: 8 additions & 5 deletions components/canvas_traits/canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ pub enum FillRule {
Evenodd,
}

#[derive(Clone, Deserialize, PartialEq, Serialize)]
pub struct CanvasId(pub u64);

#[derive(Clone, Deserialize, Serialize)]
pub enum CanvasMsg {
Canvas2d(Canvas2dMsg),
Canvas2d(Canvas2dMsg, CanvasId),
FromLayout(FromLayoutMsg),
FromScript(FromScriptMsg),
Recreate(Size2D<i32>),
Close,
FromScript(FromScriptMsg, CanvasId),
Recreate(Size2D<i32>, CanvasId),
Close(CanvasId),
}

#[derive(Clone, Deserialize, Serialize)]
Expand All @@ -36,7 +39,7 @@ pub enum Canvas2dMsg {
DrawImage(Vec<u8>, Size2D<f64>, Rect<f64>, Rect<f64>, bool),
DrawImageSelf(Size2D<f64>, Rect<f64>, Rect<f64>, bool),
DrawImageInOther(
IpcSender<CanvasMsg>, Size2D<f64>, Rect<f64>, Rect<f64>, bool, IpcSender<()>),
IpcSender<CanvasMsg>, CanvasId, Size2D<f64>, Rect<f64>, Rect<f64>, bool, IpcSender<()>),
BeginPath,
BezierCurveTo(Point2D<f32>, Point2D<f32>, Point2D<f32>),
ClearRect(Rect<f32>),
Expand Down
8 changes: 4 additions & 4 deletions components/canvas_traits/webgl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,19 +204,19 @@ pub enum WebGLCommand {
EnableVertexAttribArray(u32),
FramebufferRenderbuffer(u32, u32, u32, Option<WebGLRenderbufferId>),
FramebufferTexture2D(u32, u32, u32, Option<WebGLTextureId>, i32),
GetBufferParameter(u32, u32, WebGLSender<WebGLResult<WebGLParameter>>),
GetBufferParameter(u32, u32, WebGLSender<i32>),
GetExtensions(WebGLSender<String>),
GetParameter(u32, WebGLSender<WebGLResult<WebGLParameter>>),
GetTexParameter(u32, u32, WebGLSender<WebGLResult<WebGLParameter>>),
GetTexParameter(u32, u32, WebGLSender<i32>),
GetProgramParameter(WebGLProgramId, u32, WebGLSender<WebGLResult<WebGLParameter>>),
GetShaderParameter(WebGLShaderId, u32, WebGLSender<WebGLResult<WebGLParameter>>),
GetShaderPrecisionFormat(u32, u32, WebGLSender<WebGLResult<(i32, i32, i32)>>),
GetShaderPrecisionFormat(u32, u32, WebGLSender<(i32, i32, i32)>),
GetActiveAttrib(WebGLProgramId, u32, WebGLSender<WebGLResult<(i32, u32, String)>>),
GetActiveUniform(WebGLProgramId, u32, WebGLSender<WebGLResult<(i32, u32, String)>>),
GetAttribLocation(WebGLProgramId, String, WebGLSender<Option<i32>>),
GetUniformLocation(WebGLProgramId, String, WebGLSender<Option<i32>>),
GetVertexAttrib(u32, u32, WebGLSender<WebGLResult<WebGLParameter>>),
GetVertexAttribOffset(u32, u32, WebGLSender<WebGLResult<isize>>),
GetVertexAttribOffset(u32, u32, WebGLSender<isize>),
GetShaderInfoLog(WebGLShaderId, WebGLSender<String>),
GetProgramInfoLog(WebGLProgramId, WebGLSender<String>),
PolygonOffset(f32, f32),
Expand Down
4 changes: 2 additions & 2 deletions components/compositing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ euclid = "0.17"
gfx_traits = {path = "../gfx_traits"}
gleam = "0.4"
image = "0.18"
ipc-channel = "0.9"
ipc-channel = "0.10"
libc = "0.2"
log = "0.3.5"
msg = {path = "../msg"}
Expand All @@ -27,5 +27,5 @@ servo_geometry = {path = "../geometry"}
servo_url = {path = "../url"}
style_traits = {path = "../style_traits"}
time = "0.1.17"
webrender = {git = "https://github.com/servo/webrender"}
webrender = {git = "https://github.com/servo/webrender", features = ["capture"]}
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
Loading

0 comments on commit 506ceb6

Please sign in to comment.