Changeset 670cfcf in mainline


Ignore:
Timestamp:
2019-11-21T16:24:16Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
38e5f36c
Parents:
8b1ce56
Message:

Optimize terminal rendering

This is pretty much equivalent of what vterm/terminal widget achieve via
surface damage tracking.

Location:
uspace/app/terminal
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/terminal/terminal.c

    r8b1ce56 r670cfcf  
    177177{
    178178        gfx_rect_t rect;
     179        gfx_rect_t nupdate;
    179180
    180181        rect.p0.x = x;
     
    183184        rect.p1.y = y + h;
    184185
    185         (void) gfx_bitmap_render(term->bmp, &rect, NULL);
     186        gfx_rect_envelope(&term->update, &rect, &nupdate);
     187        term->update = nupdate;
    186188}
    187189
     
    357359                update = true;
    358360
    359         (void) update; // XXX
     361        if (update) {
     362                (void) gfx_bitmap_render(term->bmp, &term->update, NULL);
     363
     364                term->update.p0.x = 0;
     365                term->update.p0.y = 0;
     366                term->update.p1.x = 0;
     367                term->update.p1.y = 0;
     368        }
    360369
    361370        fibril_mutex_unlock(&term->mtx);
     
    802811        term_repaint(term);
    803812
     813        term->update.p0.x = 0;
     814        term->update.p0.y = 0;
     815        term->update.p1.x = 0;
     816        term->update.p1.y = 0;
     817
    804818        *rterm = term;
    805819        return EOK;
  • uspace/app/terminal/terminal.h

    r8b1ce56 r670cfcf  
    4343#include <gfx/bitmap.h>
    4444#include <gfx/context.h>
     45#include <gfx/coord.h>
    4546#include <io/chargrid.h>
    4647#include <io/con_srv.h>
     
    5859        sysarg_t w;
    5960        sysarg_t h;
     61        gfx_rect_t update;
    6062
    6163        fibril_mutex_t mtx;
Note: See TracChangeset for help on using the changeset viewer.