summaryrefslogtreecommitdiffstats
path: root/gfx/wr/webrender/src/renderer/vertex.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/wr/webrender/src/renderer/vertex.rs')
-rw-r--r--gfx/wr/webrender/src/renderer/vertex.rs67
1 files changed, 10 insertions, 57 deletions
diff --git a/gfx/wr/webrender/src/renderer/vertex.rs b/gfx/wr/webrender/src/renderer/vertex.rs
index ff555363d8..cd73975ddd 100644
--- a/gfx/wr/webrender/src/renderer/vertex.rs
+++ b/gfx/wr/webrender/src/renderer/vertex.rs
@@ -49,12 +49,12 @@ pub mod desc {
VertexAttribute {
name: "aBlurRenderTaskAddress",
count: 1,
- kind: VertexAttributeKind::U16,
+ kind: VertexAttributeKind::I32,
},
VertexAttribute {
name: "aBlurSourceTaskAddress",
count: 1,
- kind: VertexAttributeKind::U16,
+ kind: VertexAttributeKind::I32,
},
VertexAttribute {
name: "aBlurDirection",
@@ -488,53 +488,6 @@ pub mod desc {
],
};
- pub const CLIP_IMAGE: VertexDescriptor = VertexDescriptor {
- vertex_attributes: &[VertexAttribute {
- name: "aPosition",
- count: 2,
- kind: VertexAttributeKind::U8Norm,
- }],
- instance_attributes: &[
- // common clip attributes
- VertexAttribute {
- name: "aClipDeviceArea",
- count: 4,
- kind: VertexAttributeKind::F32,
- },
- VertexAttribute {
- name: "aClipOrigins",
- count: 4,
- kind: VertexAttributeKind::F32,
- },
- VertexAttribute {
- name: "aDevicePixelScale",
- count: 1,
- kind: VertexAttributeKind::F32,
- },
- VertexAttribute {
- name: "aTransformIds",
- count: 2,
- kind: VertexAttributeKind::I32,
- },
- // specific clip attributes
- VertexAttribute {
- name: "aClipTileRect",
- count: 4,
- kind: VertexAttributeKind::F32,
- },
- VertexAttribute {
- name: "aClipDataResourceAddress",
- count: 2,
- kind: VertexAttributeKind::U16,
- },
- VertexAttribute {
- name: "aClipLocalRect",
- count: 4,
- kind: VertexAttributeKind::F32,
- },
- ],
- };
-
pub const GPU_CACHE_UPDATE: VertexDescriptor = VertexDescriptor {
vertex_attributes: &[
VertexAttribute {
@@ -574,17 +527,17 @@ pub mod desc {
VertexAttribute {
name: "aFilterRenderTaskAddress",
count: 1,
- kind: VertexAttributeKind::U16,
+ kind: VertexAttributeKind::I32,
},
VertexAttribute {
name: "aFilterInput1TaskAddress",
count: 1,
- kind: VertexAttributeKind::U16,
+ kind: VertexAttributeKind::I32,
},
VertexAttribute {
name: "aFilterInput2TaskAddress",
count: 1,
- kind: VertexAttributeKind::U16,
+ kind: VertexAttributeKind::I32,
},
VertexAttribute {
name: "aFilterKind",
@@ -602,6 +555,11 @@ pub mod desc {
kind: VertexAttributeKind::U16,
},
VertexAttribute {
+ name: "aUnused",
+ count: 1,
+ kind: VertexAttributeKind::U16,
+ },
+ VertexAttribute {
name: "aFilterExtraDataAddress",
count: 2,
kind: VertexAttributeKind::U16,
@@ -809,7 +767,6 @@ pub mod desc {
pub enum VertexArrayKind {
Primitive,
Blur,
- ClipImage,
ClipRect,
ClipBoxShadow,
VectorStencil,
@@ -1038,7 +995,6 @@ pub struct RendererVAOs {
blur_vao: VAO,
clip_rect_vao: VAO,
clip_box_shadow_vao: VAO,
- clip_image_vao: VAO,
border_vao: VAO,
line_vao: VAO,
scale_vao: VAO,
@@ -1086,7 +1042,6 @@ impl RendererVAOs {
clip_rect_vao: device.create_vao_with_new_instances(&desc::CLIP_RECT, &prim_vao),
clip_box_shadow_vao: device
.create_vao_with_new_instances(&desc::CLIP_BOX_SHADOW, &prim_vao),
- clip_image_vao: device.create_vao_with_new_instances(&desc::CLIP_IMAGE, &prim_vao),
border_vao: device.create_vao_with_new_instances(&desc::BORDER, &prim_vao),
scale_vao: device.create_vao_with_new_instances(&desc::SCALE, &prim_vao),
line_vao: device.create_vao_with_new_instances(&desc::LINE, &prim_vao),
@@ -1109,7 +1064,6 @@ impl RendererVAOs {
device.delete_vao(self.resolve_vao);
device.delete_vao(self.clip_rect_vao);
device.delete_vao(self.clip_box_shadow_vao);
- device.delete_vao(self.clip_image_vao);
device.delete_vao(self.fast_linear_gradient_vao);
device.delete_vao(self.linear_gradient_vao);
device.delete_vao(self.radial_gradient_vao);
@@ -1131,7 +1085,6 @@ impl ops::Index<VertexArrayKind> for RendererVAOs {
fn index(&self, kind: VertexArrayKind) -> &VAO {
match kind {
VertexArrayKind::Primitive => &self.prim_vao,
- VertexArrayKind::ClipImage => &self.clip_image_vao,
VertexArrayKind::ClipRect => &self.clip_rect_vao,
VertexArrayKind::ClipBoxShadow => &self.clip_box_shadow_vao,
VertexArrayKind::Blur => &self.blur_vao,