summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorSilenio Quarti2012-11-20 15:41:04 (EST)
committer Bogdan Gheorghe2013-01-15 12:13:53 (EST)
commit1aabc0616b7dd8b42f031df74e2a774173dc9526 (patch)
treef508810d89a68636501910e5415eb516ab75f6a6
parent247d3f279d1df6e7c49ef72b84d2ba992ad9d951 (diff)
downloadeclipse.platform.swt-1aabc0616b7dd8b42f031df74e2a774173dc9526.zip
eclipse.platform.swt-1aabc0616b7dd8b42f031df74e2a774173dc9526.tar.gz
eclipse.platform.swt-1aabc0616b7dd8b42f031df74e2a774173dc9526.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();
}