diff options
| author | Silenio Quarti | 2012-11-20 20:41:04 +0000 |
|---|---|---|
| committer | Bogdan Gheorghe | 2013-01-15 17:13:53 +0000 |
| commit | 1aabc0616b7dd8b42f031df74e2a774173dc9526 (patch) | |
| tree | f508810d89a68636501910e5415eb516ab75f6a6 | |
| parent | 247d3f279d1df6e7c49ef72b84d2ba992ad9d951 (diff) | |
| download | eclipse.platform.swt-1aabc0616b7dd8b42f031df74e2a774173dc9526.tar.gz eclipse.platform.swt-1aabc0616b7dd8b42f031df74e2a774173dc9526.tar.xz eclipse.platform.swt-1aabc0616b7dd8b42f031df74e2a774173dc9526.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(); } |
