1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
Commit graph

22 commits

Author SHA1 Message Date
reuk
5bb20e8e04
Direct2DImage: Flush CPU-only changes if necessary when copying images 2025-06-30 20:04:56 +01:00
reuk
72e345cdd7
Direct2DImage: Add missing data change notification when creating writable BitmapData
The OpenGL renderer listens for imageDataChanged() to invalidated cached
textures.

Before this change, the SimpleFFTDemo would display a static (outdated)
image on Windows when using the OpenGLRenderer.
2025-05-27 18:01:53 +01:00
reuk
415aed4bea
Direct2DImage: Sync CPU storage when creating a BitmapData view over a subsection of the image
When syncing from CPU->GPU storage, we currently copy the entire image
contents. The contents of the CPU backup completely replace the old GPU
image. Therefore, if any pixels need to retain their existing values, we
need to read those pixels before overwriting them. This in turn implies
that, when a BitmapData refers to a subsection of the image, we should
always flush GPU->CPU storage first, so that the subsequent CPU->GPU
sync doesn't clobber pixels outside of the BitmapData region with
outdated values.

It's clear that copying the entire image back and forth could be
suboptimal when writing to image subsections, but to optimise this
process we'd have to keep track of dirty image regions or similar, which
may in turn pessimise more common cases.
2025-05-27 18:01:53 +01:00
reuk
4012677fdf
Direct2DImage: Mark CPU storage as outdated after modifying GPU storage by copying 2025-05-27 18:01:53 +01:00
Oli
250abe9cf4 LowLevelGraphicsContext: Add preferred image type for temporary images
Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
2025-04-24 13:58:23 +01:00
Oli
bf940ae42a Direct2D: Do image cloning on GPU when possible
Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
2025-04-24 13:58:23 +01:00
Oli
ae784a941e Direct2D: Implement moveValidatedImageSection
Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
2025-04-24 13:58:23 +01:00
reuk
d3ca5961e7
Direct2D: Use Image NativeExtensions to avoid dynamic casts in graphics context 2025-01-23 12:21:33 +00:00
reuk
55e5e2082c
Image: Add new backup-extensions interface to support images with no main-memory backup 2025-01-23 12:21:33 +00:00
reuk
ada2c88b03
ImagePixelData: Update signatures of functions providing whole-image effects 2025-01-23 12:21:33 +00:00
reuk
336dcfc08c Direct2DImage: Update interface to accept a Device instead of a DeviceContext 2024-12-13 14:43:06 +00:00
reuk
dcca72484f Image: Update return type of getPixelData to avoid dangling pointers 2024-12-13 14:42:26 +00:00
reuk
67fa9b11cd
Direct2D: Add an assertion to warn when multiple Graphics instances are active on the same image 2024-09-18 15:44:04 +01:00
reuk
589d9940ed
Direct2D: Add support for bitmaps spanning multiple texture pages 2024-09-18 15:44:04 +01:00
reuk
109ec550b9
Direct2D: Fix typo in tests
This typo caused the Graphics tests to fail when the random seed was
0xb14c264a426e6987.
2024-09-05 12:14:03 +01:00
reuk
6cd018a679
Direct2D: Fix implementation of Direct2DPixelData::fromDirect2DBitmap
Previously, this function didn't store/copy the provided bitmap, so the
resulting image was blank. This also broke createSnapshot(), which would
always return a blank image.
2024-08-22 18:18:17 +01:00
reuk
d344c2bf71
Direct2D: Allow drawing to arbitrary bitmaps using Direct2DImageContext
This change also moves the startFrame and endFrame calls out of the
plain Direct2DImageContext and into a special-purpose "flushing" context
that is private to Direct2DPixelData.
2024-08-22 18:18:15 +01:00
reuk
8bbcfe4d6b
Direct2D: Move DeviceContext helpers to shared DirectX header 2024-08-22 18:18:14 +01:00
reuk
e67e78803c
Direct2D: Tidy up implementation of createBitmap and remove lineStride parameter
The lineStride parameter is only required to be set when the 'data'
pointer is also set.
2024-07-04 13:03:34 +01:00
Matt Gonzalez
dfa94981e4 D2D: Pass the clearImage flag to the BitmapData backup image
https://forum.juce.com/t/the-juce-8-preview-branch-is-available-now/60950/123
2024-05-10 11:55:28 +01:00
reuk
590e22f320
D2D: Add faster two-pass blur implementation 2024-04-29 16:08:24 +01:00
reuk
19061e6d17
Direct2D: Add initial support 2024-04-18 14:16:02 +01:00