summaryrefslogtreecommitdiff
path: root/editor/editor_resource_preview.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-12 21:08:02 +0200
committerGitHub <noreply@github.com>2022-05-12 21:08:02 +0200
commitff30a0999374309eca206e7e45185549ef7f3c93 (patch)
tree50465bcae78180518d17f4b3b0459b25efe3a1ea /editor/editor_resource_preview.cpp
parentf5978f4d97150d9e7a1598f9637f0f3c06d72d33 (diff)
parent652adcd5bfc569b93d8da3d1539f9a030d065eb7 (diff)
Merge pull request #60643 from clayjohn/GLES3-3D
Diffstat (limited to 'editor/editor_resource_preview.cpp')
-rw-r--r--editor/editor_resource_preview.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index 6d5b20e591..dffb378408 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -430,12 +430,8 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) {
}
void EditorResourcePreview::start() {
- if (OS::get_singleton()->get_render_main_thread_mode() == OS::RENDER_ANY_THREAD) {
- ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started.");
- thread.start(_thread_func, this);
- } else {
- _mainthread_only = true;
- }
+ ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started.");
+ thread.start(_thread_func, this);
}
void EditorResourcePreview::stop() {
@@ -458,18 +454,3 @@ EditorResourcePreview::EditorResourcePreview() {
EditorResourcePreview::~EditorResourcePreview() {
stop();
}
-
-void EditorResourcePreview::update() {
- if (!_mainthread_only) {
- return;
- }
-
- if (!exit.is_set()) {
- // no need to even lock the mutex if the size is zero
- // there is no problem if queue.size() is wrong, even if
- // there was a race condition.
- if (queue.size()) {
- _iterate();
- }
- }
-}