Skip to content

Commit 3eefc43

Browse files
committed
Deploying to master from @ gfx-rs/wgpu@36ccc9f 🚀
1 parent 05af6e0 commit 3eefc43

14 files changed

+63
-57
lines changed

doc/search-index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/src/wgpu/api/surface.rs.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@
385385
<a href="#384" id="384">384</a>
386386
<a href="#385" id="385">385</a>
387387
<a href="#386" id="386">386</a>
388-
<a href="#387" id="387">387</a></pre></div><pre class="rust"><code><span class="kw">use </span>std::{error, fmt};
388+
<a href="#387" id="387">387</a>
389+
<a href="#388" id="388">388</a>
390+
<a href="#389" id="389">389</a></pre></div><pre class="rust"><code><span class="kw">use </span>std::{error, fmt};
389391

390392
<span class="kw">use </span>parking_lot::Mutex;
391393
<span class="kw">use </span>raw_window_handle::{HasDisplayHandle, HasWindowHandle};
@@ -410,12 +412,6 @@
410412
/// [`GPUCanvasContext`](https://gpuweb.github.io/gpuweb/#canvas-context)
411413
/// serves a similar role.
412414
</span><span class="kw">pub struct </span>Surface&lt;<span class="lifetime">'window</span>&gt; {
413-
<span class="doccomment">/// Optionally, keep the source of the handle used for the surface alive.
414-
///
415-
/// This is useful for platforms where the surface is created from a window and the surface
416-
/// would become invalid when the window is dropped.
417-
</span><span class="kw">pub</span>(<span class="kw">crate</span>) _handle_source: <span class="prelude-ty">Option</span>&lt;Box&lt;<span class="kw">dyn </span>WindowHandle + <span class="lifetime">'window</span>&gt;&gt;,
418-
419415
<span class="doccomment">/// Additional surface data returned by [`DynContext::instance_create_surface`].
420416
</span><span class="kw">pub</span>(<span class="kw">crate</span>) inner: dispatch::DispatchSurface,
421417

@@ -426,6 +422,14 @@
426422
// be wrapped in a mutex and since the configuration is only supplied after the surface has
427423
// been created is is additionally wrapped in an option.
428424
</span><span class="kw">pub</span>(<span class="kw">crate</span>) config: Mutex&lt;<span class="prelude-ty">Option</span>&lt;SurfaceConfiguration&gt;&gt;,
425+
426+
<span class="doccomment">/// Optionally, keep the source of the handle used for the surface alive.
427+
///
428+
/// This is useful for platforms where the surface is created from a window and the surface
429+
/// would become invalid when the window is dropped.
430+
///
431+
/// SAFETY: This field must be dropped *after* all other fields to ensure proper cleanup.
432+
</span><span class="kw">pub</span>(<span class="kw">crate</span>) _handle_source: <span class="prelude-ty">Option</span>&lt;Box&lt;<span class="kw">dyn </span>WindowHandle + <span class="lifetime">'window</span>&gt;&gt;,
429433
}
430434

431435
<span class="kw">impl </span>Surface&lt;<span class="lifetime">'_</span>&gt; {

doc/wgpu/api/surface/enum.CreateSurfaceErrorKind.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

doc/wgpu/api/surface/enum.SurfaceTarget.html

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

