Skip to content

Commit

Permalink
[v3.8.5] Fix that bytedance platform adapter code hacked cc.ImageAsse…
Browse files Browse the repository at this point in the history
…t.data. (#17825)
  • Loading branch information
dumganhar authored Nov 8, 2024
1 parent c914c67 commit 8904950
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cocos/asset/assets/image-asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

// @ts-check
import { ccclass, override } from 'cc.decorator';
import { EDITOR, ALIPAY, XIAOMI, JSB, TEST, BAIDU, TAOBAO, TAOBAO_MINIGAME, WECHAT_MINI_PROGRAM } from 'internal:constants';
import { EDITOR, ALIPAY, XIAOMI, JSB, TEST, BAIDU, TAOBAO, TAOBAO_MINIGAME, WECHAT_MINI_PROGRAM, BYTEDANCE } from 'internal:constants';
import { Device, Format, FormatFeatureBit, deviceManager } from '../../gfx';
import { Asset } from './asset';
import { PixelFormat } from './asset-enum';
Expand Down Expand Up @@ -163,7 +163,7 @@ function fetchImageSource (imageSource: ImageSource): HTMLCanvasElement | HTMLIm

// 返回该图像源是否是平台提供的图像对象。
function isNativeImage (imageSource: ImageSource): imageSource is (HTMLImageElement | HTMLCanvasElement | ImageBitmap) {
if (ALIPAY || TAOBAO || TAOBAO_MINIGAME || XIAOMI || BAIDU || WECHAT_MINI_PROGRAM) {
if (ALIPAY || TAOBAO || TAOBAO_MINIGAME || XIAOMI || BAIDU || WECHAT_MINI_PROGRAM || BYTEDANCE) {
// We're unable to grab the constructors of Alipay native image or canvas object.
return !('_data' in imageSource);
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ require('../fs-utils');
require('../../../../common/engine/index');
require('./VideoPlayer');
require('./Label');
require('./ImageAsset');

0 comments on commit 8904950

Please sign in to comment.