diff options
Diffstat (limited to 'o3d/samples/o3d-webgl/bitmap.js')
-rw-r--r-- | o3d/samples/o3d-webgl/bitmap.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/o3d/samples/o3d-webgl/bitmap.js b/o3d/samples/o3d-webgl/bitmap.js index 5e2fcfc..9551051 100644 --- a/o3d/samples/o3d-webgl/bitmap.js +++ b/o3d/samples/o3d-webgl/bitmap.js @@ -74,6 +74,24 @@ o3d.Bitmap.SLICE = 7; /** + * The scratch canvas object. + * @private + */ +o3d.Bitmap.scratch_canvas_ = null; + + +/** + * Gets a canvas to use for scratch work. + * @private + */ +o3d.Bitmap.getScratchCanvas_ = function() { + if (!o3d.Bitmap.scratch_canvas_) + o3d.Bitmap.scratch_canvas_ = document.createElement('CANVAS'); + return o3d.Bitmap.scratch_canvas_; +} + + +/** * In webgl the bitmap object is represented by an offscreen canvas. * @type {Canvas} * @private @@ -89,6 +107,7 @@ o3d.Bitmap.prototype.flipVertically = function() { }; + /** * Generates mip maps from the source level to lower levels. * |