doc/wgpu/api/surface/enum.SurfaceTargetUnsafe.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The window/canvas/surface/swap-chain/etc. a surface is attached to, for use with unsafe surface creation."><title>SurfaceTargetUnsafe in wgpu::api::surface - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="wgpu" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="../../../static.files/storage-1d39b6787ed640ff.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-0111fcff984fae8f.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../../wgpu/index.html"><img src="https://raw.githubusercontent.com/gfx-rs/wgpu/trunk/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../../wgpu/index.html"><img src="https://raw.githubusercontent.com/gfx-rs/wgpu/trunk/logo.png" alt="logo"></a><h2><a href="../../../wgpu/index.html">wgpu</a><span class="version">24.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Surface<wbr>Target<wbr>Unsafe</a></h2><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.RawHandle" title="RawHandle">RawHandle</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.from_window" title="from_window">from_window</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Send-for-SurfaceTargetUnsafe" title="!Send">!Send</a></li><li><a href="#impl-Sync-for-SurfaceTargetUnsafe" title="!Sync">!Sync</a></li><li><a href="#impl-Freeze-for-SurfaceTargetUnsafe" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-SurfaceTargetUnsafe" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Unpin-for-SurfaceTargetUnsafe" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-SurfaceTargetUnsafe" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-Downcast%3CT%3E-for-T" title="Downcast&#60;T&#62;">Downcast&#60;T&#62;</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li><li><a href="#impl-Upcast%3CT%3E-for-T" title="Upcast&#60;T&#62;">Upcast&#60;T&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In wgpu::<wbr>api::<wbr>surface</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../index.html">wgpu</a>::<wbr><a href="../index.html">api</a>::<wbr><a href="index.html">surface</a></span><h1>Enum <span class="enum">SurfaceTargetUnsafe</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/wgpu/api/surface.rs.html#263-316">source</a> </span></div><pre class="rust item-decl"><code><div class="code-attribute">#[non_exhaustive]</div>pub enum SurfaceTargetUnsafe {
1+
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The window/canvas/surface/swap-chain/etc. a surface is attached to, for use with unsafe surface creation."><title>SurfaceTargetUnsafe in wgpu::api::surface - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="wgpu" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="../../../static.files/storage-1d39b6787ed640ff.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-0111fcff984fae8f.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../../wgpu/index.html"><img src="https://raw.githubusercontent.com/gfx-rs/wgpu/trunk/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../../wgpu/index.html"><img src="https://raw.githubusercontent.com/gfx-rs/wgpu/trunk/logo.png" alt="logo"></a><h2><a href="../../../wgpu/index.html">wgpu</a><span class="version">24.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Surface<wbr>Target<wbr>Unsafe</a></h2><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.RawHandle" title="RawHandle">RawHandle</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.from_window" title="from_window">from_window</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Send-for-SurfaceTargetUnsafe" title="!Send">!Send</a></li><li><a href="#impl-Sync-for-SurfaceTargetUnsafe" title="!Sync">!Sync</a></li><li><a href="#impl-Freeze-for-SurfaceTargetUnsafe" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-SurfaceTargetUnsafe" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Unpin-for-SurfaceTargetUnsafe" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-SurfaceTargetUnsafe" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-Downcast%3CT%3E-for-T" title="Downcast&#60;T&#62;">Downcast&#60;T&#62;</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li><li><a href="#impl-Upcast%3CT%3E-for-T" title="Upcast&#60;T&#62;">Upcast&#60;T&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In wgpu::<wbr>api::<wbr>surface</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../index.html">wgpu</a>::<wbr><a href="../index.html">api</a>::<wbr><a href="index.html">surface</a></span><h1>Enum <span class="enum">SurfaceTargetUnsafe</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/wgpu/api/surface.rs.html#265-318">source</a> </span></div><pre class="rust item-decl"><code><div class="code-attribute">#[non_exhaustive]</div>pub enum SurfaceTargetUnsafe {
22
RawHandle {
33
raw_display_handle: RawDisplayHandle,
44
raw_window_handle: RawWindowHandle,
@@ -19,7 +19,7 @@ <h4 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h4>
1919
</ul>
2020
</div><div class="sub-variant" id="variant.RawHandle.fields"><h4>Fields</h4><div class="sub-variant-field"><span id="variant.RawHandle.field.raw_display_handle" class="section-header"><a href="#variant.RawHandle.field.raw_display_handle" class="anchor field">§</a><code>raw_display_handle: RawDisplayHandle</code></span><div class="docblock"><p>Raw display handle, underlying display must outlive the surface created from this.</p>
2121
</div></div><div class="sub-variant-field"><span id="variant.RawHandle.field.raw_window_handle" class="section-header"><a href="#variant.RawHandle.field.raw_window_handle" class="anchor field">§</a><code>raw_window_handle: RawWindowHandle</code></span><div class="docblock"><p>Raw display handle, underlying window must outlive the surface created from this.</p>
22-
</div></div></div></div><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-SurfaceTargetUnsafe" class="impl"><a class="src rightside" href="../../../src/wgpu/api/surface.rs.html#318-334">source</a><a href="#impl-SurfaceTargetUnsafe" class="anchor">§</a><h3 class="code-header">impl <a class="enum" href="enum.SurfaceTargetUnsafe.html" title="enum wgpu::api::surface::SurfaceTargetUnsafe">SurfaceTargetUnsafe</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_window" class="method"><a class="src rightside" href="../../../src/wgpu/api/surface.rs.html#325-333">source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_window" class="fn">from_window</a>&lt;T&gt;(window: <a class="primitive" href="https://doc.rust-lang.org/1.83.0/std/primitive.reference.html">&amp;T</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.83.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, HandleError&gt;<div class="where">where
22+
</div></div></div></div><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-SurfaceTargetUnsafe" class="impl"><a class="src rightside" href="../../../src/wgpu/api/surface.rs.html#320-336">source</a><a href="#impl-SurfaceTargetUnsafe" class="anchor">§</a><h3 class="code-header">impl <a class="enum" href="enum.SurfaceTargetUnsafe.html" title="enum wgpu::api::surface::SurfaceTargetUnsafe">SurfaceTargetUnsafe</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_window" class="method"><a class="src rightside" href="../../../src/wgpu/api/surface.rs.html#327-335">source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_window" class="fn">from_window</a>&lt;T&gt;(window: <a class="primitive" href="https://doc.rust-lang.org/1.83.0/std/primitive.reference.html">&amp;T</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.83.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, HandleError&gt;<div class="where">where
2323
T: HasDisplayHandle + HasWindowHandle,</div></h4></section></summary><div class="docblock"><p>Creates a <a href="enum.SurfaceTargetUnsafe.html#variant.RawHandle" title="variant wgpu::api::surface::SurfaceTargetUnsafe::RawHandle"><code>SurfaceTargetUnsafe::RawHandle</code></a> from a window.</p>
2424
<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5>
2525
<ul>

0 commit comments

Comments
 (0)