@@ -405,31 +405,32 @@ export default class CanvasDrawer extends Mixin {
405405 * @param {number } lastRow lastRow the last row of the range to update
406406 * @param {Function } method the render method to use for the lines drawing
407407 * @access private
408+ * Unused (inlined the code for performance reasons)
408409 */
409- redrawRangesOnLayer ( layer , intactRanges , firstRow , lastRow , method ) {
410- const devicePixelRatio = this . minimap . getDevicePixelRatio ( )
411- const lineHeight = this . minimap . getLineHeight ( ) * devicePixelRatio
412-
413- layer . clearCanvas ( )
414-
415- if ( intactRanges . length === 0 ) {
416- method . call ( this , firstRow , lastRow , 0 )
417- } else {
418- for ( let j = 0 , len = intactRanges . length ; j < len ; j ++ ) {
419- const intact = intactRanges [ j ]
420-
421- layer . copyPartFromOffscreen (
422- intact . offscreenRow * lineHeight ,
423- ( intact . start - firstRow ) * lineHeight ,
424- ( intact . end - intact . start ) * lineHeight
425- )
426- }
427- this . drawLinesForRanges ( method , intactRanges , firstRow , lastRow )
428- }
429-
430- layer . resetOffscreenSize ( )
431- layer . copyToOffscreen ( )
432- }
410+ // redrawRangesOnLayer (layer, intactRanges, firstRow, lastRow, method) {
411+ // const devicePixelRatio = this.minimap.getDevicePixelRatio()
412+ // const lineHeight = this.minimap.getLineHeight() * devicePixelRatio
413+ //
414+ // layer.clearCanvas()
415+ //
416+ // if (intactRanges.length === 0) {
417+ // method.call(this, firstRow, lastRow, 0)
418+ // } else {
419+ // for (let j = 0, len = intactRanges.length; j < len; j++) {
420+ // const intact = intactRanges[j]
421+ //
422+ // layer.copyPartFromOffscreen(
423+ // intact.offscreenRow * lineHeight,
424+ // (intact.start - firstRow) * lineHeight,
425+ // (intact.end - intact.start) * lineHeight
426+ // )
427+ // }
428+ // this.drawLinesForRanges(method, intactRanges, firstRow, lastRow)
429+ // }
430+ //
431+ // layer.resetOffscreenSize()
432+ // layer.copyToOffscreen()
433+ // }
433434
434435 /**
435436 * Renders the lines between the intact ranges when an update has pending
@@ -440,20 +441,21 @@ export default class CanvasDrawer extends Mixin {
440441 * @param {number } firstRow the first row of the rendered region
441442 * @param {number } lastRow the last row of the rendered region
442443 * @access private
444+ * Unused (inlined the code for performance reasons)
443445 */
444- drawLinesForRanges ( method , ranges , firstRow , lastRow ) {
445- let currentRow = firstRow
446- for ( let i = 0 , len = ranges . length ; i < len ; i ++ ) {
447- const range = ranges [ i ]
448-
449- method . call ( this , currentRow , range . start , currentRow - firstRow )
450-
451- currentRow = range . end
452- }
453- if ( currentRow <= lastRow ) {
454- method . call ( this , currentRow , lastRow , currentRow - firstRow )
455- }
456- }
446+ // drawLinesForRanges (method, ranges, firstRow, lastRow) {
447+ // let currentRow = firstRow
448+ // for (let i = 0, len = ranges.length; i < len; i++) {
449+ // const range = ranges[i]
450+ //
451+ // method.call(this, currentRow, range.start, currentRow - firstRow)
452+ //
453+ // currentRow = range.end
454+ // }
455+ // if (currentRow <= lastRow) {
456+ // method.call(this, currentRow, lastRow, currentRow - firstRow)
457+ // }
458+ // }
457459
458460 /**
459461 * Draws back decorations on the corresponding layer.
0 commit comments