-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathASImageNode+AnimatedImagePrivate.h
More file actions
49 lines (35 loc) · 1.2 KB
/
ASImageNode+AnimatedImagePrivate.h
File metadata and controls
49 lines (35 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// ASImageNode+AnimatedImagePrivate.h
// Texture
//
// Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
// Changes after 4/13/2017 are: Copyright (c) Pinterest, Inc. All rights reserved.
// Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0
//
#import <AsyncDisplayKit/ASThread.h>
#define ASAnimatedImageDefaultRunLoopMode NSRunLoopCommonModes
@interface ASImageNode ()
{
AS::Mutex _displayLinkLock;
id <ASAnimatedImageProtocol> _animatedImage;
NSString *_animatedImageRunLoopMode;
CADisplayLink *_displayLink;
NSUInteger _lastSuccessfulFrameIndex;
//accessed on main thread only
CFTimeInterval _playHead;
NSUInteger _playedLoops;
// Group the BOOLs into a bitfield struct to save memory.
struct {
unsigned int animatedImagePaused:1;
unsigned int cropEnabled:1; // Defaults to YES.
unsigned int forceUpscaling:1; //Defaults to NO.
} _imageNodeFlags;
}
@property (nonatomic) CFTimeInterval lastDisplayLinkFire;
@end
@interface ASImageNode (AnimatedImagePrivate)
- (void)_locked_setAnimatedImage:(id <ASAnimatedImageProtocol>)animatedImage;
@end
@interface ASImageNode (AnimatedImageInvalidation)
- (void)invalidateAnimatedImage;
@end