Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-06-29 20:06:01 +0000
committerAlexander Kurtakov2017-06-29 20:07:14 +0000
commit08288f4979848e095085aa4fdd3d826f9124fe97 (patch)
tree08c9b0967e79db2526c9e7112e232eac0341776e /bundles/org.eclipse.swt/Eclipse SWT Printing
parente822f9099b3e2072ae16f085fb77ea00d61117fa (diff)
downloadeclipse.platform.swt-08288f4979848e095085aa4fdd3d826f9124fe97.tar.gz
eclipse.platform.swt-08288f4979848e095085aa4fdd3d826f9124fe97.tar.xz
eclipse.platform.swt-08288f4979848e095085aa4fdd3d826f9124fe97.zip
Bug 518532 - Drop GDK drawing
Remove non-cairo drawing in various components. Change-Id: I8ffb3b3759ffb638c0056c5bba710922d3841516 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Printing')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java20
1 files changed, 3 insertions, 17 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java
index 6bdd978b6d..f96b7c0e69 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -394,15 +394,8 @@ static byte [] restoreBytes(String key, boolean nullTerminate) {
*/
@Override
public long /*int*/ internal_new_GC(GCData data) {
- long /*int*/ gc, drawable = 0;
- if (OS.USE_CAIRO) {
- gc = cairo;
- } else {
- GdkVisual visual = new GdkVisual ();
- OS.memmove (visual, OS.gdk_visual_get_system());
- drawable = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), 1, 1, visual.depth);
- gc = OS.gdk_gc_new (drawable);
- }
+ long /*int*/ drawable = 0;
+ long /*int*/ gc = cairo;
if (gc == 0) SWT.error (SWT.ERROR_NO_HANDLES);
if (data != null) {
if (isGCCreated) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -455,14 +448,7 @@ public long /*int*/ internal_new_GC(GCData data) {
*/
@Override
public void internal_dispose_GC(long /*int*/ hDC, GCData data) {
- long /*int*/ gc = hDC;
if (data != null) isGCCreated = false;
- if (OS.USE_CAIRO) return;
- OS.g_object_unref (gc);
- if (data != null) {
- if (data.drawable != 0) OS.g_object_unref (data.drawable);
- data.drawable = data.cairo = 0;
- }
}
/**

Back to the top