Ejemplo n.º 1
0
        RuntimeController(RuntimeDelegate client, WindowData data)
        {
            window_data_ = data;
            client_      = client;

            //DartVM dartVM
            //DartSnapshot isolate_snapshot
            //DartSnapshot shared_snapshot
            //TaskRunners task_runners
            //SnapshotDelegate snapshot_delegate
            //GrContext resource_context
            //SkiaUnrefQueue unref_queue
            //string advisory_script_uri
            //string advisory_script_entrypoint

            DartIsolate root_isolate = root_isolate_.lock ();
                                       root_isolate.SetReturnCodeCallback(
                (uint code) =>
            {
                root_isolate_return_code_ = new Tuple <bool, uint>(true, code);
            });

            if (var window = GetWindowIfAvailable())
            {
                tonic::DartState::Scope scope = new Scope(root_isolate);
                window.DidCreateIsolate();
                if (!FlushRuntimeStateToIsolate())
                {
                    FML_DLOG(ERROR) << "Could not setup intial isolate state.";
                }
            }
Ejemplo n.º 2
0
 public RuntimeController(RuntimeDelegate client)
     : this(client, new WindowData())
 {
     //DartVM vm
     //DartSnapshot isolate_snapshot
     //DartSnapshot shared_snapshot
     //TaskRunners task_runners
     //SnapshotDelegate snapshot_delegate
     //GrContext resource_context
     //SkiaUnrefQueue unref_queue
     //string advisory_script_uri
     //string advisory_script_entrypoint
 }
Ejemplo n.º 3
0
        internal RuntimeDelegate BuildRuntimeMiddleware()
        {
            RuntimeDelegate app = context =>
            {
                return(Task.CompletedTask);
            };

            foreach (var middleware in runtimeMiddlewares.Reverse())
            {
                app = middleware(app);
            }

            return(app);
        }