rem: if (bitmap == dst_bitmap && !context->miss_pixel_ops) {
add: if (bitmap == dst_bitmap && dst_width == src_width && dst_height == dst_height && (!context->miss_pixel_ops || (minterm & 0xf0) == 0xc0)) {
context: bool glgfx_bitmap_blit_a(struct glgfx_bitmap* bitmap, 			 struct glgfx_tagitem const* tags) {  struct glgfx_context* context = glgfx_context_getcurrent();  struct glgfx_tagitem const* tag;  int src_x = -1, src_y = -1, src_width = -1, src_height = -1;  int dst_x = -1, dst_y = -1;  struct glgfx_bitmap* dst_bitmap = bitmap;  int minterm = 0xc0;  static GLenum const ops[16] = {    GL_CLEAR, GL_NOR, GL_AND_INVERTED, GL_COPY_INVERTED,     GL_AND_REVERSE, GL_INVERT, GL_XOR, GL_NAND,    GL_AND, GL_EQUIV, GL_NOOP, GL_OR_INVERTED,    GL_COPY, GL_OR_REVERSE, GL_OR, GL_SET  };  if (bitmap == NULL || tags == NULL) {    errno = EINVAL;    return false;  }  while ((tag = glgfx_nexttagitem(&tags)) != NULL) {    switch ((enum glgfx_bitmap_blit_tag) tag->tag) {      case glgfx_bitmap_blit_x:	src_x = tag->data;	break;      case glgfx_bitmap_blit_y:	src_y = tag->data;	break;      case glgfx_bitmap_blit_width:	src_width = tag->data;	break;      case glgfx_bitmap_blit_height:	src_height = tag->data;	break;      case glgfx_bitmap_blit_dst_x:	dst_x = tag->data;	break;      case glgfx_bitmap_blit_dst_y:	dst_y = tag->data;	break;      case glgfx_bitmap_blit_dst_bitmap:	dst_bitmap = (struct glgfx_bitmap*) tag->data;	break;	      case glgfx_bitmap_blit_minterm:	minterm = tag->data;	break;      case glgfx_bitmap_blit_unknown:      case glgfx_bitmap_blit_max:	break;    }  }  if (src_x < 0 || src_y < 0 || src_width <= 0 || src_height <= 0 ||      dst_x < 0 || dst_y < 0 ||      dst_bitmap == NULL || (minterm & ~0xff) != 0 ||      src_x + src_width >= bitmap->width ||       dst_x + src_width >= dst_bitmap->width ||       src_y + src_height >= bitmap->height ||      dst_y + src_height >= dst_bitmap->height) {    errno = EINVAL;    return false;  }  if (bitmap == dst_bitmap && !context->miss_pixel_ops) {    if ((minterm & 0xf0) == 0xc0) {      glDisable(GL_COLOR_LOGIC_OP);    }    else {      glEnable(GL_COLOR_LOGIC_OP);      glLogicOp(ops[minterm >> 4]);    }    // Bind FBO and attach texture    glgfx_context_bindfbo(context, dst_bitmap);    // Blit using glCopyPixels()    glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);    glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);    glRasterPos2i(dst_x, dst_bitmap->height - dst_y);    glCopyPixels(src_x, src_y, src_width, src_height, GL_COLOR);    if ((minterm & 0xf0) != 0xc0) {      glDisable(GL_COLOR_LOGIC_OP);    }    glgfx_context_unbindfbo(context);  }  else {/*     glBegin(GL_QUADS); *//*     glVertex3f(dst_x, *//* 	       dst_y, 0); *//*     glVertex3f(dst_x + src_width, *//* 	       dst_y, 0); *//*     glVertex3f(dst_x + src_width, *//* 	       dst_y + src_height, 0); *//*     glVertex3f(dst_x, *//* 	       dst_y + src_height, 0); *//*     glEnd(); *//*     GLGFX_CHECKERROR(); */    abort();  }  dst_bitmap->has_changed = true;  return true;}