From a0cbc5822e8ac410542aafb129f6f72eb3fcbe3a Mon Sep 17 00:00:00 2001 From: daboe01 Date: Mon, 21 Dec 2015 20:17:51 +0100 Subject: [PATCH] speedup for chrome --- AppKit/CPTextView/CPTextView.j | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index 83b93a30a..9e99659a7 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -619,6 +619,16 @@ var kDelegateRespondsTo_textShouldBeginEditing [_caret setVisibility:flag stop:NO]; } +// remove unnecessary call to CGContextClearRect from CPView implementation +- (void)displayRectIgnoringOpacity:(CGRect)aRect inContext:(CPGraphicsContext)aGraphicsContext +{ if ([self isHidden]) + return; + + [self lockFocus]; + + [self drawRect:aRect]; + [self unlockFocus]; +} - (void)drawRect:(CGRect)aRect {