mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Component: Use Context appropriate ImageType for temporary images
Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
This commit is contained in:
parent
250abe9cf4
commit
4ba01a80a0
3 changed files with 16 additions and 6 deletions
|
|
@ -50,11 +50,13 @@ struct StandardCachedComponentImage : public CachedComponentImage
|
|||
|
||||
if (image.isNull() || image.getBounds() != imageBounds)
|
||||
{
|
||||
auto tempImageType = g.getInternalContext().getPreferredImageTypeForTemporaryImages();
|
||||
image = Image (owner.isOpaque() ? Image::RGB
|
||||
: Image::ARGB,
|
||||
jmax (1, imageBounds.getWidth()),
|
||||
jmax (1, imageBounds.getHeight()),
|
||||
! owner.isOpaque());
|
||||
! owner.isOpaque(),
|
||||
*tempImageType);
|
||||
image.setBackupEnabled (false);
|
||||
validArea.clear();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue