diff options
Diffstat (limited to 'editor/editor_resource_preview.h')
-rw-r--r-- | editor/editor_resource_preview.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h index 8091fbafdc..0a89154243 100644 --- a/editor/editor_resource_preview.h +++ b/editor/editor_resource_preview.h @@ -45,8 +45,8 @@ protected: public: virtual bool handles(const String &p_type) const; - virtual Ref<Texture> generate(const RES &p_from, const Size2 &p_size) const; - virtual Ref<Texture> generate_from_path(const String &p_path, const Size2 &p_size) const; + virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const; + virtual Ref<Texture2D> generate_from_path(const String &p_path, const Size2 &p_size) const; virtual bool generate_small_preview_automatically() const; virtual bool can_generate_small_preview() const; @@ -71,14 +71,14 @@ class EditorResourcePreview : public Node { List<QueueItem> queue; Mutex *preview_mutex; - Semaphore *preview_sem; + SemaphoreOld *preview_sem; Thread *thread; volatile bool exit; volatile bool exited; struct Item { - Ref<Texture> preview; - Ref<Texture> small_preview; + Ref<Texture2D> preview; + Ref<Texture2D> small_preview; int order; uint32_t last_hash; uint64_t modified_time; @@ -88,7 +88,7 @@ class EditorResourcePreview : public Node { Map<String, Item> cache; - void _preview_ready(const String &p_str, const Ref<Texture> &p_texture, const Ref<Texture> &p_small_texture, ObjectID id, const StringName &p_func, const Variant &p_ud); + void _preview_ready(const String &p_str, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_small_texture, ObjectID id, const StringName &p_func, const Variant &p_ud); void _generate_preview(Ref<ImageTexture> &r_texture, Ref<ImageTexture> &r_small_texture, const QueueItem &p_item, const String &cache_base); static void _thread_func(void *ud); @@ -102,7 +102,7 @@ protected: public: static EditorResourcePreview *get_singleton(); - //callback function is callback(String p_path,Ref<Texture> preview,Variant udata) preview null if could not load + //callback function is callback(String p_path,Ref<Texture2D> preview,Variant udata) preview null if could not load void queue_resource_preview(const String &p_path, Object *p_receiver, const StringName &p_receiver_func, const Variant &p_userdata); void queue_edited_resource_preview(const Ref<Resource> &p_res, Object *p_receiver, const StringName &p_receiver_func, const Variant &p_userdata); |