mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-02 03:20:06 +00:00
Major change to the way the Image class works, making it use value semantics and internally shared data (see the forum notes for more info on this). Also minor changes to win32 browser plugin object ref counting and linux millisecond timers.
This commit is contained in:
parent
1baaa016bd
commit
24673283eb
121 changed files with 2763 additions and 2930 deletions
|
|
@ -45,9 +45,7 @@ public:
|
|||
width (0),
|
||||
height (0),
|
||||
activeUsers (0),
|
||||
recordNextFrameTime (false),
|
||||
activeImage (0),
|
||||
loadingImage (0)
|
||||
recordNextFrameTime (false)
|
||||
{
|
||||
HRESULT hr = graphBuilder.CoCreateInstance (CLSID_FilterGraph);
|
||||
if (FAILED (hr))
|
||||
|
|
@ -137,8 +135,8 @@ public:
|
|||
if (connectFilters (sampleGrabberBase, nullFilter)
|
||||
&& addGraphToRot())
|
||||
{
|
||||
activeImage = new Image (Image::RGB, width, height, true);
|
||||
loadingImage = new Image (Image::RGB, width, height, true);
|
||||
activeImage = Image (Image::RGB, width, height, true);
|
||||
loadingImage = Image (Image::RGB, width, height, true);
|
||||
|
||||
ok = true;
|
||||
}
|
||||
|
|
@ -164,9 +162,6 @@ public:
|
|||
smartTeePreviewOutputPin = 0;
|
||||
smartTeeCaptureOutputPin = 0;
|
||||
asfWriter = 0;
|
||||
|
||||
delete activeImage;
|
||||
delete loadingImage;
|
||||
}
|
||||
|
||||
void addUser()
|
||||
|
|
@ -211,7 +206,7 @@ public:
|
|||
const ScopedLock sl (imageSwapLock);
|
||||
|
||||
{
|
||||
const Image::BitmapData destData (*loadingImage, 0, 0, width, height, true);
|
||||
const Image::BitmapData destData (loadingImage, 0, 0, width, height, true);
|
||||
|
||||
for (int i = 0; i < height; ++i)
|
||||
memcpy (destData.getLinePointer ((height - 1) - i),
|
||||
|
|
@ -223,7 +218,7 @@ public:
|
|||
}
|
||||
|
||||
if (listeners.size() > 0)
|
||||
callListeners (*loadingImage);
|
||||
callListeners (loadingImage);
|
||||
|
||||
sendChangeMessage (this);
|
||||
}
|
||||
|
|
@ -362,7 +357,7 @@ public:
|
|||
removeUser();
|
||||
}
|
||||
|
||||
void callListeners (Image& image)
|
||||
void callListeners (const Image& image)
|
||||
{
|
||||
const ScopedLock sl (listenerLock);
|
||||
|
||||
|
|
@ -450,8 +445,8 @@ private:
|
|||
|
||||
CriticalSection imageSwapLock;
|
||||
bool imageNeedsFlipping;
|
||||
Image* loadingImage;
|
||||
Image* activeImage;
|
||||
Image loadingImage;
|
||||
Image activeImage;
|
||||
|
||||
bool recordNextFrameTime;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue