pub struct RenderTask {
    pub location: RenderTaskLocation,
    pub children: SmallVec<[RenderTaskId; 2]>,
    pub kind: RenderTaskKind,
    pub sub_pass: Option<SubPass>,
    pub free_after: PassId,
    pub render_on: PassId,
    pub uv_rect_handle: GpuCacheHandle,
    pub cache_handle: Option<WeakFreeListHandle<RenderTaskCacheMarker>>,
    uv_rect_kind: UvRectKind,
}Fields§
§location: RenderTaskLocation§children: SmallVec<[RenderTaskId; 2]>§kind: RenderTaskKind§sub_pass: Option<SubPass>§free_after: PassId§render_on: PassId§uv_rect_handle: GpuCacheHandleThe gpu cache handle for the render task’s destination rect.
Will be set to None if the render task is cached, in which case the texture cache manages the handle.
cache_handle: Option<WeakFreeListHandle<RenderTaskCacheMarker>>§uv_rect_kind: UvRectKindImplementations§
Source§impl RenderTask
 
impl RenderTask
pub fn new(location: RenderTaskLocation, kind: RenderTaskKind) -> Self
pub fn new_dynamic(size: DeviceIntSize, kind: RenderTaskKind) -> Self
pub fn with_uv_rect_kind(self, uv_rect_kind: UvRectKind) -> Self
pub fn new_image( size: DeviceIntSize, request: ImageRequest, is_composited: bool, ) -> Self
pub fn new_blit( size: DeviceIntSize, source: RenderTaskId, source_rect: DeviceIntRect, rg_builder: &mut RenderTaskGraphBuilder, ) -> RenderTaskId
pub fn new_blur( blur_std_deviation: DeviceSize, src_task_id: RenderTaskId, rg_builder: &mut RenderTaskGraphBuilder, target_kind: RenderTargetKind, blur_cache: Option<&mut FastHashMap<BlurTaskKey, RenderTaskId>>, blur_region: DeviceIntSize, edge_mode: BlurEdgeMode, ) -> RenderTaskId
pub fn new_scaling( src_task_id: RenderTaskId, rg_builder: &mut RenderTaskGraphBuilder, target_kind: RenderTargetKind, size: DeviceIntSize, ) -> RenderTaskId
pub fn new_scaling_with_padding( source: RenderTaskId, rg_builder: &mut RenderTaskGraphBuilder, target_kind: RenderTargetKind, padded_size: DeviceIntSize, padding: DeviceIntSideOffsets, ) -> RenderTaskId
pub fn new_svg_filter( filter_primitives: &[FilterPrimitive], filter_datas: &[SFilterData], rg_builder: &mut RenderTaskGraphBuilder, content_size: DeviceIntSize, uv_rect_kind: UvRectKind, original_task_id: RenderTaskId, device_pixel_scale: DevicePixelScale, ) -> RenderTaskId
pub fn new_svg_filter_primitive( tasks: SmallVec<[RenderTaskId; 2]>, target_size: DeviceIntSize, uv_rect_kind: UvRectKind, info: SvgFilterInfo, rg_builder: &mut RenderTaskGraphBuilder, ) -> RenderTaskId
pub fn add_sub_pass(&mut self, sub_pass: SubPass)
Sourcepub fn new_svg_filter_graph(
    filter_nodes: &[(FilterGraphNode, FilterGraphOp)],
    rg_builder: &mut RenderTaskGraphBuilder,
    gpu_cache: &mut GpuCache,
    data_stores: &mut DataStores,
    _uv_rect_kind: UvRectKind,
    original_task_id: RenderTaskId,
    source_subregion: LayoutRect,
    target_subregion: LayoutRect,
    prim_subregion: LayoutRect,
    subregion_to_device_scale_x: f32,
    subregion_to_device_scale_y: f32,
    subregion_to_device_offset_x: f32,
    subregion_to_device_offset_y: f32,
) -> RenderTaskId
 
pub fn new_svg_filter_graph( filter_nodes: &[(FilterGraphNode, FilterGraphOp)], rg_builder: &mut RenderTaskGraphBuilder, gpu_cache: &mut GpuCache, data_stores: &mut DataStores, _uv_rect_kind: UvRectKind, original_task_id: RenderTaskId, source_subregion: LayoutRect, target_subregion: LayoutRect, prim_subregion: LayoutRect, subregion_to_device_scale_x: f32, subregion_to_device_scale_y: f32, subregion_to_device_offset_x: f32, subregion_to_device_offset_y: f32, ) -> RenderTaskId
Creates render tasks from PictureCompositeMode::SVGFEGraph.
The interesting parts of the handling of SVG filters are:
- scene_building.rs : wrap_prim_with_filters
 - picture.rs : get_coverage_svgfe
 - render_task.rs : new_svg_filter_graph (you are here)
 - render_target.rs : add_svg_filter_node_instances
 
pub fn uv_rect_kind(&self) -> UvRectKind
pub fn get_texture_address(&self, gpu_cache: &GpuCache) -> GpuCacheAddress
pub fn get_target_texture(&self) -> CacheTextureId
pub fn get_texture_source(&self) -> TextureSource
pub fn get_target_rect(&self) -> DeviceIntRect
pub fn get_target_size(&self) -> DeviceIntSize
pub fn target_kind(&self) -> RenderTargetKind
pub fn write_gpu_blocks( &mut self, target_rect: DeviceIntRect, gpu_cache: &mut GpuCache, )
Sourcepub fn mark_cached(&mut self, handle: WeakFreeListHandle<RenderTaskCacheMarker>)
 
pub fn mark_cached(&mut self, handle: WeakFreeListHandle<RenderTaskCacheMarker>)
Called by the render task cache.
Tells the render task that it is cached (which means its gpu cache handle is managed by the texture cache).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RenderTask
impl RefUnwindSafe for RenderTask
impl Send for RenderTask
impl Sync for RenderTask
impl Unpin for RenderTask
impl UnwindSafe for RenderTask
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more