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

source

pub fn new(location: RenderTaskLocation, kind: RenderTaskKind) -> Self

source

pub fn new_dynamic(size: DeviceIntSize, kind: RenderTaskKind) -> Self

source

pub fn with_uv_rect_kind(self, uv_rect_kind: UvRectKind) -> Self

source

pub fn new_image(size: DeviceIntSize, request: ImageRequest) -> Self

source

pub fn new_blit( size: DeviceIntSize, source: RenderTaskId, source_rect: DeviceIntRect, rg_builder: &mut RenderTaskGraphBuilder, ) -> RenderTaskId

source

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

source

pub fn new_scaling( src_task_id: RenderTaskId, rg_builder: &mut RenderTaskGraphBuilder, target_kind: RenderTargetKind, size: DeviceIntSize, ) -> RenderTaskId

source

pub fn new_scaling_with_padding( source: RenderTaskId, rg_builder: &mut RenderTaskGraphBuilder, target_kind: RenderTargetKind, padded_size: DeviceIntSize, padding: DeviceIntSideOffsets, ) -> RenderTaskId

source

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

source

pub fn new_svg_filter_primitive( tasks: SmallVec<[RenderTaskId; 2]>, target_size: DeviceIntSize, uv_rect_kind: UvRectKind, info: SvgFilterInfo, rg_builder: &mut RenderTaskGraphBuilder, ) -> RenderTaskId

source

pub fn add_sub_pass(&mut self, sub_pass: SubPass)

source

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
source

pub fn uv_rect_kind(&self) -> UvRectKind

source

pub fn get_texture_address(&self, gpu_cache: &GpuCache) -> GpuCacheAddress

source

pub fn get_target_texture(&self) -> CacheTextureId

source

pub fn get_texture_source(&self) -> TextureSource

source

pub fn get_target_rect(&self) -> DeviceIntRect

source

pub fn get_target_size(&self) -> DeviceIntSize

source

pub fn target_kind(&self) -> RenderTargetKind

source

pub fn write_gpu_blocks( &mut self, target_rect: DeviceIntRect, gpu_cache: &mut GpuCache, )

source

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§

source§

impl Serialize for RenderTask

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.