[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:30:24 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 285f059ca1d04ca4714374106d8d11d96b6282be
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Aug 8 20:46:00 2002 +0000
Added flag to turn on/off buffered text drawing to help
determine if we get any speed boost. Run from console
with "-BufferTextDrawing YES" to enable buffered text
drawing.
Moved buffered text drawing out of web core.
* WebCoreSupport.subproj/WebTextRenderer.h:
* WebCoreSupport.subproj/WebTextRenderer.m:
(+[WebTextRenderer shouldBufferTextDrawing]):
(+[WebTextRenderer initialize]):
(-[WebTextRenderer drawGlyphs:numGlyphs:fromGlyphPosition:toGlyphPosition:atPoint:withTextColor:backgroundColor:]):
* WebCoreSupport.subproj/WebTextRendererFactory.h:
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView drawRect:]):
Move stuff out of core into kit.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge drawRect:withPainter:]):
* kwq/WebCoreTextRendererFactory.h:
* kwq/WebCoreTextRendererFactory.m:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 18e43ac..a9ed3ef 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-08-08 Richard Williamson (Local) <rjw at apple.com>
+
+ Move stuff out of core into kit.
+
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge drawRect:withPainter:]):
+ * kwq/WebCoreTextRendererFactory.h:
+ * kwq/WebCoreTextRendererFactory.m:
+
2002-08-08 Darin Adler <darin at apple.com>
- fixed 3019353 -- Japanese (Autodetect) encoding not properly supported
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 18e43ac..a9ed3ef 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,12 @@
+2002-08-08 Richard Williamson (Local) <rjw at apple.com>
+
+ Move stuff out of core into kit.
+
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge drawRect:withPainter:]):
+ * kwq/WebCoreTextRendererFactory.h:
+ * kwq/WebCoreTextRendererFactory.m:
+
2002-08-08 Darin Adler <darin at apple.com>
- fixed 3019353 -- Japanese (Autodetect) encoding not properly supported
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 18e43ac..a9ed3ef 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,12 @@
+2002-08-08 Richard Williamson (Local) <rjw at apple.com>
+
+ Move stuff out of core into kit.
+
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge drawRect:withPainter:]):
+ * kwq/WebCoreTextRendererFactory.h:
+ * kwq/WebCoreTextRendererFactory.m:
+
2002-08-08 Darin Adler <darin at apple.com>
- fixed 3019353 -- Japanese (Autodetect) encoding not properly supported
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index ac77161..766eae3 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -193,18 +193,9 @@ using khtml::RenderPart;
[NSBezierPath fillRect:[part->impl->getView()->getView() visibleRect]];
#endif
-#ifdef DRAW_FAST_TEXT
- NSView *focusView = [NSView focusView];
- if (focusView)
- [[WebCoreTextRendererFactory sharedFactory] startCoalesceTextDrawing];
-#endif
if (renderer) {
renderer->print(p, (int)rect.origin.x, (int)rect.origin.y, (int)rect.size.width, (int)rect.size.height, 0, 0);
}
-#ifdef DRAW_FAST_TEXT
- if (focusView)
- [[WebCoreTextRendererFactory sharedFactory] endCoalesceTextDrawing];
-#endif
}
- (void)drawRect:(NSRect)rect
diff --git a/WebCore/kwq/WebCoreTextRendererFactory.h b/WebCore/kwq/WebCoreTextRendererFactory.h
index f649386..1e883c4 100644
--- a/WebCore/kwq/WebCoreTextRendererFactory.h
+++ b/WebCore/kwq/WebCoreTextRendererFactory.h
@@ -31,10 +31,6 @@
{
}
-- (void)startCoalesceTextDrawing;
-- (void)endCoalesceTextDrawing;
-
-
+ (WebCoreTextRendererFactory *)sharedFactory;
- (id <WebCoreTextRenderer>)rendererWithFamily:(NSString *)family traits:(NSFontTraitMask)traits size:(float)size;
- (NSFont *)fontWithFamily:(NSString *)family traits:(NSFontTraitMask)traits size:(float)size;
diff --git a/WebCore/kwq/WebCoreTextRendererFactory.m b/WebCore/kwq/WebCoreTextRendererFactory.m
index 62ecf6d..6235f38 100644
--- a/WebCore/kwq/WebCoreTextRendererFactory.m
+++ b/WebCore/kwq/WebCoreTextRendererFactory.m
@@ -35,17 +35,6 @@ static WebCoreTextRendererFactory *sharedFactory;
return sharedFactory;
}
-- (void)endCoalesceTextDrawing
-{
- // Implemented in subclass.
-}
-
-- (void)startCoalesceTextDrawing
-{
- // Implemented in subclass.
-}
-
-
- init
{
diff --git a/WebCore/kwq/WebCoreTextRendererFactory.mm b/WebCore/kwq/WebCoreTextRendererFactory.mm
index 62ecf6d..6235f38 100644
--- a/WebCore/kwq/WebCoreTextRendererFactory.mm
+++ b/WebCore/kwq/WebCoreTextRendererFactory.mm
@@ -35,17 +35,6 @@ static WebCoreTextRendererFactory *sharedFactory;
return sharedFactory;
}
-- (void)endCoalesceTextDrawing
-{
- // Implemented in subclass.
-}
-
-- (void)startCoalesceTextDrawing
-{
- // Implemented in subclass.
-}
-
-
- init
{
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 5f63f26..2ba0d3a 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,21 @@
+2002-08-08 Richard Williamson (Local) <rjw at apple.com>
+
+ Added flag to turn on/off buffered text drawing to help
+ determine if we get any speed boost. Run from console
+ with "-BufferTextDrawing YES" to enable buffered text
+ drawing.
+
+ Moved buffered text drawing out of web core.
+
+ * WebCoreSupport.subproj/WebTextRenderer.h:
+ * WebCoreSupport.subproj/WebTextRenderer.m:
+ (+[WebTextRenderer shouldBufferTextDrawing]):
+ (+[WebTextRenderer initialize]):
+ (-[WebTextRenderer drawGlyphs:numGlyphs:fromGlyphPosition:toGlyphPosition:atPoint:withTextColor:backgroundColor:]):
+ * WebCoreSupport.subproj/WebTextRendererFactory.h:
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView drawRect:]):
+
2002-08-08 Darin Adler <darin at apple.com>
Placeholders for the "drawing observer" method that I'll be using
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 5f63f26..2ba0d3a 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,21 @@
+2002-08-08 Richard Williamson (Local) <rjw at apple.com>
+
+ Added flag to turn on/off buffered text drawing to help
+ determine if we get any speed boost. Run from console
+ with "-BufferTextDrawing YES" to enable buffered text
+ drawing.
+
+ Moved buffered text drawing out of web core.
+
+ * WebCoreSupport.subproj/WebTextRenderer.h:
+ * WebCoreSupport.subproj/WebTextRenderer.m:
+ (+[WebTextRenderer shouldBufferTextDrawing]):
+ (+[WebTextRenderer initialize]):
+ (-[WebTextRenderer drawGlyphs:numGlyphs:fromGlyphPosition:toGlyphPosition:atPoint:withTextColor:backgroundColor:]):
+ * WebCoreSupport.subproj/WebTextRendererFactory.h:
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView drawRect:]):
+
2002-08-08 Darin Adler <darin at apple.com>
Placeholders for the "drawing observer" method that I'll be using
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.h b/WebKit/WebCoreSupport.subproj/WebTextRenderer.h
index a9baac2..f31a46d 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.h
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.h
@@ -26,6 +26,8 @@ typedef struct GlyphMap GlyphMap;
WidthMap *glyphToWidthMap;
}
++ (BOOL)shouldBufferTextDrawing;
+
- initWithFont:(NSFont *)font;
// Set applyRounding = NO to get an Cocoa equivalent width.
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index e5fba7b..0fe70b1 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -207,9 +207,17 @@ static unsigned int findLengthOfCharacterCluster(const UniChar *characters, unsi
@implementation WebTextRenderer
+static BOOL bufferTextDrawing = NO;
+
++ (BOOL)shouldBufferTextDrawing
+{
+ return bufferTextDrawing;
+}
+
+ (void)initialize
{
nonBaseChars = CFCharacterSetGetPredefined(kCFCharacterSetNonBase);
+ bufferTextDrawing = [[[NSUserDefaults standardUserDefaults] stringForKey:@"BufferTextDrawing"] isEqual: @"YES"];
}
@@ -454,14 +462,12 @@ static unsigned int findLengthOfCharacterCluster(const UniChar *characters, unsi
// Finally, draw the glyphs.
if (from < (int)numGlyphs){
-#ifdef DRAW_FAST_TEXT
- if ([[WebTextRendererFactory sharedFactory] coalesceTextDrawing]){
+ if ([WebTextRenderer shouldBufferTextDrawing] && [[WebTextRendererFactory sharedFactory] coalesceTextDrawing]){
// Add buffered glyphs and advances
WebGlyphBuffer *glyphBuffer = [[WebTextRendererFactory sharedFactory] glyphBufferForFont: font andColor: textColor];
[glyphBuffer addGlyphs: &glyphs[from] advances: &advances[from] count: to - from at: startX : point.y];
}
else {
-#endif
cgContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
// Setup the color and font.
[textColor set];
@@ -469,9 +475,7 @@ static unsigned int findLengthOfCharacterCluster(const UniChar *characters, unsi
CGContextSetTextPosition (cgContext, startX, point.y);
CGContextShowGlyphsWithAdvances (cgContext, &glyphs[from], &advances[from], to - from);
-#ifdef DRAW_FAST_TEXT
}
-#endif
}
if (advances != localAdvanceBuffer) {
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRendererFactory.h b/WebKit/WebCoreSupport.subproj/WebTextRendererFactory.h
index b371583..3eeda28 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRendererFactory.h
+++ b/WebKit/WebCoreSupport.subproj/WebTextRendererFactory.h
@@ -23,6 +23,9 @@
- (WebTextRenderer *)rendererWithFont:(NSFont *)font;
- (BOOL)coalesceTextDrawing;
+- (void)endCoalesceTextDrawing;
+- (void)startCoalesceTextDrawing;
+
- (WebGlyphBuffer *)glyphBufferForFont: (NSFont *)font andColor: (NSColor *)color;
@end
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 921a8e5..fd55069 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -1,21 +1,23 @@
/*
WebHTMLView.mm
- Copyright 2002, Apple, Inc. All rights reserved.
+ Copyright 2002, Apple, Inc. All rights reserved.
*/
#import <WebKit/WebHTMLView.h>
-#import <WebKit/WebDynamicScrollBarsView.h>
-#import <WebKit/WebException.h>
-#import <WebKit/WebHTMLViewPrivate.h>
-#import <WebKit/WebNSViewExtras.h>
+#import <WebKit/WebBridge.h>
#import <WebKit/WebController.h>
#import <WebKit/WebControllerPrivate.h>
-#import <WebKit/WebBridge.h>
#import <WebKit/WebDataSourcePrivate.h>
+#import <WebKit/WebDynamicScrollBarsView.h>
+#import <WebKit/WebException.h>
#import <WebKit/WebFrame.h>
-#import <WebKit/WebViewPrivate.h>
+#import <WebKit/WebHTMLViewPrivate.h>
#import <WebKit/WebKitDebug.h>
+#import <WebKit/WebNSViewExtras.h>
+#import <WebKit/WebTextRenderer.h>
+#import <WebKit/WebTextRendererFactory.h>
+#import <WebKit/WebViewPrivate.h>
// Needed for the mouse moved notification.
#import <AppKit/NSResponder_Private.h>
@@ -358,10 +360,17 @@
double start = CFAbsoluteTimeGetCurrent();
#endif
+ NSView *focusView = [NSView focusView];
+ if ([WebTextRenderer shouldBufferTextDrawing] && focusView)
+ [[WebTextRendererFactory sharedFactory] startCoalesceTextDrawing];
+
//double start = CFAbsoluteTimeGetCurrent();
[[self _bridge] drawRect:rect];
//WebKitDebugAtLevel (WEBKIT_LOG_TIMING, "draw time %e\n", CFAbsoluteTimeGetCurrent() - start);
+ if ([WebTextRenderer shouldBufferTextDrawing] && focusView)
+ [[WebTextRendererFactory sharedFactory] endCoalesceTextDrawing];
+
#ifdef DEBUG_LAYOUT
NSRect vframe = [self frame];
[[NSColor blackColor] set];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list