mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-01 08:44:25 +03:00
Possibly slightly faster bitmap plotter.
svn path=/trunk/netsurf/; revision=6647
This commit is contained in:
parent
7af238ab7f
commit
6b064b526c
@ -462,14 +462,15 @@ static bool fb_16bpp_bitmap(int x, int y, int width, int height,
|
|||||||
width = (x1 - x0);
|
width = (x1 - x0);
|
||||||
|
|
||||||
xoff = x0 - x;
|
xoff = x0 - x;
|
||||||
yoff = y0 - y;
|
yoff = (y0 - y) * bitmap->width;
|
||||||
|
height *= bitmap->width;
|
||||||
|
|
||||||
/* plot the image */
|
/* plot the image */
|
||||||
pvideo = fb_16bpp_get_xy_loc(x0, y0);
|
pvideo = fb_16bpp_get_xy_loc(x0, y0);
|
||||||
|
|
||||||
for (yloop = 0; yloop < height; yloop++) {
|
for (yloop = yoff; yloop < height; yloop += bitmap->width) {
|
||||||
for (xloop = 0; xloop < width; xloop++) {
|
for (xloop = 0; xloop < width; xloop++) {
|
||||||
abpixel = pixel[((yoff + yloop) * bitmap->width) + xloop + xoff];
|
abpixel = pixel[yloop + xloop + xoff];
|
||||||
if ((abpixel & 0xFF000000) != 0) {
|
if ((abpixel & 0xFF000000) != 0) {
|
||||||
if ((abpixel & 0xFF000000) != 0xFF000000) {
|
if ((abpixel & 0xFF000000) != 0xFF000000) {
|
||||||
abpixel = fb_plotters_ablend(abpixel,
|
abpixel = fb_plotters_ablend(abpixel,
|
||||||
|
@ -518,14 +518,15 @@ static bool fb_32bpp_bitmap(int x, int y, int width, int height,
|
|||||||
width = (x1 - x0);
|
width = (x1 - x0);
|
||||||
|
|
||||||
xoff = x0 - x;
|
xoff = x0 - x;
|
||||||
yoff = y0 - y;
|
yoff = (y0 - y) * bitmap->width;
|
||||||
|
height *= bitmap->width;
|
||||||
|
|
||||||
/* plot the image */
|
/* plot the image */
|
||||||
pvideo = fb_32bpp_get_xy_loc(x0, y0);
|
pvideo = fb_32bpp_get_xy_loc(x0, y0);
|
||||||
|
|
||||||
for (yloop = 0; yloop < height; yloop++) {
|
for (yloop = yoff; yloop < height; yloop += bitmap->width) {
|
||||||
for (xloop = 0; xloop < width; xloop++) {
|
for (xloop = 0; xloop < width; xloop++) {
|
||||||
abpixel = pixel[((yoff + yloop) * bitmap->width) + xloop + xoff];
|
abpixel = pixel[yloop + xloop + xoff];
|
||||||
if ((abpixel & 0xFF000000) != 0) {
|
if ((abpixel & 0xFF000000) != 0) {
|
||||||
if ((abpixel & 0xFF000000) != 0xFF000000) {
|
if ((abpixel & 0xFF000000) != 0xFF000000) {
|
||||||
abpixel = fb_plotters_ablend(abpixel,
|
abpixel = fb_plotters_ablend(abpixel,
|
||||||
|
Loading…
Reference in New Issue
Block a user