diff options
author | Silenio Quarti | 2012-11-20 20:41:04 +0000 |
---|---|---|
committer | Silenio Quarti | 2012-11-20 20:41:04 +0000 |
commit | 38754f9669d64b603149eb0693559a15dd50c6b7 (patch) | |
tree | 8ec37df26dafe873a06aa8a3fabf8be7002e0a5c | |
parent | 89b5f4500222e33648e01e47d68897bffeb1aa77 (diff) | |
download | eclipse.platform.swt-38754f9669d64b603149eb0693559a15dd50c6b7.tar.gz eclipse.platform.swt-38754f9669d64b603149eb0693559a15dd50c6b7.tar.xz eclipse.platform.swt-38754f9669d64b603149eb0693559a15dd50c6b7.zip |
Bug 339132 - [10.8][Cocoa] GEF Thumbnail sync view broken in 3.7
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java index 874af76699..f4d0a9a1b0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java @@ -1172,6 +1172,14 @@ public void internal_dispose_GC (long /*int*/ hDC, GCData data) { if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init(); try { if (context != 0) { + /* + * Bug in cocoa. For some reason, there cases when the image pixels + * are not transfered from the underlining CGImage into the bitmap + * representation. This only happens when bitmapData() is called. + */ + NSBitmapImageRep imageRep = getRepresentation(); + imageRep.bitmapData(); + NSGraphicsContext contextObj = new NSGraphicsContext(context); contextObj.release(); } |