modules/graphics/src/main/java/com/sun/javafx/tk/quantum/PresentingPainter.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -24,10 +24,11 @@
*/
package com.sun.javafx.tk.quantum;
import com.sun.javafx.logging.PulseLogger;
+import static com.sun.javafx.logging.PulseLogger.PULSE_LOGGING_ENABLED;
import com.sun.prism.Graphics;
import com.sun.prism.GraphicsPipeline;
import com.sun.prism.impl.Disposer;
import com.sun.prism.impl.ManagedResource;
@@ -87,30 +88,23 @@
ViewScene vs = (ViewScene) sceneState.getScene();
if (g != null) {
paintImpl(g);
}
- long start = PulseLogger.PULSE_LOGGING_ENABLED ? System.currentTimeMillis() : 0;
+ if (PULSE_LOGGING_ENABLED) PulseLogger.newPhase("Presenting");
if (!presentable.prepare(null)) {
disposePresentable();
sceneState.getScene().entireSceneNeedsRepaint();
- if (PulseLogger.PULSE_LOGGING_ENABLED) {
- PulseLogger.PULSE_LOGGER.renderMessage(start, System.currentTimeMillis(), "Presentable.prepare");
- }
return;
}
/* present for vsync buffer swap */
- start = PulseLogger.PULSE_LOGGING_ENABLED ? System.currentTimeMillis() : 0;
if (vs.getDoPresent()) {
if (!presentable.present()) {
disposePresentable();
sceneState.getScene().entireSceneNeedsRepaint();
}
- if (PulseLogger.PULSE_LOGGING_ENABLED) {
- PulseLogger.PULSE_LOGGER.renderMessage(start, System.currentTimeMillis(), "Presentable.present");
- }
}
}
} catch (Throwable th) {
errored = true;
th.printStackTrace(System.err);
@@ -126,11 +120,8 @@
viewScene.setPainting(false);
ManagedResource.freeDisposalRequestedAndCheckResources(errored);
renderLock.unlock();
- if (PulseLogger.PULSE_LOGGING_ENABLED) {
- PulseLogger.PULSE_LOGGER.renderMessage(System.currentTimeMillis(), System.currentTimeMillis(), "Finished Presenting Painter");
- }
}
}
}