mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Video editing preview
This commit is contained in:
@@ -77,7 +77,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (GPUImageFramebuffer *)fetchFramebufferForSize:(CGSize)framebufferSize textureOptions:(GPUTextureOptions)textureOptions onlyTexture:(BOOL)onlyTexture
|
||||
- (GPUImageFramebuffer *)fetchFramebufferForSize:(CGSize)framebufferSize textureOptions:(GPUTextureOptions)textureOptions onlyTexture:(BOOL)onlyTexture {
|
||||
return [self fetchFramebufferForSize:framebufferSize textureOptions:textureOptions onlyTexture:onlyTexture mark:false];
|
||||
}
|
||||
|
||||
- (GPUImageFramebuffer *)fetchFramebufferForSize:(CGSize)framebufferSize textureOptions:(GPUTextureOptions)textureOptions onlyTexture:(BOOL)onlyTexture mark:(BOOL)mark
|
||||
{
|
||||
__block GPUImageFramebuffer *framebufferFromCache = nil;
|
||||
// dispatch_sync(framebufferCacheQueue, ^{
|
||||
@@ -90,6 +94,7 @@
|
||||
{
|
||||
// Nothing in the cache, create a new framebuffer to use
|
||||
framebufferFromCache = [[GPUImageFramebuffer alloc] initWithSize:framebufferSize textureOptions:textureOptions onlyTexture:onlyTexture];
|
||||
framebufferFromCache.mark = mark;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -115,6 +120,7 @@
|
||||
if (framebufferFromCache == nil)
|
||||
{
|
||||
framebufferFromCache = [[GPUImageFramebuffer alloc] initWithSize:framebufferSize textureOptions:textureOptions onlyTexture:onlyTexture];
|
||||
framebufferFromCache.mark = mark;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -142,7 +148,7 @@
|
||||
[framebuffer clearAllLocks];
|
||||
|
||||
// dispatch_async(framebufferCacheQueue, ^{
|
||||
runAsynchronouslyOnVideoProcessingQueue(^{
|
||||
runAsynchronouslyOnVideoProcessingQueue(^{
|
||||
CGSize framebufferSize = framebuffer.size;
|
||||
GPUTextureOptions framebufferTextureOptions = framebuffer.textureOptions;
|
||||
NSString *lookupHash = [self hashForSize:framebufferSize textureOptions:framebufferTextureOptions onlyTexture:framebuffer.missingFramebuffer];
|
||||
|
||||
Reference in New Issue
Block a user