vlc | branch: master | Steve Lhomme <[email protected]> | Mon Feb 25 13:00:38 
2019 +0100| [b4a6c92aecff6e61c9a7ce65999544ed01aebc89] | committer: Steve Lhomme

direct3d11: simplify the is_slow checks

Replace the value of is_slow by is_d3d11_opaque()/DXGI_FORMAT_UNKNOWN and
remove the redundant/impossible cases.

This makes the code more readable.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b4a6c92aecff6e61c9a7ce65999544ed01aebc89
---

 modules/video_output/win32/direct3d11.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c 
b/modules/video_output/win32/direct3d11.c
index 503c8c45d0..06c00b3764 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -601,7 +601,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned 
pool_size)
     if (sys->sys.pool)
         return sys->sys.pool;
 
-    if (vd->info.is_slow)
+    if (!is_d3d11_opaque(vd->fmt.i_chroma))
         pool_size = 1;
 
     video_format_t surface_fmt = vd->fmt;
@@ -669,7 +669,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned 
pool_size)
         .picture       = pictures,
         .picture_count = pool_size,
     };
-    if (vd->info.is_slow && !is_d3d11_opaque(surface_fmt.i_chroma)) {
+    if (!is_d3d11_opaque(surface_fmt.i_chroma)) {
         pool_cfg.lock          = Direct3D11MapPoolTexture;
         //pool_cfg.unlock        = Direct3D11UnmapPoolTexture;
     }
@@ -1599,7 +1599,7 @@ static int Direct3D11CreateFormatResources(vout_display_t 
*vd, const video_forma
          vd->source.projection_mode == PROJECTION_MODE_CUBEMAP_LAYOUT_STANDARD 
)
         SetQuadVSProjection( vd, &sys->picQuad, &sys->sys.vdcfg.viewpoint );
 
-    if (!vd->info.is_slow) {
+    if (is_d3d11_opaque(fmt->i_chroma)) {
         ID3D10Multithread *pMultithread;
         hr = ID3D11Device_QueryInterface( sys->d3d_dev.d3ddevice, 
&IID_ID3D10Multithread, (void **)&pMultithread);
         if (SUCCEEDED(hr)) {

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to