Skip to content

Commit 4e7d21c

Browse files
committed
Clean this one if mismatch statement variable
1 parent 9746a5b commit 4e7d21c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

source/hxvlc/openfl/Video.hx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,10 +1365,11 @@ class Video extends openfl.display.Bitmap
13651365
textureMutex.acquire();
13661366

13671367
final sizeMismatch:Bool = bitmapData != null && (bitmapData.width != textureWidth || bitmapData.height != textureHeight);
1368-
final textureMismatch:Bool = bitmapData != null && bitmapData.__texture != null && !useTexture;
1369-
final imageMismatch:Bool = bitmapData != null && bitmapData.image != null && useTexture;
1368+
final dataMismatch:Bool = bitmapData != null && (
1369+
if (useTexture) bitmapData.image != null && Lib.current.stage?.context3D != null
1370+
else bitmapData.__texture != null);
13701371

1371-
if (bitmapData == null || sizeMismatch || textureMismatch || imageMismatch)
1372+
if (bitmapData == null || sizeMismatch || dataMismatch)
13721373
{
13731374
if (bitmapData != null)
13741375
{

0 commit comments

Comments
 (0)