paint(): need invert bits not logic for stacked blitters #1068

pull/1328/head
nick black 4 years ago committed by Nick Black
parent b112b93901
commit 87def26efb

@ -312,7 +312,8 @@ paint(const ncplane* p, struct crender* rvec, int dstleny, int dstlenx,
// Evaluate the background first, in case we have HIGHCONTRAST fg text.
if(cell_bg_alpha(targc) > CELL_ALPHA_OPAQUE){
const nccell* vis = &p->fb[nfbcellidx(p, y, x)];
if(!((!crender->s.blittedquads) & cell_blittedquadrants(vis))){
//fprintf(stderr, "y/x: %d/%d crenderbq: 0x%x visbq: 0x%x\n", y, x, crender->s.blittedquads, cell_blittedquadrants(vis));
if(!((~crender->s.blittedquads) & cell_blittedquadrants(vis))){
if(cell_bg_default_p(vis)){
vis = &p->basecell;
}

@ -154,11 +154,9 @@ TEST_CASE("Stacking") {
.leny = 2, .lenx = 2, .blitter = NCBLIT_2x2, .flags = 0,
};
CHECK(top == ncvisual_render(nc_, ncv, &vopts));
/*
cell c = CELL_TRIVIAL_INITIALIZER;
ncplane_at_yx_cell(top, 0, 0, &c);
fprintf(stderr, "[[[%s]]] %016lx\n", cell_extended_gcluster(top, &c), c.channels);
*/
//cell c = CELL_TRIVIAL_INITIALIZER;
//ncplane_at_yx_cell(top, 0, 0, &c);
//fprintf(stderr, "[[[%s]]] %016lx\n", cell_extended_gcluster(top, &c), c.channels);
ncvisual_destroy(ncv);
// create an ncvisual of 2 rows, 2 columns, with the tr, bl 0xffffff

Loading…
Cancel
Save