diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 54d72a5f4d8..1dba2a5c5a5 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -2769,7 +2769,7 @@ dependencies = [ [[package]] name = "webrender" version = "0.8.0" -source = "git+https://github.com/servo/webrender#8b53081a3de714f8c1296e20658fabe4e75a6244" +source = "git+https://github.com/servo/webrender#c5eb15a9b8030bbad15809aba7dd1b5906d96397" dependencies = [ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2794,7 +2794,7 @@ dependencies = [ [[package]] name = "webrender_traits" version = "0.8.0" -source = "git+https://github.com/servo/webrender#8b53081a3de714f8c1296e20658fabe4e75a6244" +source = "git+https://github.com/servo/webrender#c5eb15a9b8030bbad15809aba7dd1b5906d96397" dependencies = [ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index 173cd20bbed..db564d1f2c1 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -2627,7 +2627,7 @@ dependencies = [ [[package]] name = "webrender" version = "0.8.0" -source = "git+https://github.com/servo/webrender#8b53081a3de714f8c1296e20658fabe4e75a6244" +source = "git+https://github.com/servo/webrender#c5eb15a9b8030bbad15809aba7dd1b5906d96397" dependencies = [ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2652,7 +2652,7 @@ dependencies = [ [[package]] name = "webrender_traits" version = "0.8.0" -source = "git+https://github.com/servo/webrender#8b53081a3de714f8c1296e20658fabe4e75a6244" +source = "git+https://github.com/servo/webrender#c5eb15a9b8030bbad15809aba7dd1b5906d96397" dependencies = [ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/resources/shaders/clip_shared.glsl b/resources/shaders/clip_shared.glsl index 2c1993b1fa5..62e51c3bbf1 100644 --- a/resources/shaders/clip_shared.glsl +++ b/resources/shaders/clip_shared.glsl @@ -9,7 +9,7 @@ flat varying vec4 vClipMaskUvRect; flat varying vec4 vClipMaskLocalRect; #ifdef WR_VERTEX_SHADER -void write_clip(ClipInfo clip) { +void write_clip(ClipData clip) { vClipRect = vec4(clip.rect.rect.xy, clip.rect.rect.xy + clip.rect.rect.zw); vClipRadius = vec4(clip.top_left.outer_inner_radius.x, clip.top_right.outer_inner_radius.x, @@ -17,8 +17,8 @@ void write_clip(ClipInfo clip) { clip.bottom_left.outer_inner_radius.x); //TODO: interpolate the final mask UV vec2 texture_size = textureSize(sMask, 0); - vClipMaskUvRect = clip.mask_info.uv_rect / texture_size.xyxy; - vClipMaskLocalRect = clip.mask_info.local_rect; //TODO: transform + vClipMaskUvRect = clip.mask_data.uv_rect / texture_size.xyxy; + vClipMaskLocalRect = clip.mask_data.local_rect; //TODO: transform } #endif diff --git a/resources/shaders/prim_shared.glsl b/resources/shaders/prim_shared.glsl index d6248030646..e4803c42a6f 100644 --- a/resources/shaders/prim_shared.glsl +++ b/resources/shaders/prim_shared.glsl @@ -347,13 +347,13 @@ ClipRect fetch_clip_rect(int index) { return rect; } -struct ImageMaskInfo { +struct ImageMaskData { vec4 uv_rect; vec4 local_rect; }; -ImageMaskInfo fetch_mask_info(int index) { - ImageMaskInfo info; +ImageMaskData fetch_mask_data(int index) { + ImageMaskData info; ivec2 uv = get_fetch_uv_2(index); @@ -379,24 +379,24 @@ ClipCorner fetch_clip_corner(int index) { return corner; } -struct ClipInfo { +struct ClipData { ClipRect rect; ClipCorner top_left; ClipCorner top_right; ClipCorner bottom_left; ClipCorner bottom_right; - ImageMaskInfo mask_info; + ImageMaskData mask_data; }; -ClipInfo fetch_clip(int index) { - ClipInfo clip; +ClipData fetch_clip(int index) { + ClipData clip; clip.rect = fetch_clip_rect(index + 0); clip.top_left = fetch_clip_corner(index + 1); clip.top_right = fetch_clip_corner(index + 2); clip.bottom_left = fetch_clip_corner(index + 3); clip.bottom_right = fetch_clip_corner(index + 4); - clip.mask_info = fetch_mask_info(index + 5); + clip.mask_data = fetch_mask_data(index + 5); return clip; } diff --git a/resources/shaders/ps_gradient_clip.vs.glsl b/resources/shaders/ps_gradient_clip.vs.glsl index 62e7caeb7f7..8c20dfdbfa4 100644 --- a/resources/shaders/ps_gradient_clip.vs.glsl +++ b/resources/shaders/ps_gradient_clip.vs.glsl @@ -66,6 +66,6 @@ void main(void) { break; } - ClipInfo clip = fetch_clip(prim.clip_index); + ClipData clip = fetch_clip(prim.clip_index); write_clip(clip); } diff --git a/resources/shaders/ps_image_clip.vs.glsl b/resources/shaders/ps_image_clip.vs.glsl index 5426d997e4d..5e9161008e5 100644 --- a/resources/shaders/ps_image_clip.vs.glsl +++ b/resources/shaders/ps_image_clip.vs.glsl @@ -23,7 +23,7 @@ void main(void) { vLocalPos = vi.local_clamped_pos; #endif - ClipInfo clip = fetch_clip(prim.clip_index); + ClipData clip = fetch_clip(prim.clip_index); write_clip(clip); // vUv will contain how many times this image has wrapped around the image size. diff --git a/resources/shaders/ps_rectangle_clip.vs.glsl b/resources/shaders/ps_rectangle_clip.vs.glsl index 20fef16a3d7..1cc281ac61c 100644 --- a/resources/shaders/ps_rectangle_clip.vs.glsl +++ b/resources/shaders/ps_rectangle_clip.vs.glsl @@ -22,6 +22,6 @@ void main(void) { vPos = vi.local_clamped_pos; #endif - ClipInfo clip = fetch_clip(prim.clip_index); + ClipData clip = fetch_clip(prim.clip_index); write_clip(clip); }