1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

-Ability to debug video memory usage

-Small fix to xml saver (swapping > and <)
This commit is contained in:
Juan Linietsky
2015-10-21 09:50:44 -03:00
parent f6a790d58c
commit b59c86f6f9
18 changed files with 271 additions and 7 deletions

View File

@@ -34,6 +34,33 @@
#include "print_string.h"
#include <stdio.h>
const char* Image::format_names[Image::FORMAT_MAX]={
"Grayscale",
"Intensity",
"GrayscaleAlpha",
"RGB",
"RGBA",
"Indexed",
"IndexedAlpha",
"YUV422",
"YUV444",
"BC1",
"BC2",
"BC3",
"BC4",
"BC5",
"PVRTC2",
"PVRTC2Alpha",
"PVRTC4",
"PVRTC4Alpha",
"ETC",
"ATC",
"ATCAlphaExp",
"ATCAlphaInterp",
};
SavePNGFunc Image::save_png_func = NULL;
void Image::_put_pixel(int p_x,int p_y, const BColor& p_color, unsigned char *p_data) {
@@ -2355,6 +2382,12 @@ void Image::fix_alpha_edges() {
}
String Image::get_format_name(Format p_format) {
ERR_FAIL_INDEX_V(p_format,FORMAT_MAX,String());
return format_names[p_format];
}
Image::Image(const uint8_t* p_png,int p_len) {
width=0;