MCPcopy Create free account
hub / github.com/Snapchat/Valdi / toLayer

Function toLayer

valdi/src/valdi/snap_drawing/SnapDrawingViewTransaction.cpp:37–39  ·  view source on GitHub ↗

Returns the Layer for a View that is a SnapDrawingLayerHolder. Returns null if the view is not a holder (e.g. a bridged NSView on macOS), so callers must null-check to avoid crashes.

Source from the content-addressed store, hash-verified

35
36/// Returns the Layer for a View that is a SnapDrawingLayerHolder. Returns null if the view is
37/// not a holder (e.g. a bridged NSView on macOS), so callers must null-check to avoid crashes.
38static Valdi::Ref<Layer> toLayer(const Ref<View>& view) {
39 return valdiViewToLayer(view);
40}
41
42SnapDrawingViewTransaction::SnapDrawingViewTransaction() = default;

Callers 9

moveViewToTreeMethod · 0.85
insertChildViewMethod · 0.85
removeViewFromParentMethod · 0.85
invalidateViewLayoutMethod · 0.85
setViewFrameMethod · 0.85
setViewScrollSpecsMethod · 0.85
setViewLoadedAssetMethod · 0.85
willEnqueueViewToPoolMethod · 0.85
snapshotViewMethod · 0.85

Calls 1

valdiViewToLayerFunction · 0.85

Tested by

no test coverage detected