Class ShaderDoubleTexturesEffect
Base shader effect class that has 2 input textures.
public class ShaderDoubleTexturesEffect : SkiaShaderEffect, INotifyPropertyChanged, IDisposable, IPostRendererEffect, ISkiaEffect, ICanBeUpdatedWithContext, ICanBeUpdated
- Inheritance
-
ShaderDoubleTexturesEffect
- Implements
- Inherited Members
- Extension Methods
Fields
AssignedControlTo
protected SkiaControl AssignedControlTo
Field Value
ControlFromProperty
public static readonly BindableProperty ControlFromProperty
Field Value
ControlToProperty
public static readonly BindableProperty ControlToProperty
Field Value
LoadedSecondaryBitmap
protected SKBitmap LoadedSecondaryBitmap
Field Value
PrimarySourceProperty
public static readonly BindableProperty PrimarySourceProperty
Field Value
SecondarySourceProperty
public static readonly BindableProperty SecondarySourceProperty
Field Value
SecondaryTexture
Will be normally set by CompileSecondaryTexture
protected SKShader SecondaryTexture
Field Value
TilingSecondaryTexture
protected SKShaderTileMode TilingSecondaryTexture
Field Value
Properties
ControlFrom
public SkiaControl ControlFrom { get; set; }
Property Value
ControlTo
public SkiaControl ControlTo { get; set; }
Property Value
LoadedPrimaryBitmap
protected SKBitmap LoadedPrimaryBitmap { get; set; }
Property Value
PrimarySource
public string PrimarySource { get; set; }
Property Value
ResizedPrimaryImage
Loaded from file
protected SKImage ResizedPrimaryImage { get; set; }
Property Value
SecondarySource
public string SecondarySource { get; set; }
Property Value
Methods
ApplyControlTo(SkiaControl)
protected virtual void ApplyControlTo(SkiaControl control)
Parameters
controlSkiaControl
CompileSecondaryTexture(SKImage)
public void CompileSecondaryTexture(SKImage image)
Parameters
imageSKImage
CreateTexturesUniforms(SkiaDrawingContext, SKRect, SKShader)
Creates texture uniforms fresh each time
protected override SKRuntimeEffectChildren CreateTexturesUniforms(SkiaDrawingContext ctx, SKRect destination, SKShader primaryTexture)
Parameters
ctxSkiaDrawingContextdestinationSKRectprimaryTextureSKShader
Returns
GetPrimaryTextureImage(SkiaDrawingContext, SKRect)
Returns the background texture according to the current UseBackground mode. Always — live snapshot (or parent cache) every frame. Once — snapshot taken on first call, frozen thereafter; reset AquiredBackground to re-capture. Never — returns null; shader must not require iImage1.
protected override SKImage GetPrimaryTextureImage(SkiaDrawingContext ctx, SKRect destination)
Parameters
ctxSkiaDrawingContextdestinationSKRect
Returns
GetSecondaryTexture()
protected virtual SKShader GetSecondaryTexture()
Returns
ImportCacheTo()
protected virtual void ImportCacheTo()
LoadPrimarySource(string)
Loading from local files only
public Task LoadPrimarySource(string fileName)
Parameters
fileNamestring
Returns
LoadSecondarySource(string)
Loading from local files only
public Task LoadSecondarySource(string fileName)
Parameters
fileNamestring
Returns
OnDisposing()
Simplified dispose - only CPU-side resources
protected override void OnDisposing()
ParentReady()
protected bool ParentReady()
Returns
ResizePrimaryLoadedBitmap()
public void ResizePrimaryLoadedBitmap()
ResizeSecondaryLoadedBitmapAndCompileTexture()
public void ResizeSecondaryLoadedBitmapAndCompileTexture()
ShouldDisposePreviousTexture(SKImage)
Checks if image is a new snapshot that needs disposal this frame. Frozen snapshots are managed by ReleaseFrozenSnapshot; parent cache is never owned.
protected override bool ShouldDisposePreviousTexture(SKImage image)
Parameters
imageSKImage