mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update WebRender to get necessary changes
This commit is contained in:
parent
ef82d772c1
commit
dea0c7ca72
7 changed files with 18 additions and 18 deletions
4
components/servo/Cargo.lock
generated
4
components/servo/Cargo.lock
generated
|
@ -2769,7 +2769,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webrender"
|
name = "webrender"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
source = "git+https://github.com/servo/webrender#8b53081a3de714f8c1296e20658fabe4e75a6244"
|
source = "git+https://github.com/servo/webrender#c5eb15a9b8030bbad15809aba7dd1b5906d96397"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"bincode 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2794,7 +2794,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webrender_traits"
|
name = "webrender_traits"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
source = "git+https://github.com/servo/webrender#8b53081a3de714f8c1296e20658fabe4e75a6244"
|
source = "git+https://github.com/servo/webrender#c5eb15a9b8030bbad15809aba7dd1b5906d96397"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
4
ports/cef/Cargo.lock
generated
4
ports/cef/Cargo.lock
generated
|
@ -2627,7 +2627,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webrender"
|
name = "webrender"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
source = "git+https://github.com/servo/webrender#8b53081a3de714f8c1296e20658fabe4e75a6244"
|
source = "git+https://github.com/servo/webrender#c5eb15a9b8030bbad15809aba7dd1b5906d96397"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"bincode 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2652,7 +2652,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webrender_traits"
|
name = "webrender_traits"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
source = "git+https://github.com/servo/webrender#8b53081a3de714f8c1296e20658fabe4e75a6244"
|
source = "git+https://github.com/servo/webrender#c5eb15a9b8030bbad15809aba7dd1b5906d96397"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -9,7 +9,7 @@ flat varying vec4 vClipMaskUvRect;
|
||||||
flat varying vec4 vClipMaskLocalRect;
|
flat varying vec4 vClipMaskLocalRect;
|
||||||
|
|
||||||
#ifdef WR_VERTEX_SHADER
|
#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);
|
vClipRect = vec4(clip.rect.rect.xy, clip.rect.rect.xy + clip.rect.rect.zw);
|
||||||
vClipRadius = vec4(clip.top_left.outer_inner_radius.x,
|
vClipRadius = vec4(clip.top_left.outer_inner_radius.x,
|
||||||
clip.top_right.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);
|
clip.bottom_left.outer_inner_radius.x);
|
||||||
//TODO: interpolate the final mask UV
|
//TODO: interpolate the final mask UV
|
||||||
vec2 texture_size = textureSize(sMask, 0);
|
vec2 texture_size = textureSize(sMask, 0);
|
||||||
vClipMaskUvRect = clip.mask_info.uv_rect / texture_size.xyxy;
|
vClipMaskUvRect = clip.mask_data.uv_rect / texture_size.xyxy;
|
||||||
vClipMaskLocalRect = clip.mask_info.local_rect; //TODO: transform
|
vClipMaskLocalRect = clip.mask_data.local_rect; //TODO: transform
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -347,13 +347,13 @@ ClipRect fetch_clip_rect(int index) {
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ImageMaskInfo {
|
struct ImageMaskData {
|
||||||
vec4 uv_rect;
|
vec4 uv_rect;
|
||||||
vec4 local_rect;
|
vec4 local_rect;
|
||||||
};
|
};
|
||||||
|
|
||||||
ImageMaskInfo fetch_mask_info(int index) {
|
ImageMaskData fetch_mask_data(int index) {
|
||||||
ImageMaskInfo info;
|
ImageMaskData info;
|
||||||
|
|
||||||
ivec2 uv = get_fetch_uv_2(index);
|
ivec2 uv = get_fetch_uv_2(index);
|
||||||
|
|
||||||
|
@ -379,24 +379,24 @@ ClipCorner fetch_clip_corner(int index) {
|
||||||
return corner;
|
return corner;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ClipInfo {
|
struct ClipData {
|
||||||
ClipRect rect;
|
ClipRect rect;
|
||||||
ClipCorner top_left;
|
ClipCorner top_left;
|
||||||
ClipCorner top_right;
|
ClipCorner top_right;
|
||||||
ClipCorner bottom_left;
|
ClipCorner bottom_left;
|
||||||
ClipCorner bottom_right;
|
ClipCorner bottom_right;
|
||||||
ImageMaskInfo mask_info;
|
ImageMaskData mask_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
ClipInfo fetch_clip(int index) {
|
ClipData fetch_clip(int index) {
|
||||||
ClipInfo clip;
|
ClipData clip;
|
||||||
|
|
||||||
clip.rect = fetch_clip_rect(index + 0);
|
clip.rect = fetch_clip_rect(index + 0);
|
||||||
clip.top_left = fetch_clip_corner(index + 1);
|
clip.top_left = fetch_clip_corner(index + 1);
|
||||||
clip.top_right = fetch_clip_corner(index + 2);
|
clip.top_right = fetch_clip_corner(index + 2);
|
||||||
clip.bottom_left = fetch_clip_corner(index + 3);
|
clip.bottom_left = fetch_clip_corner(index + 3);
|
||||||
clip.bottom_right = fetch_clip_corner(index + 4);
|
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;
|
return clip;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,6 @@ void main(void) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ClipInfo clip = fetch_clip(prim.clip_index);
|
ClipData clip = fetch_clip(prim.clip_index);
|
||||||
write_clip(clip);
|
write_clip(clip);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ void main(void) {
|
||||||
vLocalPos = vi.local_clamped_pos;
|
vLocalPos = vi.local_clamped_pos;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ClipInfo clip = fetch_clip(prim.clip_index);
|
ClipData clip = fetch_clip(prim.clip_index);
|
||||||
write_clip(clip);
|
write_clip(clip);
|
||||||
|
|
||||||
// vUv will contain how many times this image has wrapped around the image size.
|
// vUv will contain how many times this image has wrapped around the image size.
|
||||||
|
|
|
@ -22,6 +22,6 @@ void main(void) {
|
||||||
vPos = vi.local_clamped_pos;
|
vPos = vi.local_clamped_pos;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ClipInfo clip = fetch_clip(prim.clip_index);
|
ClipData clip = fetch_clip(prim.clip_index);
|
||||||
write_clip(clip);
|
write_clip(clip);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue