+1 weāre also hitting this jassert frequently after updating to JUCE8.
Interestingly the layerParameters struct contains bogus information (for example the bounds are set to values +/- 1e38 so something doesnāt seem quite right in the D2D implementation.
Also the components drawn (which are not opaque, and a child component of a component that has āsetBufferedtoImage(true)ā are not drawn correctly. Removing the image buffering from the parent resolves the drawing issue but doesnāt resolve triggering the assert.
Quick update: seems we got hit with the D2D assert:
as well as this issue related to buffered images:
I can confirm that with the latest fixes on develop, the issues around not erasing background for non-opaque Components on another Component that as image buffering enabled have gone, but the assert issue still remainsā¦
Iām unsure what you were testing, but the assertion remains.
Iām a bit surprised itās still an issue. Itās purely a performance improvement opportunity and should NOT be customer (us) facing.
Using a rectangular clip-path is completely acceptable and should never trigger any assertions. Itās fully functional, but could be achieved with a faster D2D method. Thatās all that assertion does. It tells the JUCE developers (so not us) that it could be faster if it used another method to create the clip. Instead of a path, it could use a rectangle. Since the path represents a rectangle, the driver detects that and outputs a warning.
Now the JUCE team put an assertion in to test for this case, but instead of only triggering it when they want to know (JUCE_DIRECT2D_METRICS) they trigger it always, which makes it impossible to run a debug version of our products.
If the graphics context had a simple reduceClipRegion ( juce::Rectangle<float> ) method, this could all be avoided, but as it stands the only way to get a float-rectangle as a clipRegion is to create a path, add the rectangle, and use the reduceClipRegion ( juce::Path ) version.
Tested it again - and yes it does indeed still show up. Not sure why it didnāt previously. Iāve updated my earlier post⦠At least the issue around image drawing for buffered parents is gone.
Thanks for your patience, all. Weāve removed the assertion on the develop branch:
On balance, the assertion was most useful for JUCE maintainers, and we can reinstate similar functionality by switching the D2D debug layer into āinformationā mode.
Could we get a reduceClipRegion ( juce::Rectangle<float> ) to get better performance and better readability of our code? Then we donāt need to create a path object, add a rect to it, etc. and you can avoid the checks.