constructor(options){
           super(options);

            /**
             * The HTML element (canvas) that this drawer uses for drawing
             * @member {Element} canvas
             * @memberof OpenSeadragon.WebGLDrawer#
             */

            /**
             * The parent element of this Drawer instance, passed in when the Drawer was created.
             * The parent of {@link OpenSeadragon.WebGLDrawer#canvas}.
             * @member {Element} container
             * @memberof OpenSeadragon.WebGLDrawer#
             */

            // private members
            this._destroyed = false;
            this._gl = null;
            this._firstPass = null;
            this._secondPass = null;
            this._glFrameBuffer = null;
            this._renderToTexture = null;
            this._outputCanvas = null;
            this._outputContext = null;
            this._clippingCanvas = null;
            this._clippingContext = null;
            this._renderingCanvas = null;
            this._backupCanvasDrawer = null;

            this._imageSmoothingEnabled = true; // will be updated by setImageSmoothingEnabled

            // Reject listening for the tile-drawing and tile-drawn events, which this drawer does not fire
            this.viewer.rejectEventHandler("tile-drawn", "The WebGLDrawer does not raise the tile-drawn event");
            this.viewer.rejectEventHandler("tile-drawing", "The WebGLDrawer does not raise the tile-drawing event");

            // this.viewer and this.canvas are part of the public DrawerBase API
            // and are defined by the parent DrawerBase class. Additional setup is done by
            // the private _setupCanvases and _setupRenderer functions.
            this._setupCanvases();
            this._setupRenderer();

            this._supportedFormats = ["context2d", "image"];
            this.context = this._outputContext; // API required by tests
        }
@class OpenSeadragon.WebGLDrawer
@classdesc Default implementation of WebGLDrawer for an {@link OpenSeadragon.Viewer}. The WebGLDrawer
defines its own data type that ensures textures are correctly loaded to and deleted from the GPU memory.
The drawer utilizes a context-dependent two pass drawing pipeline. For the first pass, tile composition
for a given TiledImage is always done using a canvas with a WebGL context. This allows tiles to be stitched
together without seams or artifacts, without requiring a tile source with overlap. If overlap is present,
overlapping pixels are discarded. The second pass copies all pixel data from the WebGL context onto an output
canvas with a Context2d context. This allows applications to have access to pixel data and other functionality
provided by Context2d, regardless of whether the CanvasDrawer or the WebGLDrawer is used. Certain options,
including compositeOperation, clip, croppingPolygons, and debugMode are implemented using Context2d operations;
in these scenarios, each TiledImage is drawn onto the output canvas immediately after the tile composition step
(pass 1). Otherwise, for efficiency, all TiledImages are copied over to the output canvas at once, after all
tiles have been composited for all images.
@param {Object} options - Options for this Drawer.
@param {OpenSeadragon.Viewer} options.viewer - The Viewer that owns this Drawer.
@param {OpenSeadragon.Viewport} options.viewport - Reference to Viewer viewport.
@param {Element} options.element - Parent element.
@param {Number} [options.debugGridColor] - See debugGridColor in {@link OpenSeadragon.Options} for details.