diff options
| author | Silenio Quarti | 2012-11-20 20:41:04 +0000 |
|---|---|---|
| committer | Bogdan Gheorghe | 2013-01-15 21:14:48 +0000 |
| commit | f5bb561e72c6b498fa2f13f95575b60b1c727038 (patch) | |
| tree | 8facac3620ccda71a5f35a306c97c352050c365b | |
| parent | 896c5b2c0985db419b801d0188e80cba446e2756 (diff) | |
| download | eclipse.platform.swt-f5bb561e72c6b498fa2f13f95575b60b1c727038.tar.gz eclipse.platform.swt-f5bb561e72c6b498fa2f13f95575b60b1c727038.tar.xz eclipse.platform.swt-f5bb561e72c6b498fa2f13f95575b60b1c727038.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 2b66916a15..3f903bcfb4 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(); } |
