Skip to content

Commit

Permalink
simplifying get() code slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauren McCarthy committed Nov 5, 2018
1 parent aeaf686 commit 2939d68
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/webgl/p5.RendererGL.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,7 @@ p5.RendererGL.prototype.get = function(x, y, w, h) {
var sy = y * pd;

if (w === 1 && h === 1) {
var dbw = this.drawingContext.drawingBufferWidth;
var dbh = this.drawingContext.drawingBufferHeight;
var pixels = new Uint8Array(dbw * dbh * 4);
var pixels = new Uint8Array(4);
this.drawingContext.readPixels(
sx,
sy,
Expand Down

0 comments on commit 2939d68

Please sign in to comment.