Struct webrender::render_task::RenderTask
source · 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: GpuCacheHandle
The 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: UvRectKind
Implementations§
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) -> 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, ) -> 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)],
frame_state: &mut FrameBuildingState<'_>,
data_stores: &mut DataStores,
uv_rect_kind: UvRectKind,
original_task_id: RenderTaskId,
surface_rects_task_size: DeviceIntSize,
surface_rects_clipped: DeviceRect,
surface_rects_clipped_local: PictureRect,
) -> RenderTaskId
pub fn new_svg_filter_graph( filter_nodes: &[(FilterGraphNode, FilterGraphOp)], frame_state: &mut FrameBuildingState<'_>, data_stores: &mut DataStores, uv_rect_kind: UvRectKind, original_task_id: RenderTaskId, surface_rects_task_size: DeviceIntSize, surface_rects_clipped: DeviceRect, surface_rects_clipped_local: PictureRect, ) -> 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