@@ -212,40 +212,26 @@ class PlatformView {
212212 int64_t texture_id) = 0;
213213
214214 // --------------------------------------------------------------------------
215- // / @brief Invoked when the dart VM requests that a deferred library
216- // / be loaded. Notifies the engine that the requested loading
217- // / unit should be downloaded and loaded.
215+ // / @brief Loads the dart shared library into the dart VM. When the
216+ // / dart library is loaded successfully, the dart future
217+ // / returned by the originating loadLibrary() call completes.
218+ // / Each shared library is a loading unit, which consists of
219+ // / deferred libraries that can be compiled split from the
220+ // / base dart library by gen_snapshot.
218221 // /
219222 // / @param[in] loading_unit_id The unique id of the deferred library's
220223 // / loading unit.
221224 // /
222- // / @return A Dart_Handle that is Dart_Null on success, and a dart error
223- // / on failure .
225+ // / @param[in] snapshot_data Dart snapshot data of the loading unit's
226+ // / shared library .
224227 // /
225- virtual Dart_Handle OnPlatformViewDartLoadLibrary (
226- intptr_t loading_unit_id) = 0;
227-
228- // --------------------------------------------------------------------------
229- // / @brief Loads the dart shared library from disk and into the dart VM
230- // / based off of the search parameters. When the dart library is
231- // / loaded successfully, the dart future returned by the
232- // / originating loadLibrary() call completes.
233- // /
234- // / @param[in] loading_unit_id The unique id of the deferred library's
235- // / loading unit.
236- // /
237- // / @param[in] lib_name The file name of the .so shared library
238- // / file.
239- // /
240- // / @param[in] apkPaths The paths of the APKs that may or may not
241- // / contain the lib_name file.
228+ // / @param[in] snapshot_data Dart snapshot instructions of the loading
229+ // / unit's shared library.
242230 // /
243- // / @param[in] abi The abi of the library, eg, arm64-v8a
244- // /
245- virtual void CompleteDartLoadLibrary (intptr_t loading_unit_id,
246- std::string lib_name,
247- std::vector<std::string>& apkPaths,
248- std::string abi) = 0;
231+ virtual void CompleteDartDeferredLibraryLoading (
232+ intptr_t loading_unit_id,
233+ const uint8_t * snapshot_data,
234+ const uint8_t * snapshot_instructions) = 0;
249235
250236 // --------------------------------------------------------------------------
251237 // / @brief Sets the asset manager of the engine to asset_manager
@@ -254,7 +240,6 @@ class PlatformView {
254240 // /
255241 virtual void UpdateAssetManager (
256242 std::shared_ptr<AssetManager> asset_manager) = 0;
257- >>>>>>> 4233d6879 (Initial code)
258243 };
259244
260245 // ----------------------------------------------------------------------------
@@ -616,33 +601,35 @@ class PlatformView {
616601 // / @param[in] loading_unit_id The unique id of the deferred library's
617602 // / loading unit.
618603 // /
619- // / @return A Dart_Handle that is Dart_Null on success, and a dart error
620- // / on failure.
621- // /
622- virtual Dart_Handle OnDartLoadLibrary (intptr_t loading_unit_id);
604+ virtual void RequestDartDeferredLibrary (intptr_t loading_unit_id);
623605
624606 // --------------------------------------------------------------------------
625- // / @brief Loads the dart shared library from disk and into the dart VM
626- // / based off of the search parameters. When the dart library is
627- // / loaded successfully, the dart future returned by the
628- // / originating loadLibrary() call completes.
607+ // / @brief Loads the dart shared library into the dart VM. When the
608+ // / dart library is loaded successfully, the dart future
609+ // / returned by the originating loadLibrary() call completes.
610+ // / Each shared library is a loading unit, which consists of
611+ // / deferred libraries that can be compiled split from the
612+ // / base dart library by gen_snapshot.
629613 // /
630614 // / @param[in] loading_unit_id The unique id of the deferred library's
631615 // / loading unit.
632616 // /
633- // / @param[in] lib_name The file name of the .so shared library
634- // / file.
635- // /
636- // / @param[in] apkPaths The paths of the APKs that may or may not
637- // / contain the lib_name file.
617+ // / @param[in] snapshot_data Dart snapshot data of the loading unit's
618+ // / shared library.
638619 // /
639- // / @param[in] abi The abi of the library, eg, arm64-v8a
620+ // / @param[in] snapshot_data Dart snapshot instructions of the loading
621+ // / unit's shared library.
640622 // /
641- virtual void CompleteDartLoadLibrary ( intptr_t loading_unit_id,
642- std::string lib_name ,
643- std::vector<std::string>& apkPaths ,
644- std::string abi );
623+ virtual void CompleteDartDeferredLibraryLoading (
624+ intptr_t loading_unit_id ,
625+ const uint8_t * snapshot_data ,
626+ const uint8_t * snapshot_instructions );
645627
628+ // --------------------------------------------------------------------------
629+ // / @brief Sets the asset manager of the engine to asset_manager
630+ // /
631+ // / @param[in] asset_manager The asset manager to use.
632+ // /
646633 virtual void UpdateAssetManager (std::shared_ptr<AssetManager> asset_manager);
647634
648635 protected:
0 commit comments