summaryrefslogtreecommitdiffstats
path: root/gfx/wr/webrender/src/render_task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/wr/webrender/src/render_task.rs')
-rw-r--r--gfx/wr/webrender/src/render_task.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/gfx/wr/webrender/src/render_task.rs b/gfx/wr/webrender/src/render_task.rs
index 8889ae1ea6..bf9050712c 100644
--- a/gfx/wr/webrender/src/render_task.rs
+++ b/gfx/wr/webrender/src/render_task.rs
@@ -8,6 +8,7 @@ use api::MAX_RENDER_TASK_SIZE;
use api::units::*;
use crate::clip::{ClipDataStore, ClipItemKind, ClipStore, ClipNodeRange};
use crate::command_buffer::{CommandBufferIndex, QuadFlags};
+use crate::pattern::{PatternKind, PatternShaderInput};
use crate::spatial_tree::SpatialNodeIndex;
use crate::filterdata::SFilterData;
use crate::frame_builder::FrameBuilderConfig;
@@ -184,6 +185,8 @@ pub struct EmptyTask {
#[cfg_attr(feature = "capture", derive(Serialize))]
#[cfg_attr(feature = "replay", derive(Deserialize))]
pub struct PrimTask {
+ pub pattern: PatternKind,
+ pub pattern_input: PatternShaderInput,
pub device_pixel_scale: DevicePixelScale,
pub content_origin: DevicePoint,
pub prim_address_f: GpuBufferAddress,
@@ -516,6 +519,8 @@ impl RenderTaskKind {
}
pub fn new_prim(
+ pattern: PatternKind,
+ pattern_input: PatternShaderInput,
prim_spatial_node_index: SpatialNodeIndex,
raster_spatial_node_index: SpatialNodeIndex,
device_pixel_scale: DevicePixelScale,
@@ -528,6 +533,8 @@ impl RenderTaskKind {
prim_needs_scissor_rect: bool,
) -> Self {
RenderTaskKind::Prim(PrimTask {
+ pattern,
+ pattern_input,
prim_spatial_node_index,
raster_spatial_node_index,
device_pixel_scale,
@@ -940,9 +947,7 @@ impl RenderTask {
size: DeviceIntSize,
kind: RenderTaskKind,
) -> Self {
- if size.is_empty() {
- log::warn!("Bad {} render task size: {:?}", kind.as_str(), size);
- }
+ assert!(!size.is_empty(), "Bad {} render task size: {:?}", kind.as_str(), size);
RenderTask::new(
RenderTaskLocation::Unallocated { size },
kind,