You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
FONGMITV/danmaku/src/main/java/tv/cjump/jni/BitmapFactory.java

19 lines
686 B

package tv.cjump.jni;
import android.graphics.Bitmap;
import android.os.Build;
public class BitmapFactory {
public static Bitmap createBitmap(int width, int height, Bitmap.Config config) {
return createBitmap(width, height, config, config.equals(Bitmap.Config.ARGB_4444) || config.equals(Bitmap.Config.ARGB_8888));
}
public static synchronized Bitmap createBitmap(int width, int height, Bitmap.Config config, boolean hasAlpha) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
return Bitmap.createBitmap(width, height, config, hasAlpha);
} else {
return Bitmap.createBitmap(width, height, config);
}
}
}