MCPcopy Create free account
hub / github.com/google/gapid / waitForVulkanLoad

Function waitForVulkanLoad

gapii/client/jdwp_loader.go:112–125  ·  view source on GitHub ↗

waitForVulkanLoad for android.app.ApplicationLoaders.getClassLoader to be called, and then suspends the thread. This function is what is used to tell the vulkan loader where to search for layers.

(ctx context.Context, conn *jdwp.Connection)

Source from the content-addressed store, hash-verified

110// This function is what is used to tell the vulkan loader where to search for
111// layers.
112func waitForVulkanLoad(ctx context.Context, conn *jdwp.Connection) (*jdwp.EventMethodEntry, int, error) {
113 loaders, err := conn.GetClassBySignature("Landroid/app/ApplicationLoaders;")
114 if err != nil {
115 return nil, 0, err
116 }
117
118 for _, sig := range getClassLoaderSignatures {
119 if getClassLoader, err := conn.GetClassMethod(loaders.ClassID(), "getClassLoader", sig.signature); err == nil {
120 entry, err := conn.WaitForMethodEntry(ctx, loaders.ClassID(), getClassLoader.ID)
121 return entry, sig.argIndex, err
122 }
123 }
124 return nil, 0, fmt.Errorf("no known ApplicationLoaders.getClassLoader method found")
125}
126
127// loadAndConnectViaJDWP connects to the application waiting for a JDWP
128// connection with the specified process id, sends a number of JDWP commands to

Callers 1

loadAndConnectViaJDWPMethod · 0.85

Calls 4

GetClassBySignatureMethod · 0.80
GetClassMethodMethod · 0.80
ClassIDMethod · 0.80
WaitForMethodEntryMethod · 0.80

Tested by

no test coverage detected