Removal of Image from Variant, converted to a Resource.

This commit is contained in:
Juan Linietsky
2017-05-17 07:36:47 -03:00
parent d801ff2b3d
commit 98a3296702
110 changed files with 690 additions and 3203 deletions

View File

@@ -344,14 +344,16 @@ void EditorProfiler::_update_plot() {
wr = PoolVector<uint8_t>::Write();
Image img(w, h, 0, Image::FORMAT_RGBA8, graph_image);
Ref<Image> img;
img.instance();
img->create(w, h, 0, Image::FORMAT_RGBA8, graph_image);
if (reset_texture) {
if (graph_texture.is_null()) {
graph_texture.instance();
}
graph_texture->create(img.get_width(), img.get_height(), img.get_format(), Texture::FLAG_VIDEO_SURFACE);
graph_texture->create(img->get_width(), img->get_height(), img->get_format(), Texture::FLAG_VIDEO_SURFACE);
}
graph_texture->set_data(img);