From 3ca21626191205535e438c5b922c48daacd50b4e Mon Sep 17 00:00:00 2001
From: Markus Keller
Date: Wed, 8 Feb 2017 22:23:03 +0100
Subject: Bug 511596: [painting][rulers] Rulers are forcing synchronous paints
during scroll
---
.../eclipse/jface/text/source/VerticalRuler.java | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRuler.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRuler.java
index 04e361675d9..311f411fcf0 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRuler.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRuler.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
@@ -81,14 +81,17 @@ public final class VerticalRuler implements IVerticalRuler, IVerticalRulerExtens
}
}
- /**
- * true
if we're on a Mac/GTK, where "new GC(canvas)" is expensive.
- * @see bug 298936
- * @see bug 467499
- * @since 3.6
- */
- static final boolean AVOID_NEW_GC= Util.isMac() || Util.isGtk();
-
+ /**
+ * true
if we're on a Mac/GTK, where "new GC(canvas)" is expensive.
+ * Warning: On Windows, we can't switch to direct-paint mode, because
+ * calls to update() have been removed, and now repaints would only happen with huge
+ * delays when scrolling, see bug 511596 comment 26.
+ *
+ * @see bug 298936
+ * @see bug 467499
+ * @since 3.6
+ */
+ static final boolean AVOID_NEW_GC= Util.isMac() || Util.isGtk();
/** The vertical ruler's text viewer */
--
cgit v1.2.3