summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorSilenio Quarti2012-11-20 15:41:04 (EST)
committer Bogdan Gheorghe2013-01-15 16:14:48 (EST)
commitf5bb561e72c6b498fa2f13f95575b60b1c727038 (patch)
tree8facac3620ccda71a5f35a306c97c352050c365b
parent896c5b2c0985db419b801d0188e80cba446e2756 (diff)
downloadeclipse.platform.swt-f5bb561e72c6b498fa2f13f95575b60b1c727038.zip
eclipse.platform.swt-f5bb561e72c6b498fa2f13f95575b60b1c727038.tar.gz
eclipse.platform.swt-f5bb561e72c6b498fa2f13f95575b60b1c727038.tar.bz2
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.java8
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 2b66916..3f903bc 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 (int /*long*/ 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();
}