summaryrefslogtreecommitdiff
path: root/cocoa/thumbnail.m
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-06-30 15:48:07 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-06-30 15:48:07 +0000
commiteddae6af0663243a2677674d501f9a87d55798f5 (patch)
tree08562171f870a6b592d624adfbfd0d6fa11fcdcb /cocoa/thumbnail.m
parenta5dc6b9e6637c85d18510ac6446ee4a8a7955e7b (diff)
downloadnetsurf-eddae6af0663243a2677674d501f9a87d55798f5.tar.gz
netsurf-eddae6af0663243a2677674d501f9a87d55798f5.tar.bz2
Remove plotter table global. Pass a redraw context around redraw functions. Knockout could be handled better. Note: untested on most front ends.
svn path=/trunk/netsurf/; revision=12543
Diffstat (limited to 'cocoa/thumbnail.m')
-rw-r--r--cocoa/thumbnail.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/cocoa/thumbnail.m b/cocoa/thumbnail.m
index 01239b9ec..16c944d7d 100644
--- a/cocoa/thumbnail.m
+++ b/cocoa/thumbnail.m
@@ -30,6 +30,12 @@ bool thumbnail_create(struct hlcache_handle *content, struct bitmap *bitmap,
{
int bwidth = bitmap_get_width( bitmap );
int bheight = bitmap_get_height( bitmap );
+
+ struct redraw_context ctx = {
+ .interactive = false,
+ .plot = &cocoa_plotters
+ };
+
CGColorSpaceRef cspace = CGColorSpaceCreateWithName( kCGColorSpaceGenericRGB );
CGContextRef bitmapContext = CGBitmapContextCreate( bitmap_get_buffer( bitmap ),
bwidth, bheight,
@@ -46,7 +52,7 @@ bool thumbnail_create(struct hlcache_handle *content, struct bitmap *bitmap,
[NSGraphicsContext setCurrentContext: [NSGraphicsContext graphicsContextWithGraphicsPort: bitmapContext flipped: YES]];
- thumbnail_redraw( content, width, height );
+ thumbnail_redraw( content, width, height, &ctx );
[NSGraphicsContext setCurrentContext: nil];
CGContextRelease( bitmapContext );