Skip to content
Snippets Groups Projects
Commit bb0de1fc authored by George Nachman's avatar George Nachman
Browse files

Fix rebase problems

parent 8a2ccf06
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -18,13 +18,11 @@
}
return self;
}
/*
- (void)scrollToPoint:(NSPoint)newOrigin {
[super scrollToPoint:newOrigin];
NSRect frame = _metalView.frame;
frame.origin.y = newOrigin.y;
_metalView.frame = frame;
[_metalView setNeedsDisplay:YES];
}
*/
@end
 
Loading
Loading
@@ -20,7 +20,7 @@ extern NSString *const kEncodedColorDictionaryColorSpace; // Optional, defaults
extern NSString *const kEncodedColorDictionarySRGBColorSpace;
extern NSString *const kEncodedColorDictionaryCalibratedColorSpace;
 
static float SIMDPerceivedBrightness(vector_float4 x) {
static inline float SIMDPerceivedBrightness(vector_float4 x) {
static const vector_float4 y = (vector_float4){ 0.30, 0.59, 0.11, 0 };
return simd_dot(x, y);
}
Loading
Loading
Loading
Loading
@@ -6867,6 +6867,13 @@ ITERM_WEAKLY_REFERENCEABLE
}
}
 
- (void)textViewNeedsDisplayInRect:(NSRect)rect {
if (@available(macOS 10.11, *)) {
NSRect visibleRect = NSIntersectionRect(rect, _textview.enclosingScrollView.documentVisibleRect);
[_view setMetalViewNeedsDisplayInTextViewRect:visibleRect];
}
}
- (void)bury {
[_textview setDataSource:nil];
[_textview setDelegate:nil];
Loading
Loading
Loading
Loading
@@ -192,6 +192,7 @@ typedef NS_ENUM(NSInteger, PTYTextViewSelectionExtensionUnit) {
- (VT100GridCoord)textViewCopyModeCursorCoord;
- (BOOL)textViewPasswordInput;
- (void)textViewDidSelectRangeForFindOnPage:(VT100GridCoordRange)range;
- (void)textViewNeedsDisplayInRect:(NSRect)rect;
- (void)textViewDidSelectPasswordPrompt;
 
@end
Loading
Loading
Loading
Loading
@@ -135,6 +135,8 @@
+ (NSDate*)lastResizeDate;
+ (void)windowDidResize;
 
- (void)setMetalViewNeedsDisplayInTextViewRect:(NSRect)textViewRect NS_AVAILABLE_MAC(10_11);
- (void)setDimmed:(BOOL)isDimmed;
- (FindViewController*)findViewController;
- (void)setBackgroundDimmed:(BOOL)backgroundDimmed;
Loading
Loading
Loading
Loading
@@ -136,6 +136,8 @@ static NSDate* lastResizeDate_;
_metalView = [[MTKView alloc] initWithFrame:_scrollview.contentView.frame
device:MTLCreateSystemDefaultDevice()];
[self addSubview:_metalView];
_metalView.paused = YES;
_metalView.enableSetNeedsDisplay = YES;
_driver = [[iTermMetalDriver alloc] initWithMetalKitView:_metalView];
[_driver mtkView:_metalView drawableSizeWillChange:_metalView.drawableSize];
_metalView.delegate = _driver;
Loading
Loading
@@ -174,6 +176,11 @@ static NSDate* lastResizeDate_;
[super dealloc];
}
 
- (void)setMetalViewNeedsDisplayInTextViewRect:(NSRect)textViewRect NS_AVAILABLE_MAC(10_11) {
#warning TODO: Would be nice to only draw the part that needs to be drawn.
[_metalView setNeedsDisplay:YES];
}
- (void)setUseSubviewWithLayer:(BOOL)useSubviewWithLayer {
if (useSubviewWithLayer == _useSubviewWithLayer) {
return;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment