Previously, we can only add the root view of FrameUpdateCallback as
root layer of window.
Now let we add some API that user can set specific view
for given FrameUpdateCallback will use.
This API will be used when we want to optimize callback behaviour.
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
}
/// <summary>
+ /// Add FrameUpdateCallback with root view.
+ /// FrameUpdateCallbackInterface can only detach Views under given view.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void AddFrameUpdateCallback(FrameUpdateCallbackInterface frameUpdateCallback, View rootView)
+ {
+ if(rootView != null)
+ {
+ frameUpdateCallback?.AddFrameUpdateCallback(stageCPtr, View.getCPtr(rootView));
+ }
+ }
+
+ /// <summary>
/// Remove FrameUpdateCallback
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
// Add frame callback on window.
// OnUpdate callback of frameUpdateCallback will be called before every render frame.
- window.AddFrameUpdateCallback(frameUpdateCallback);
+ // We can set root view what given frameUpdateCallback used
+ window.AddFrameUpdateCallback(frameUpdateCallback, controlView);
// compute limit position the container could go.
leftDirectionLimit = (float)window.Size.Width - (totalSize + (float)(INITIAL_POSITION));