Browse Source

Small fixes for the software renderer, mac "help" menu, and directshow flags.

tags/2021-05-28
Julian Storer 14 years ago
parent
commit
37aaeca294
7 changed files with 78 additions and 16 deletions
  1. +38
    -7
      juce_amalgamated.cpp
  2. +1
    -1
      juce_amalgamated.h
  3. +1
    -1
      src/core/juce_StandardHeader.h
  4. +10
    -4
      src/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp
  5. +26
    -1
      src/native/mac/juce_mac_MainMenu.mm
  6. +1
    -1
      src/native/windows/juce_win32_DirectShowComponent.cpp
  7. +1
    -1
      src/native/windows/juce_win32_NativeIncludes.h

+ 38
- 7
juce_amalgamated.cpp View File

@@ -633,7 +633,7 @@
#include <dshowasf.h>
#endif

#if JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE
#if JUCE_DIRECTSHOW && JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE
#include <evr.h>
#endif

@@ -88166,11 +88166,17 @@ public:
}
else
{
SoftwareRendererClasses::ClipRegionBase::Ptr c (new SoftwareRendererClasses::ClipRegion_EdgeTable (Rectangle<int> (tx, ty, sourceImage.getWidth(), sourceImage.getHeight()).getIntersection (image.getBounds())));
c = clip->applyClipTo (c);
Rectangle<int> area (tx, ty, sourceImage.getWidth(), sourceImage.getHeight());
area = area.getIntersection (image.getBounds());

if (c != nullptr)
c->renderImageUntransformed (destData, srcData, alpha, tx, ty, false);
if (! area.isEmpty())
{
SoftwareRendererClasses::ClipRegionBase::Ptr c (new SoftwareRendererClasses::ClipRegion_EdgeTable (area));
c = clip->applyClipTo (c);

if (c != nullptr)
c->renderImageUntransformed (destData, srcData, alpha, tx, ty, false);
}
}

return;
@@ -252879,7 +252885,7 @@ void QuickTimeMovieComponent::setBoundsWithCorrectAspectRatio (const Rectangle<i


/*** Start of inlined file: juce_win32_DirectShowComponent.cpp ***/
#if JUCE_INCLUDED_FILE
#if JUCE_INCLUDED_FILE && JUCE_DIRECTSHOW

namespace DirectShowHelpers
{
@@ -283463,10 +283469,16 @@ public:
commandManager->invoke (info, true);
}

currentModel->menuItemSelected (commandId, topLevelIndex);
(new AsyncCommandInvoker (commandId, topLevelIndex))->post();
}
}

void invokeDirectly (const int commandId, const int topLevelIndex)
{
if (currentModel != nullptr)
currentModel->menuItemSelected (commandId, topLevelIndex);
}

void addMenuItem (PopupMenu::MenuItemIterator& iter, NSMenu* menuToAddTo,
const int topLevelMenuId, const int topLevelIndex)
{
@@ -283649,6 +283661,25 @@ private:
private:
JUCE_DECLARE_NON_COPYABLE (AsyncMenuUpdater);
};

class AsyncCommandInvoker : public CallbackMessage
{
public:
AsyncCommandInvoker (const int commandId_, const int topLevelIndex_)
: commandId (commandId_), topLevelIndex (topLevelIndex_)
{}

void messageCallback()
{
if (JuceMainMenuHandler::instance != nullptr)
JuceMainMenuHandler::instance->invokeDirectly (commandId, topLevelIndex);
}

private:
const int commandId, topLevelIndex;

JUCE_DECLARE_NON_COPYABLE (AsyncCommandInvoker);
};
};

JuceMainMenuHandler* JuceMainMenuHandler::instance = nullptr;


+ 1
- 1
juce_amalgamated.h View File

@@ -73,7 +73,7 @@ namespace JuceDummyNamespace {}
*/
#define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 53
#define JUCE_BUILDNUMBER 102
#define JUCE_BUILDNUMBER 103

/** Current Juce version number.



+ 1
- 1
src/core/juce_StandardHeader.h View File

@@ -33,7 +33,7 @@
*/
#define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 53
#define JUCE_BUILDNUMBER 102
#define JUCE_BUILDNUMBER 103
/** Current Juce version number.


+ 10
- 4
src/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp View File

@@ -2144,11 +2144,17 @@ public:
}
else
{
SoftwareRendererClasses::ClipRegionBase::Ptr c (new SoftwareRendererClasses::ClipRegion_EdgeTable (Rectangle<int> (tx, ty, sourceImage.getWidth(), sourceImage.getHeight()).getIntersection (image.getBounds())));
c = clip->applyClipTo (c);
Rectangle<int> area (tx, ty, sourceImage.getWidth(), sourceImage.getHeight());
area = area.getIntersection (image.getBounds());
if (c != nullptr)
c->renderImageUntransformed (destData, srcData, alpha, tx, ty, false);
if (! area.isEmpty())
{
SoftwareRendererClasses::ClipRegionBase::Ptr c (new SoftwareRendererClasses::ClipRegion_EdgeTable (area));
c = clip->applyClipTo (c);
if (c != nullptr)
c->renderImageUntransformed (destData, srcData, alpha, tx, ty, false);
}
}
return;


+ 26
- 1
src/native/mac/juce_mac_MainMenu.mm View File

@@ -184,10 +184,16 @@ public:
commandManager->invoke (info, true);
}
currentModel->menuItemSelected (commandId, topLevelIndex);
(new AsyncCommandInvoker (commandId, topLevelIndex))->post();
}
}
void invokeDirectly (const int commandId, const int topLevelIndex)
{
if (currentModel != nullptr)
currentModel->menuItemSelected (commandId, topLevelIndex);
}
void addMenuItem (PopupMenu::MenuItemIterator& iter, NSMenu* menuToAddTo,
const int topLevelMenuId, const int topLevelIndex)
{
@@ -370,6 +376,25 @@ private:
private:
JUCE_DECLARE_NON_COPYABLE (AsyncMenuUpdater);
};
class AsyncCommandInvoker : public CallbackMessage
{
public:
AsyncCommandInvoker (const int commandId_, const int topLevelIndex_)
: commandId (commandId_), topLevelIndex (topLevelIndex_)
{}
void messageCallback()
{
if (JuceMainMenuHandler::instance != nullptr)
JuceMainMenuHandler::instance->invokeDirectly (commandId, topLevelIndex);
}
private:
const int commandId, topLevelIndex;
JUCE_DECLARE_NON_COPYABLE (AsyncCommandInvoker);
};
};
JuceMainMenuHandler* JuceMainMenuHandler::instance = nullptr;


+ 1
- 1
src/native/windows/juce_win32_DirectShowComponent.cpp View File

@@ -23,7 +23,7 @@
==============================================================================
*/
#if JUCE_INCLUDED_FILE
#if JUCE_INCLUDED_FILE && JUCE_DIRECTSHOW
//======================================================================


+ 1
- 1
src/native/windows/juce_win32_NativeIncludes.h View File

@@ -150,7 +150,7 @@
#include <dshowasf.h>
#endif
#if JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE
#if JUCE_DIRECTSHOW && JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE
#include <evr.h>
#endif


Loading…
Cancel
Save