共用方式為


interface ICoreWebView2ExperimentalWebTexture

Note

This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.

Note

This an experimental API that is shipped with our prerelease SDK. See WebView2 release notes.

interface ICoreWebView2ExperimentalWebTexture
  : public IUnknown

Received texture that the renderer writes to so that the host will read on it.

Summary

Members Descriptions
get_Handle texture handle.
get_Resource Direct2D texture resource.
get_Timestamp It is timestamp of the web texture.

Applies to

Product Introduced
WebView2 Win32 N/A
WebView2 Win32 Prerelease 1.0.1724

Members

get_Handle

texture handle.

public HRESULT get_Handle(HANDLE * value)

The handle's lifetime is owned by the ICoreWebView2ExperimentalTextureStream object so the host must not close it. The same handle value will be used for same texture so the host can use handle value as a unique texture key. If the host opens its own resources by handle, then it is suggested that the host removes those resources when the handle's texture size is changed because the browser also removed previously allocated different sized textures when image size is changed.

get_Resource

Direct2D texture resource.

public HRESULT get_Resource(IUnknown ** value)

The same resource value will be used for same texture so the host can use resource value as a unique texture key. ICoreWebView2ExperimentalTextureStream object has a reference of the resource so ICoreWebView2ExperimentalWebTexture holds same resource object for the same texture.

get_Timestamp

It is timestamp of the web texture.

public HRESULT get_Timestamp(UINT64 * value)

Javascript can set this value with any value, but it is suggested to use same value of its original video frame that is a value of PresentTexture so that the host is able to tell the receiving texture delta.