summaryrefslogtreecommitdiff
path: root/editor/editor_resource_preview.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_resource_preview.h')
-rw-r--r--editor/editor_resource_preview.h28
1 files changed, 7 insertions, 21 deletions
diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h
index a3417cdf60..9b9223a818 100644
--- a/editor/editor_resource_preview.h
+++ b/editor/editor_resource_preview.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -36,24 +36,6 @@
#include "scene/main/node.h"
#include "scene/resources/texture.h"
-/* make previews for:
-*packdscene
-*wav
-*image
-*mesh
--font
-*script
-*material
--shader
--shader graph?
--navigation mesh
--collision?
--occluder polygon
--navigation polygon
--tileset
--curve and curve2D
-*/
-
class EditorResourcePreviewGenerator : public Reference {
GDCLASS(EditorResourcePreviewGenerator, Reference);
@@ -90,7 +72,8 @@ class EditorResourcePreview : public Node {
Mutex *preview_mutex;
Semaphore *preview_sem;
Thread *thread;
- bool exit;
+ volatile bool exit;
+ volatile bool exited;
struct Item {
Ref<Texture> preview;
@@ -126,6 +109,9 @@ public:
void remove_preview_generator(const Ref<EditorResourcePreviewGenerator> &p_generator);
void check_for_invalidation(const String &p_path);
+ void start();
+ void stop();
+
EditorResourcePreview();
~EditorResourcePreview();
};