function uploadBaseTextures(prepare, item) {
    var tempPrepare = prepare;
    if (item instanceof _pixi_core__WEBPACK_IMPORTED_MODULE_0__.BaseTexture) {
        var image = item.source;
        // Sometimes images (like atlas images) report a size of zero, causing errors on windows phone.
        // So if the width or height is equal to zero then use the canvas size
        // Otherwise use whatever is smaller, the image dimensions or the canvas dimensions.
        var imageWidth = image.width === 0 ? tempPrepare.canvas.width : Math.min(tempPrepare.canvas.width, image.width);
        var imageHeight = image.height === 0 ? tempPrepare.canvas.height
            : Math.min(tempPrepare.canvas.height, image.height);
        // Only a small subsections is required to be drawn to have the whole texture uploaded to the GPU
        // A smaller draw can be faster.
        tempPrepare.ctx.drawImage(image, 0, 0, imageWidth, imageHeight, 0, 0, tempPrepare.canvas.width, tempPrepare.canvas.height);
        return true;
    }
    return false;
}
Built-in hook to upload PIXI.Texture objects to the GPU.
@private
@param prepare - Instance of CanvasPrepare
@param item - Item to check
@returns If item was uploaded.