Browse Source

bigmeter: do not request inline display during process

tags/v2.3.0-RC1
falkTX 3 years ago
parent
commit
6c088cdee6
2 changed files with 26 additions and 19 deletions
  1. +13
    -16
      source/native-plugins/audio-file.cpp
  2. +13
    -3
      source/native-plugins/bigmeter.cpp

+ 13
- 16
source/native-plugins/audio-file.cpp View File

@@ -259,22 +259,6 @@ protected:
#endif
}

// -------------------------------------------------------------------
// Plugin dispatcher calls

void idle() override
{
NativePluginWithMidiPrograms<FileAudio>::idle();

#ifndef __MOD_DEVICES__
if (fInlineDisplay.pending == InlineDisplayNeedRequest)
{
fInlineDisplay.pending = InlineDisplayRequesting;
hostQueueDrawInlineDisplay();
}
#endif
}

// -------------------------------------------------------------------
// Plugin UI calls

@@ -300,6 +284,19 @@ protected:
// -------------------------------------------------------------------
// Plugin dispatcher calls

void idle() override
{
NativePluginWithMidiPrograms<FileAudio>::idle();

#ifndef __MOD_DEVICES__
if (fInlineDisplay.pending == InlineDisplayNeedRequest)
{
fInlineDisplay.pending = InlineDisplayRequesting;
hostQueueDrawInlineDisplay();
}
#endif
}

#ifndef __MOD_DEVICES__
const NativeInlineDisplayImageSurface* renderInlineDisplay(const uint32_t rwidth, const uint32_t height) override
{


+ 13
- 3
source/native-plugins/bigmeter.cpp View File

@@ -175,16 +175,25 @@ protected:
needsInlineRender = true;
}

if (needsInlineRender && fInlineDisplay.pending != 1)
if (needsInlineRender && fInlineDisplay.pending != 1 && fInlineDisplay.pending != 2)
{
fInlineDisplay.pending = 1;
hostQueueDrawInlineDisplay();
hostRequestIdle();
}
}

// -------------------------------------------------------------------
// Plugin dispatcher calls

void idle() override
{
if (fInlineDisplay.pending == 1)
{
fInlineDisplay.pending = 2;
hostQueueDrawInlineDisplay();
}
}

const NativeInlineDisplayImageSurface* renderInlineDisplay(const uint32_t rwidth, const uint32_t height) override
{
CARLA_SAFE_ASSERT_RETURN(rwidth > 0 && height > 0, nullptr);
@@ -324,7 +333,8 @@ static const NativePluginDescriptor bigmeterDesc = {
/* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
|NATIVE_PLUGIN_HAS_INLINE_DISPLAY
|NATIVE_PLUGIN_HAS_UI),
|NATIVE_PLUGIN_HAS_UI
|NATIVE_PLUGIN_REQUESTS_IDLE),
/* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
/* audioIns */ 2,
/* audioOuts */ 0,


Loading…
Cancel
Save