Skip to content

Commit

Permalink
fix ESLint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
yoki0805 committed Oct 22, 2024
1 parent ee8e6bc commit 76df15d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cocos/gfx/webgl/webgl-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2724,8 +2724,8 @@ export function WebGLCmdFuncCopyBuffersToTexture (
);
} else {
const isFullCopy = (
gpuTexture.width$ === destWidth && gpuTexture.height$ === destHeight &&
offset.x === 0 && offset.y === 0
gpuTexture.width$ === destWidth && gpuTexture.height$ === destHeight
&& offset.x === 0 && offset.y === 0
);
if (!isFullCopy && gpuTexture.glInternalFmt$ !== (WebGLEXT.COMPRESSED_RGB_ETC1_WEBGL as number) && !device.extensions.noCompressedTexSubImage2D$) {

Check warning on line 2730 in cocos/gfx/webgl/webgl-commands.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 163. Maximum allowed is 150
gl.compressedTexSubImage2D(
Expand Down
4 changes: 2 additions & 2 deletions cocos/gfx/webgl2/webgl2-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2972,8 +2972,8 @@ export function WebGL2CmdFuncCopyBuffersToTexture (
);
} else {
const isFullCopy = (
gpuTexture.width$ === destWidth && gpuTexture.height$ === destHeight &&
offset.x === 0 && offset.y === 0
gpuTexture.width$ === destWidth && gpuTexture.height$ === destHeight
&& offset.x === 0 && offset.y === 0
);
if (!isFullCopy && gpuTexture.glInternalFmt$ !== WebGL2EXT.COMPRESSED_RGB_ETC1_WEBGL as number) {
gl.compressedTexSubImage3D(
Expand Down

0 comments on commit 76df15d

Please sign in to comment.