diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index e57cf2fc9..1f85c257d 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -3671,11 +3671,6 @@ public class PGraphics extends PImage implements PConstants { } - public Object initCache(PImage img) { // ignore - return null; - } - - ////////////////////////////////////////////////////////////// // SHAPE diff --git a/core/src/processing/core/PImage.java b/core/src/processing/core/PImage.java index aed7ab5ed..383395f39 100644 --- a/core/src/processing/core/PImage.java +++ b/core/src/processing/core/PImage.java @@ -474,26 +474,6 @@ public class PImage implements PConstants, Cloneable { pixels = new int[width*height]; } isLoaded(); - -/* - if (parent != null) { - Object cache = parent.g.initCache(this); - if (cache != null) { - Method loadPixelsMethod = null; - try { - loadPixelsMethod = cache.getClass().getMethod("loadPixels", new Class[] { int[].class }); - } catch (Exception e) { } - - if (loadPixelsMethod != null) { - try { - loadPixelsMethod.invoke(cache, new Object[] { pixels }); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - } -*/ } @@ -3132,7 +3112,7 @@ public class PImage implements PConstants, Cloneable { ImageWriter writer = null; ImageWriteParam param = null; IIOMetadata metadata = null; - + if (extension.equals("jpg") || extension.equals("jpeg")) { if ((writer = imageioWriter("jpeg")) != null) { // Set JPEG quality to 90% with baseline optimization. Setting this diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/core/src/processing/opengl/PGraphicsOpenGL.java index 49a82f710..b85473705 100644 --- a/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/core/src/processing/opengl/PGraphicsOpenGL.java @@ -5362,25 +5362,6 @@ public class PGraphicsOpenGL extends PGraphics { } - public void drawTexture(int target, int id, int width, int height, - int X0, int Y0, int X1, int Y1) { - beginPGL(); - pgl.drawTexture(target, id, width, height, X0, Y0, X1, Y1); - endPGL(); - } - - - public void drawTexture(int target, int id, int texW, int texH, - int texX0, int texY0, int texX1, int texY1, - int scrX0, int scrY0, int scrX1, int scrY1) { - beginPGL(); - pgl.drawTexture(target, id, texW, texH, width, height, - texX0, texY0, texX1, texY1, - scrX0, scrY0, scrX1, scrY1); - endPGL(); - } - - protected void loadTextureImpl(int sampling, boolean mipmap) { if (width == 0 || height == 0) return; if (texture == null || texture.contextIsOutdated()) { @@ -5757,7 +5738,7 @@ public class PGraphicsOpenGL extends PGraphics { * drawing surface, making sure is updated to reflect the current contents * off the screen (or offscreen drawing surface). */ - public Texture getTexture() { + protected Texture getTexture() { loadTexture(); return texture; } @@ -5769,7 +5750,7 @@ public class PGraphicsOpenGL extends PGraphics { * * @param img the image to have a texture metadata associated to it */ - public Texture getTexture(PImage img) { + protected Texture getTexture(PImage img) { Texture tex = (Texture)initCache(img); if (tex == null) return null; @@ -5790,8 +5771,7 @@ public class PGraphicsOpenGL extends PGraphics { } - @Override - public Object initCache(PImage img) { + protected Object initCache(PImage img) { if (!checkGLThread()) { return null; }