mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 12:36:51 +03:00
Don't re-layout if this has already been performed
This commit is contained in:
parent
59af85e0b5
commit
25f1acb504
@ -480,25 +480,27 @@ struct BitMap *ami_bitmap_get_palettemapped(struct bitmap *bitmap,
|
||||
bitmap->dto = NULL;
|
||||
}
|
||||
|
||||
if(bitmap->dto == NULL)
|
||||
if(bitmap->dto == NULL) {
|
||||
bitmap->dto = ami_datatype_object_from_bitmap(bitmap);
|
||||
|
||||
SetDTAttrs(bitmap->dto, NULL, NULL,
|
||||
PDTA_Screen, scrn,
|
||||
PDTA_ScaleQuality, nsoption_bool(scale_quality),
|
||||
TAG_DONE);
|
||||
SetDTAttrs(bitmap->dto, NULL, NULL,
|
||||
PDTA_Screen, scrn,
|
||||
PDTA_ScaleQuality, nsoption_bool(scale_quality),
|
||||
TAG_DONE);
|
||||
|
||||
if((bitmap->width != width) || (bitmap->height != height)) {
|
||||
IDoMethod(bitmap->dto, PDTM_SCALE, width, height, 0);
|
||||
if((bitmap->width != width) || (bitmap->height != height)) {
|
||||
IDoMethod(bitmap->dto, PDTM_SCALE, width, height, 0);
|
||||
}
|
||||
|
||||
if((DoDTMethod(bitmap->dto, 0, 0, DTM_PROCLAYOUT, 0, 1)) == 0)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(DoDTMethod(bitmap->dto, 0, 0, DTM_PROCLAYOUT, 0, 1)) {
|
||||
GetDTAttrs(bitmap->dto,
|
||||
PDTA_DestBitMap, &dtbm,
|
||||
PDTA_MaskPlane, &bitmap->native_mask,
|
||||
TAG_END);
|
||||
}
|
||||
|
||||
GetDTAttrs(bitmap->dto,
|
||||
PDTA_DestBitMap, &dtbm,
|
||||
PDTA_MaskPlane, &bitmap->native_mask,
|
||||
TAG_END);
|
||||
|
||||
bitmap->nativebmwidth = width;
|
||||
bitmap->nativebmheight = height;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user