Skip to content

Commit 64c8f81

Browse files
committed
no longer call super.beginDraw() because it may allocate memory
1 parent 6b4c8a3 commit 64c8f81

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,12 @@ public void beginDraw() {
144144
// g2 = template.createGraphics(width, height, mapper);
145145
}
146146
// System.out.println("beginDraw " + (System.currentTimeMillis() - t0));
147-
super.beginDraw();
147+
148+
// super in Java2D now creates an image buffer, don't do that
149+
// super.beginDraw();
150+
checkSettings();
151+
resetMatrix(); // reset model matrix
152+
vertexCount = 0;
148153

149154
// Also need to push the matrix since the matrix doesn't reset on each run
150155
// http://dev.processing.org/bugs/show_bug.cgi?id=1227

0 commit comments

Comments
 (0)