MCPcopy Index your code
hub / github.com/processing/processing / bufferUpdate

Method bufferUpdate

core/src/processing/opengl/Texture.java:896–922  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

894
895
896 protected boolean bufferUpdate() {
897 BufferData data = null;
898 try {
899 data = bufferCache.remove(0);
900 } catch (NoSuchElementException ex) {
901 PGraphics.showWarning("Don't have pixel data to copy to texture");
902 }
903
904 if (data != null) {
905 if ((data.w != width) || (data.h != height)) {
906 init(data.w, data.h);
907 }
908 data.rgbBuf.rewind();
909 setNative(data.rgbBuf, 0, 0, width, height);
910
911 // Putting the buffer in the used buffers list to dispose at the end of
912 // draw.
913 if (usedBuffers == null) {
914 usedBuffers = new LinkedList<BufferData>();
915 }
916 usedBuffers.add(data);
917
918 return true;
919 } else {
920 return false;
921 }
922 }
923
924
925 protected void getSourceMethods() {

Callers 1

getTextureMethod · 0.95

Calls 5

showWarningMethod · 0.95
initMethod · 0.95
setNativeMethod · 0.95
removeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected