From d8640c04fef4c07430541a09d506a6a2d85331b5 Mon Sep 17 00:00:00 2001 From: benfry Date: Sat, 16 Apr 2011 21:16:37 +0000 Subject: [PATCH] switch to RGB primary surface for JAVA2D, other todo notes --- app/src/processing/mode/java/JavaMode.java | 2 +- core/src/processing/core/PGraphicsJava2D.java | 7 +++++-- core/todo.txt | 8 ++++++-- todo.txt | 7 ++++--- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app/src/processing/mode/java/JavaMode.java b/app/src/processing/mode/java/JavaMode.java index b80e03091..b00149015 100644 --- a/app/src/processing/mode/java/JavaMode.java +++ b/app/src/processing/mode/java/JavaMode.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2010 Ben Fry and Casey Reas + Copyright (c) 2010-11 Ben Fry and Casey Reas This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 diff --git a/core/src/processing/core/PGraphicsJava2D.java b/core/src/processing/core/PGraphicsJava2D.java index 471ed641b..6640e6ad9 100644 --- a/core/src/processing/core/PGraphicsJava2D.java +++ b/core/src/processing/core/PGraphicsJava2D.java @@ -127,11 +127,14 @@ public class PGraphicsJava2D extends PGraphics /*PGraphics2D*/ { // Tried this with RGB instead of ARGB for the primarySurface version, // but didn't see any performance difference (OS X 10.6, Java 6u24) - image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); + //image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); // 0196 if (primarySurface) { - offscreen = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); + image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); // 0196 + offscreen = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); // 0196 + //offscreen = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); // 0196 g2 = (Graphics2D) offscreen.getGraphics(); } else { + image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); // 0196 // if the buffer's offscreen anyway, no need for the extra offscreen buffer g2 = (Graphics2D) image.getGraphics(); } diff --git a/core/todo.txt b/core/todo.txt index 969df04a5..89c6d04dd 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -9,6 +9,8 @@ o could this be an issue fixed by a MediaTracker? o first line of applets is missing on java 1.4+ on the mac X http://dev.processing.org/bugs/show_bug.cgi?id=283 o make the PFont index lookup use numbers up to 256? +X change JAVA2D surface to be RGB instead of ARGB +X seeing some strange behavior, hopefully this won't be a regression for 2.0 @@ -36,12 +38,14 @@ _ image resizing is ugly (just use java2d?) _ also deal with copy()/blend() inaccuracies _ http://code.google.com/p/processing/issues/detail?id=332 _ implement a more efficient version of blend() -_ http://dev.processing.org/bugs/show_bug.cgi?id=942 +_ http://code.google.com/p/processing/issues/detail?id=120 _ blend() bugs with identically-sized images _ http://code.google.com/p/processing/issues/detail?id=285 _ transparency issue with JAVA2D -_ http://dev.processing.org/bugs/show_bug.cgi?id=1280 _ http://code.google.com/p/processing/issues/detail?id=182 +_ copy(image with transparency) doesn't keep the transparency at start up +_ http://code.google.com/p/processing/issues/detail?id=601 + o filter() doesn't need a loadPixels o but if you want to filter *and* mess w/ pixels (avoid double load) o then do loadPixels() /before/ filter, and updatePixels after messing diff --git a/todo.txt b/todo.txt index ae9bf626b..62417612d 100644 --- a/todo.txt +++ b/todo.txt @@ -18,17 +18,16 @@ X shift-indent without selection increases indention X http://code.google.com/p/processing/issues/detail?id=458 X Running a sketch destroys other running PApplets X http://code.google.com/p/processing/issues/detail?id=567 +X allow more than one sketch to run at a time -_ allow more than one sketch to run at a time _ help casey re-export all applets for the site _ remove .java files, use one central loading.gif and core.jar? _ use a custom applet.html template for the export _ the tool could copy this into the folder just before exporting _ remove all the 'applet' folders from svn + _ remove opengl2 for 1.5 and examples for the final 1.5 _ need to get a new stable release out there, the docs/ref are out of sync -_ build is currently broken for p5 because of changes to the file layout -_ something that gets fixed my 'make clean' from peter n lewis X Use Selection For Find @@ -68,6 +67,8 @@ X http://code.google.com/p/processing/issues/detail?id=13 2.0 _ colors for 2.0 _ nurbs or other arch stuff for 2.0? +_ build is currently broken for fresh checkout due to changes to file layout +_ something that gets fixed by 'make clean' _ Internationalization _ http://code.google.com/p/processing/issues/detail?id=593