mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-28 02:30:05 +00:00
Big rewrite of the LowLevelGraphicsSoftwareRenderer class, adding internal support for complex clipping regions - this will temporarily make font rendering quite slow, until it gets re-optimised for this new design. Changed the Image class to remove the lockPixelData methods, and replaced these with an object Image::BitmapData, which is easier to use.
This commit is contained in:
parent
9fc4b6d822
commit
6fdde63a63
25 changed files with 3542 additions and 4458 deletions
|
|
@ -45,7 +45,9 @@ public:
|
|||
width (0),
|
||||
height (0),
|
||||
activeUsers (0),
|
||||
recordNextFrameTime (false)
|
||||
recordNextFrameTime (false),
|
||||
activeImage (0),
|
||||
loadingImage (0)
|
||||
{
|
||||
HRESULT hr = graphBuilder.CoCreateInstance (CLSID_FilterGraph, CLSCTX_INPROC);
|
||||
if (FAILED (hr))
|
||||
|
|
@ -147,7 +149,9 @@ public:
|
|||
|
||||
~DShowCameraDeviceInteral()
|
||||
{
|
||||
mediaControl->Stop();
|
||||
if (mediaControl != 0)
|
||||
mediaControl->Stop();
|
||||
|
||||
removeGraphFromRot();
|
||||
|
||||
for (int i = viewerComps.size(); --i >= 0;)
|
||||
|
|
@ -190,16 +194,14 @@ public:
|
|||
}
|
||||
|
||||
imageSwapLock.enter();
|
||||
int ls, ps;
|
||||
const int lineStride = width * 3;
|
||||
uint8* const dest = loadingImage->lockPixelDataReadWrite (0, 0, width, height, ls, ps);
|
||||
const Image::BitmapData destData (*loadingImage, 0, 0, width, height, true);
|
||||
|
||||
for (int i = 0; i < height; ++i)
|
||||
memcpy (dest + ls * ((height - 1) - i),
|
||||
memcpy (destData.getLinePointer ((height - 1) - i),
|
||||
buffer + lineStride * i,
|
||||
lineStride);
|
||||
|
||||
loadingImage->releasePixelDataReadWrite (dest);
|
||||
imageNeedsFlipping = true;
|
||||
imageSwapLock.exit();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue