Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
2af6cd26 by Claudio Cambra at 2024-11-21T18:39:16+00:00
macosx: Initialise itemImages set with set correctly, not with an array
Signed-off-by: Claudio Cambra <[email protected]>
- - - - -
bfd6ba9e by Claudio Cambra at 2024-11-21T18:39:16+00:00
macosx: Correctly pass an array of item images into frames and compositing
methods
Signed-off-by: Claudio Cambra <[email protected]>
- - - - -
1 changed file:
- modules/gui/macosx/library/VLCLibraryImageCache.m
Changes:
=====================================
modules/gui/macosx/library/VLCLibraryImageCache.m
=====================================
@@ -176,7 +176,7 @@ const NSUInteger
kVLCCompositeImageDefaultCompositedGridItemCount = 4;
![libraryItem isKindOfClass:VLCMediaLibraryMediaItem.class]) {
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE,
0), ^{
- NSMutableSet<NSImage *> * const itemImages = NSMutableArray.array;
+ NSMutableSet<NSImage *> * const itemImages = NSMutableSet.set;
[libraryItem iterateMediaItemsWithBlock:^(VLCMediaLibraryMediaItem
* const item) {
NSImage * const itemImage = [VLCLibraryImageCache
thumbnailForLibraryItem:item];
@@ -187,10 +187,11 @@ const NSUInteger
kVLCCompositeImageDefaultCompositedGridItemCount = 4;
}];
const NSSize size = NSMakeSize(kVLCDesiredThumbnailWidth,
kVLCDesiredThumbnailHeight);
+ NSArray<NSImage *> * const itemImagesArray = itemImages.allObjects;
NSArray<NSValue *> * const frames =
- [NSImage
framesForCompositeImageSquareGridWithImages:itemImages size:size
gridItemCount:kVLCCompositeImageDefaultCompositedGridItemCount];
+ [NSImage
framesForCompositeImageSquareGridWithImages:itemImagesArray size:size
gridItemCount:kVLCCompositeImageDefaultCompositedGridItemCount];
NSImage * const compositeImage =
- [NSImage compositeImageWithImages:itemImages frames:frames
size:size];
+ [NSImage compositeImageWithImages:itemImagesArray
frames:frames size:size];
dispatch_async(dispatch_get_main_queue(), ^{
completionHandler(compositeImage);
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/compare/7da85115834a760812fa9a17e75ee579ba07fc89...bfd6ba9ec90c71aa3f8f307a9c703079a39aa2cc
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/compare/7da85115834a760812fa9a17e75ee579ba07fc89...bfd6ba9ec90c71aa3f8f307a9c703079a39aa2cc
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits