Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ICanvas3

interface ICanvas3
Extends ICanvas2 ICanvas3 interface extends ICanvas2 with support for backdrop filtering via SaveLayerConfig. It defines a new ::saveLayerWithConfig method that accepts a SaveLayerConfig data object to configure layer allocation with optional bounds, paint, and backdrop filter parameters. See graphics-Canvas_UserGuide.md for details.

Methods

saveLayerWithConfig()

u32 saveLayerWithConfig(SaveLayerConfig* config)
This method behaves the same as ICanvas::save, but in addition it allocates and redirects drawing to an offscreen rendering target. When the balancing call to ICanvas::restore is made, the offscreen buffer is drawn back to the current target of the ICanvas (which can potentially be a previous layer if these calls are nested). Unlike ICanvas2::saveLayer, this method accepts a SaveLayerConfig struct that groups all optional parameters and adds support for backdrop filtering. When SaveLayerConfig::backdropFilter is set, existing content behind the layer is filtered (e.g., blurred) before new content is drawn on top. Content drawn between this call and ICanvas::restore appears unfiltered on top of the filtered backdrop. To constrain the backdrop filter region, apply ICanvas::clipRect or ICanvas::clipRRect before calling this method, as SaveLayerConfig::bounds is ignored when a backdrop filter is present.

Parameters

config
SaveLayerConfig* — Required The SaveLayerConfig specifying optional bounds, paint, and backdrop filter. Individual fields within the config may be null.

Returns

u32 A save count identifier for restoring this layer state by passing it to ICanvas::restoreToCount.
Last modified on October 29, 2026