Skip to content

Commit e6b2247

Browse files
committed
Deploying to master from @ acadd8dad5ea293660458eb33fbcb42f9820a7f9 🚀
1 parent 388854f commit e6b2247

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

‎doc/src/wgpu_hal/gles/adapter.rs.html

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,27 +1680,27 @@
16801680
<span class="kw-2">&amp;</span><span class="self">self</span>,
16811681
surface: <span class="kw-2">&amp;</span><span class="kw">super</span>::Surface,
16821682
) -&gt; <span class="prelude-ty">Option</span>&lt;<span class="kw">crate</span>::SurfaceCapabilities&gt; {
1683-
<span class="kw">let </span><span class="kw-2">mut </span>formats = <span class="kw">if </span>surface.supports_srgb() {
1684-
<span class="macro">vec!</span>[
1685-
wgt::TextureFormat::Rgba8UnormSrgb,
1686-
<span class="attribute">#[cfg(not(target_arch = <span class="string">&quot;wasm32&quot;</span>))]
1687-
</span>wgt::TextureFormat::Bgra8UnormSrgb,
1688-
]
1689-
} <span class="kw">else </span>{
1690-
<span class="macro">vec!</span>[
1683+
<span class="kw">if </span>surface.presentable {
1684+
<span class="kw">let </span><span class="kw-2">mut </span>formats = <span class="macro">vec!</span>[
16911685
wgt::TextureFormat::Rgba8Unorm,
16921686
<span class="attribute">#[cfg(not(target_arch = <span class="string">&quot;wasm32&quot;</span>))]
16931687
</span>wgt::TextureFormat::Bgra8Unorm,
1694-
]
1695-
};
1696-
<span class="kw">if </span><span class="self">self
1697-
</span>.shared
1698-
.private_caps
1699-
.contains(<span class="kw">super</span>::PrivateCapabilities::COLOR_BUFFER_HALF_FLOAT)
1700-
{
1701-
formats.push(wgt::TextureFormat::Rgba16Float)
1702-
}
1703-
<span class="kw">if </span>surface.presentable {
1688+
];
1689+
<span class="kw">if </span>surface.supports_srgb() {
1690+
formats.extend(<span class="kw-2">&amp;</span>[
1691+
wgt::TextureFormat::Rgba8UnormSrgb,
1692+
<span class="attribute">#[cfg(not(target_arch = <span class="string">&quot;wasm32&quot;</span>))]
1693+
</span>wgt::TextureFormat::Bgra8UnormSrgb,
1694+
])
1695+
}
1696+
<span class="kw">if </span><span class="self">self
1697+
</span>.shared
1698+
.private_caps
1699+
.contains(<span class="kw">super</span>::PrivateCapabilities::COLOR_BUFFER_HALF_FLOAT)
1700+
{
1701+
formats.push(wgt::TextureFormat::Rgba16Float)
1702+
}
1703+
17041704
<span class="prelude-val">Some</span>(<span class="kw">crate</span>::SurfaceCapabilities {
17051705
formats,
17061706
present_modes: <span class="macro">vec!</span>[wgt::PresentMode::Fifo], <span class="comment">//TODO

0 commit comments

Comments
 (0)