Selaa lähdekoodia

rm unused paintTextFast

xuty 5 vuotta sitten
vanhempi
sitoutus
e038d63dfb
1 muutettua tiedostoa jossa 0 lisäystä ja 51 poistoa
  1. 0 51
      lib/frontend/terminal_view.dart

+ 0 - 51
lib/frontend/terminal_view.dart

@@ -316,8 +316,6 @@ class TerminalPainter extends CustomPainter {
     }
 
     paintText(canvas);
-    // print(textLayoutCacheV2.length);
-    // or paintTextFast(canvas);
 
     paintSelection(canvas);
   }
@@ -412,55 +410,6 @@ class TerminalPainter extends CustomPainter {
     }
   }
 
-  void paintTextFast(Canvas canvas) {
-    final lines = terminal.getVisibleLines();
-
-    for (var i = 0; i < lines.length; i++) {
-      final line = lines[i];
-      final offsetY = i * charSize.cellHeight;
-      final cellCount = math.min(terminal.viewWidth, line.length);
-
-      final builder = StringBuffer();
-      for (var i = 0; i < cellCount; i++) {
-        final cell = line.getCell(i);
-
-        if (cell.attr == null || cell.width == 0) {
-          continue;
-        }
-
-        if (cell.codePoint == null) {
-          builder.write(' ');
-        } else {
-          builder.writeCharCode(cell.codePoint);
-        }
-
-        // final offsetX = i * charSize.effectWidth;
-        // paintCell(canvas, cell, offsetX, offsetY);
-      }
-
-      final style = TextStyle(
-        // color: color,
-        // fontWeight: cell.attr.bold ? FontWeight.bold : FontWeight.normal,
-        // fontStyle: cell.attr.italic ? FontStyle.italic : FontStyle.normal,
-        fontSize: view.style.fontSize,
-        letterSpacing: charSize.letterSpacing,
-        fontFeatures: [FontFeature.tabularFigures()],
-        // decoration:
-        //     cell.attr.underline ? TextDecoration.underline : TextDecoration.none,
-        fontFamilyFallback: view.style.fontFamily,
-      );
-
-      final span = TextSpan(
-        text: builder.toString(),
-        style: style,
-      );
-
-      final tp = textLayoutCache.getOrPerformLayout(span);
-
-      tp.paint(canvas, Offset(0, offsetY));
-    }
-  }
-
   void paintCell(Canvas canvas, Cell cell, double offsetX, double offsetY) {
     if (cell.codePoint == null || cell.attr.invisible) {
       return;