2 Copyright © 2010-2017, The AROS Development Team. All rights reserved.
6 #include "nouveau_intern.h"
9 #include <aros/debug.h>
10 #include <proto/oop.h>
11 #include <proto/utility.h>
13 #include "arosdrmmode.h"
15 #undef HiddBitMapAttrBase
16 #undef HiddPixFmtAttrBase
17 #undef HiddBitMapNouveauAttrBase
19 #define HiddBitMapAttrBase (SD(cl)->bitMapAttrBase)
20 #define HiddPixFmtAttrBase (SD(cl)->pixFmtAttrBase)
21 #define HiddBitMapNouveauAttrBase (SD(cl)->bitMapNouveauAttrBase)
23 #define GART_TRANSFER_ALLOWED(width, height) ((((width) * (height)) >= (32 * 32)) && (carddata->GART))
25 VOID
HIDDNouveauSetOffsets(OOP_Object
* bm
, LONG newxoffset
, LONG newyoffset
)
27 OOP_Class
* cl
= OOP_OCLASS(bm
);
28 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, bm
);
29 bmdata
->xoffset
= newxoffset
;
30 bmdata
->yoffset
= newyoffset
;
34 OOP_Object
* METHOD(NouveauBitMap
, Root
, New
)
36 IPTR width
, height
, depth
, displayable
, bytesperpixel
;
38 struct HIDDNouveauBitMapData
* bmdata
= NULL
;
39 HIDDT_StdPixFmt stdfmt
= vHidd_StdPixFmt_Unknown
;
40 struct CardData
* carddata
= &(SD(cl
)->carddata
);
42 o
= (OOP_Object
*)OOP_DoSuperMethod(cl
, o
, (OOP_Msg
)msg
);
47 bmdata
= OOP_INST_DATA(cl
, o
);
49 /* Initialize default values */
55 OOP_GetAttr(o
, aHidd_BitMap_Width
, &width
);
56 OOP_GetAttr(o
, aHidd_BitMap_Height
, &height
);
57 OOP_GetAttr(o
, aHidd_BitMap_PixFmt
, (APTR
)&pf
);
58 OOP_GetAttr(o
, aHidd_BitMap_Displayable
, &displayable
);
59 OOP_GetAttr(pf
, aHidd_PixFmt_StdPixFmt
, &stdfmt
);
60 OOP_GetAttr(pf
, aHidd_PixFmt_BytesPerPixel
, &bytesperpixel
);
61 OOP_GetAttr(pf
, aHidd_PixFmt_Depth
, &depth
);
63 D(bug("[Nouveau] BitMap New: %d x %d x %d\n", width
, height
, depth
));
65 /* Check if requested format is one of the supported ones */
66 if ((stdfmt
!= vHidd_StdPixFmt_BGR032
) && (stdfmt
!= vHidd_StdPixFmt_RGB16_LE
))
69 /* Check if requested depth is a supported one */
73 /* Check if requested byted per pixel is a supported one */
74 if ((bytesperpixel
!= 2) && (bytesperpixel
!= 4))
77 /* Initialize properties */
78 bmdata
->width
= width
;
79 bmdata
->height
= height
;
80 bmdata
->depth
= depth
;
81 bmdata
->bytesperpixel
= bytesperpixel
;
82 bmdata
->pitch
= bmdata
->width
* bmdata
->bytesperpixel
;
83 if (carddata
->architecture
>= NV_ARCH_50
)
84 bmdata
->pitch
= (bmdata
->pitch
+ 255) & ~255;
86 bmdata
->pitch
= (bmdata
->pitch
+ 63) & ~63;
88 if (displayable
) bmdata
->displayable
= TRUE
; else bmdata
->displayable
= FALSE
;
89 InitSemaphore(&bmdata
->semaphore
);
92 /* Creation of buffer object */
93 nouveau_bo_new(SD(cl
)->carddata
.dev
, NOUVEAU_BO_VRAM
| NOUVEAU_BO_MAP
, 0,
94 bmdata
->pitch
* bmdata
->height
,
98 if (bmdata
->bo
== NULL
)
101 bmdata
->compositor
= (OOP_Object
*)GetTagData(aHidd_BitMap_Nouveau_CompositorHidd
, 0, msg
->attrList
);
102 if (bmdata
->compositor
== NULL
)
109 bug("[Nouveau]: Failed to create bitmap %dx%d %d %d\n", width
, height
, depth
, stdfmt
);
113 OOP_MethodID disp_mid
= OOP_GetMethodID(IID_Root
, moRoot_Dispose
);
114 OOP_CoerceMethod(cl
, o
, (OOP_Msg
) &disp_mid
);
120 VOID
NouveauBitMap__Root__Dispose(OOP_Class
*cl
, OOP_Object
*o
, OOP_Msg msg
)
122 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
124 D(bug("[Nouveau] Dispose %x\n", o
));
127 /* Unregister from framebuffer if needed */
128 if (bmdata
->fbid
!= 0)
130 struct nouveau_device_priv
*nvdev
= nouveau_device(SD(cl
)->carddata
.dev
);
131 drmModeRmFB(nvdev
->fd
, bmdata
->fbid
);
138 nouveau_bo_ref(NULL
, &bmdata
->bo
); /* Release reference */
142 OOP_DoSuperMethod(cl
, o
, msg
);
145 VOID
METHOD(NouveauBitMap
, Root
, Get
)
147 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
150 if (IS_BITMAP_ATTR(msg
->attrID
, idx
))
154 case aoHidd_BitMap_LeftEdge
:
155 *msg
->storage
= bmdata
->xoffset
;
157 case aoHidd_BitMap_TopEdge
:
158 *msg
->storage
= bmdata
->yoffset
;
163 OOP_DoSuperMethod(cl
, o
, (OOP_Msg
)msg
);
166 VOID
METHOD(NouveauBitMap
, Root
, Set
)
168 struct TagItem
*tag
, *tstate
;
169 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
171 LONG newxoffset
= bmdata
->xoffset
;
172 LONG newyoffset
= bmdata
->yoffset
;
174 tstate
= msg
->attrList
;
175 while((tag
= NextTagItem(&tstate
)))
177 if(IS_BITMAP_ATTR(tag
->ti_Tag
, idx
))
181 case aoHidd_BitMap_LeftEdge
:
182 newxoffset
= tag
->ti_Data
;
184 case aoHidd_BitMap_TopEdge
:
185 newyoffset
= tag
->ti_Data
;
191 if ((newxoffset
!= bmdata
->xoffset
) || (newyoffset
!= bmdata
->yoffset
))
193 /* If there was a change requested, validate it */
194 struct pHidd_Compositor_ValidateBitMapPositionChange vbpcmsg
=
196 mID
: SD(cl
)->mid_ValidateBitMapPositionChange
,
198 newxoffset
: &newxoffset
,
199 newyoffset
: &newyoffset
202 OOP_DoMethod(bmdata
->compositor
, (OOP_Msg
)&vbpcmsg
);
204 if ((newxoffset
!= bmdata
->xoffset
) || (newyoffset
!= bmdata
->yoffset
))
206 /* If change passed validation, execute it */
207 struct pHidd_Compositor_BitMapPositionChanged bpcmsg
=
209 mID
: SD(cl
)->mid_BitMapPositionChanged
,
213 HIDDNouveauSetOffsets(o
, newxoffset
, newyoffset
);
215 OOP_DoMethod(bmdata
->compositor
, (OOP_Msg
)&bpcmsg
);
219 OOP_DoSuperMethod(cl
, o
, (OOP_Msg
)msg
);
222 VOID
METHOD(NouveauBitMap
, Hidd_BitMap
, PutPixel
)
224 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
225 IPTR addr
= (msg
->x
* bmdata
->bytesperpixel
) + (bmdata
->pitch
* msg
->y
);
227 /* FIXME "Optimistics" synchronization (yes, I know it's wrong) */
228 IPTR map
= (IPTR
)bmdata
->bo
->map
;
230 /* If the current map was NULL, wait until bitmap lock is released.
231 When it happens, map the buffer */
232 if (map
== (IPTR
)NULL
)
236 addr
+= (IPTR
)bmdata
->bo
->map
;
241 switch(bmdata
->bytesperpixel
)
247 writew(msg
->pixel
, (APTR
)addr
);
250 writel(msg
->pixel
, (APTR
)addr
);
254 if (map
== (IPTR
)NULL
)
258 HIDDT_Pixel
METHOD(NouveauBitMap
, Hidd_BitMap
, GetPixel
)
260 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
261 IPTR addr
= (msg
->x
* bmdata
->bytesperpixel
) + (bmdata
->pitch
* msg
->y
);
262 HIDDT_Pixel pixel
= 0;
264 /* FIXME "Optimistics" synchronization (yes, I know it's wrong) */
265 IPTR map
= (IPTR
)bmdata
->bo
->map
;
267 /* If the current map was NULL, wait until bitmap lock is released.
268 When it happens, map the buffer */
269 if (map
== (IPTR
)NULL
)
273 addr
+= (IPTR
)bmdata
->bo
->map
;
278 switch(bmdata
->bytesperpixel
)
284 pixel
= readw((APTR
)addr
);
287 pixel
= readl((APTR
)addr
);
291 if (map
== (IPTR
)NULL
)
297 VOID
METHOD(NouveauBitMap
, Hidd_BitMap
, Clear
)
299 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
300 struct CardData
* carddata
= &(SD(cl
)->carddata
);
308 switch(carddata
->architecture
)
316 ret
= HIDDNouveauNV04FillSolidRect(carddata
, bmdata
,
317 0, 0, bmdata
->width
- 1, bmdata
->height
- 1, GC_DRMD(msg
->gc
), GC_BG(msg
->gc
));
320 ret
= HIDDNouveauNV50FillSolidRect(carddata
, bmdata
,
321 0, 0, bmdata
->width
- 1, bmdata
->height
- 1, GC_DRMD(msg
->gc
), GC_BG(msg
->gc
));
324 ret
= HIDDNouveauNVC0FillSolidRect(carddata
, bmdata
,
325 0, 0, bmdata
->width
- 1, bmdata
->height
- 1, GC_DRMD(msg
->gc
), GC_BG(msg
->gc
));
336 /* Fallback to default method */
337 OOP_DoSuperMethod(cl
, o
, (OOP_Msg
)msg
);
340 /* There is no pHidd_BitMap_FillRect structure - it's the same as pHidd_BitMap_DrawRect */
341 #define pHidd_BitMap_FillRect pHidd_BitMap_DrawRect
343 VOID
METHOD(NouveauBitMap
, Hidd_BitMap
, FillRect
)
345 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
346 struct CardData
* carddata
= &(SD(cl
)->carddata
);
354 switch(carddata
->architecture
)
362 ret
= HIDDNouveauNV04FillSolidRect(carddata
, bmdata
,
363 msg
->minX
, msg
->minY
, msg
->maxX
, msg
->maxY
, GC_DRMD(msg
->gc
), GC_FG(msg
->gc
));
366 ret
= HIDDNouveauNV50FillSolidRect(carddata
, bmdata
,
367 msg
->minX
, msg
->minY
, msg
->maxX
, msg
->maxY
, GC_DRMD(msg
->gc
), GC_FG(msg
->gc
));
370 ret
= HIDDNouveauNVC0FillSolidRect(carddata
, bmdata
,
371 msg
->minX
, msg
->minY
, msg
->maxX
, msg
->maxY
, GC_DRMD(msg
->gc
), GC_FG(msg
->gc
));
382 /* Fallback to default method */
383 OOP_DoSuperMethod(cl
, o
, (OOP_Msg
)msg
);
386 VOID
METHOD(NouveauBitMap
, Hidd_BitMap
, PutImage
)
388 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
389 struct CardData
* carddata
= &(SD(cl
)->carddata
);
395 /* For larger transfers use GART */
396 if (GART_TRANSFER_ALLOWED(msg
->width
, msg
->height
))
400 /* RAM->CPU->GART GART->GPU->VRAM */
403 ObtainSemaphore(&carddata
->gartsemaphore
);
405 result
= HiddNouveauNVAccelUploadM2MF(
406 msg
->pixels
, msg
->modulo
, msg
->pixFmt
,
407 msg
->x
, msg
->y
, msg
->width
, msg
->height
,
410 ReleaseSemaphore(&carddata
->gartsemaphore
);
428 /* Calculate destination buffer pointer */
429 dstBuff
= (APTR
)((IPTR
)bmdata
->bo
->map
+ (msg
->y
* bmdata
->pitch
) + (msg
->x
* bmdata
->bytesperpixel
));
431 HiddNouveauWriteFromRAM(
432 msg
->pixels
, msg
->modulo
, msg
->pixFmt
,
433 dstBuff
, bmdata
->pitch
,
434 msg
->width
, msg
->height
,
443 VOID
METHOD(NouveauBitMap
, Hidd_BitMap
, GetImage
)
445 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
446 struct CardData
* carddata
= &(SD(cl
)->carddata
);
452 /* For larger transfers use GART */
453 if (GART_TRANSFER_ALLOWED(msg
->width
, msg
->height
))
457 /* VRAM->CPU->GART GART->GPU->RAM */
460 ObtainSemaphore(&carddata
->gartsemaphore
);
462 result
= HiddNouveauNVAccelDownloadM2MF(
463 msg
->pixels
, msg
->modulo
, msg
->pixFmt
,
464 msg
->x
, msg
->y
, msg
->width
, msg
->height
,
467 ReleaseSemaphore(&carddata
->gartsemaphore
);
485 /* Calculate source buffer pointer */
486 srcBuff
= (APTR
)((IPTR
)bmdata
->bo
->map
+ (msg
->y
* bmdata
->pitch
) + (msg
->x
* bmdata
->bytesperpixel
));
488 HiddNouveauReadIntoRAM(
489 srcBuff
, bmdata
->pitch
,
490 msg
->pixels
, msg
->modulo
, msg
->pixFmt
,
491 msg
->width
, msg
->height
,
499 VOID
METHOD(NouveauBitMap
, Hidd_BitMap
, PutAlphaImage
)
501 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
502 struct CardData
* carddata
= &(SD(cl
)->carddata
);
507 /* Try hardware method NV10-NV40*/
509 ((carddata
->architecture
>= NV_ARCH_10
) && (carddata
->architecture
<= NV_ARCH_40
))
511 && (bmdata
->bytesperpixel
> 1)
512 && (GART_TRANSFER_ALLOWED(msg
->width
, msg
->height
)))
516 /* RAM->CPU->GART GART->GPU->VRAM */
519 ObtainSemaphore(&carddata
->gartsemaphore
);
521 result
= HiddNouveauAccelARGBUpload3D(
522 msg
->pixels
, msg
->modulo
,
523 msg
->x
, msg
->y
, msg
->width
, msg
->height
,
526 ReleaseSemaphore(&carddata
->gartsemaphore
);
530 MAP_BUFFER
; /* FIXME: This is needed to flush execution buffer, atrifact otherwise */
537 /* Try optimization for NV50 */
539 (carddata
->architecture
>= NV_ARCH_50
)
541 && (bmdata
->bytesperpixel
> 1)
542 && (GART_TRANSFER_ALLOWED(msg
->width
, msg
->height
)))
544 /* Hardware method is not currently possible for NV50 as the implementation
545 relies on tiled bitmaps. AROS uses linear bitmaps for all card families.
546 The optimization in this case is to use base class implementation,
547 which does GetImage->Process->PutImage. Since all NV50 cards are
548 PCI-E based, the greatest limiting factor - VRAM->RAM download
549 speed - is not a problem (1.1 Gbps on my GF8300). This approach is
550 actually faster than "per-pixel" functions below by order of 10. */
552 OOP_DoSuperMethod(cl
, o
, (OOP_Msg
)msg
);
558 /* Fallback to software method */
559 switch(bmdata
->bytesperpixel
)
569 HIDDNouveauBitMapPutAlphaImage16(bmdata
, msg
->pixels
, msg
->modulo
, msg
->x
,
570 msg
->y
, msg
->width
, msg
->height
);
578 HIDDNouveauBitMapPutAlphaImage32(bmdata
, msg
->pixels
, msg
->modulo
, msg
->x
,
579 msg
->y
, msg
->width
, msg
->height
);
582 } /* switch(bmdata->bytesperpixel) */
588 ULONG
METHOD(NouveauBitMap
, Hidd_BitMap
, BytesPerLine
)
590 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
592 return (bmdata
->pitch
);
595 BOOL
METHOD(NouveauBitMap
, Hidd_BitMap
, ObtainDirectAccess
)
597 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
603 *msg
->addressReturn
= (UBYTE
*)bmdata
->bo
->map
;
604 *msg
->widthReturn
= bmdata
->pitch
/ bmdata
->bytesperpixel
;
605 *msg
->heightReturn
= bmdata
->height
;
606 *msg
->bankSizeReturn
= *msg
->memSizeReturn
= bmdata
->pitch
* bmdata
->height
;
611 VOID
METHOD(NouveauBitMap
, Hidd_BitMap
, ReleaseDirectAccess
)
613 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
619 #define COMPLEMENT_JAM2_DECISION_BLOCK \
620 else if (GC_DRMD(msg->gc) == vHidd_GC_DrawMode_Invert) \
622 /* COMPLEMENT - read & write. Base method uses GetImage/PutImage. \
623 It is better to use it, if GetImage is fast(==PCIE) */ \
624 if (GART_TRANSFER_ALLOWED(msg->width, msg->height) && (carddata->IsPCIE)) \
626 OOP_DoSuperMethod(cl, o, (OOP_Msg)msg); \
632 /* JAM2 - only write. Base method uses PutImage. It is \
633 better to use it, if it is accelerated */ \
634 if (GART_TRANSFER_ALLOWED(msg->width, msg->height)) \
636 OOP_DoSuperMethod(cl, o, (OOP_Msg)msg); \
642 VOID METHOD(NouveauBitMap, Hidd_BitMap, PutAlphaTemplate)
644 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
645 struct CardData
* carddata
= &(SD(cl
)->carddata
);
647 /* Select acceleration method based on hardware and buffer size */
648 if (GC_COLEXP(msg
->gc
) == vHidd_GC_ColExp_Transparent
)
650 /* JAM1 - read & write. Base method uses GetImage/PutImage.
651 Use 3D alpha blending where possible */
652 if (GART_TRANSFER_ALLOWED(msg
->width
, msg
->height
))
654 /* These cards support 3D alpha blending */
655 if ((carddata
->architecture
>= NV_ARCH_10
) && (carddata
->architecture
<= NV_ARCH_40
))
659 LONG fg_red
, fg_green
, fg_blue
;
661 HIDD_BM_UnmapPixel(o
, GC_FG(msg
->gc
), &color
);
663 fg_red
= color
.red
>> 8;
664 fg_green
= color
.green
>> 8;
665 fg_blue
= color
.blue
>> 8;
671 ObtainSemaphore(&carddata
->gartsemaphore
);
673 result
= HiddNouveauAccelAPENUpload3D(msg
->alpha
, msg
->invertalpha
,
674 msg
->modulo
, (fg_red
<< 16) | (fg_green
<< 8) | fg_blue
,
675 msg
->x
, msg
->y
, msg
->width
, msg
->height
, cl
, o
);
677 ReleaseSemaphore(&carddata
->gartsemaphore
);
678 MAP_BUFFER
; /* FIXME: This is needed to flush execution buffer, atrifact otherwise */
685 /* These cards don't support 3D alpha blending (yet), but they are all
686 PCIE so GetImage is fast */
687 if (carddata
->architecture
>= NV_ARCH_50
)
689 OOP_DoSuperMethod(cl
, o
, (OOP_Msg
)msg
);
694 COMPLEMENT_JAM2_DECISION_BLOCK
696 /* This is software fallback */
700 switch(bmdata
->bytesperpixel
)
708 HIDDNouveauBitMapPutAlphaTemplate16(bmdata
, msg
->gc
, o
, msg
->invertalpha
,
709 msg
->alpha
, msg
->modulo
, msg
->x
, msg
->y
, msg
->width
, msg
->height
);
715 HIDDNouveauBitMapPutAlphaTemplate32(bmdata
, msg
->gc
, o
, msg
->invertalpha
,
716 msg
->alpha
, msg
->modulo
, msg
->x
, msg
->y
, msg
->width
, msg
->height
);
719 } /* switch(bmdata->bytesperpixel) */
724 VOID
METHOD(NouveauBitMap
, Hidd_BitMap
, PutTemplate
)
726 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
727 struct CardData
* carddata
= &(SD(cl
)->carddata
);
729 /* Select execution method based on hardware and buffer size */
730 if (GC_COLEXP(msg
->gc
) == vHidd_GC_ColExp_Transparent
)
732 /* JAM1 - read & write. Base method uses GetImage/PutImage.
733 Use software fallback. It performs only limited writes and thus it
734 is faster than base method. */
736 COMPLEMENT_JAM2_DECISION_BLOCK
738 /* This is software fallback */
742 switch(bmdata
->bytesperpixel
)
750 struct pHidd_BitMap_PutMemTemplate16 __m
=
752 SD(cl
)->mid_PutMemTemplate16
, msg
->gc
, msg
->masktemplate
, msg
->modulo
,
753 msg
->srcx
, bmdata
->bo
->map
, bmdata
->pitch
, msg
->x
, msg
->y
,
754 msg
->width
, msg
->height
, msg
->inverttemplate
756 OOP_DoMethod(o
, (OOP_Msg
)m
);
762 struct pHidd_BitMap_PutMemTemplate32 __m
=
764 SD(cl
)->mid_PutMemTemplate32
, msg
->gc
, msg
->masktemplate
, msg
->modulo
,
765 msg
->srcx
, bmdata
->bo
->map
, bmdata
->pitch
, msg
->x
, msg
->y
,
766 msg
->width
, msg
->height
, msg
->inverttemplate
768 OOP_DoMethod(o
, (OOP_Msg
)m
);
771 } /* switch(bmdata->bytesperpixel) */
776 VOID
METHOD(NouveauBitMap
, Hidd_BitMap
, PutPattern
)
778 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
779 struct CardData
* carddata
= &(SD(cl
)->carddata
);
781 /* Select execution method based on hardware and buffer size */
782 if (GC_COLEXP(msg
->gc
) == vHidd_GC_ColExp_Transparent
)
784 /* JAM1 - read & write. Base method uses GetImage/PutImage.
785 Use software fallback. It performs only limited writes and thus it
786 is faster than base method. */
788 COMPLEMENT_JAM2_DECISION_BLOCK
790 /* This is software fallback */
794 switch(bmdata
->bytesperpixel
)
802 struct pHidd_BitMap_PutMemPattern16 __m
=
804 SD(cl
)->mid_PutMemPattern16
, msg
->gc
, msg
->pattern
, msg
->patternsrcx
,
805 msg
->patternsrcy
, msg
->patternheight
, msg
->patterndepth
, msg
->patternlut
,
806 msg
->invertpattern
, msg
->mask
, msg
->maskmodulo
, msg
->masksrcx
,
807 bmdata
->bo
->map
, bmdata
->pitch
, msg
->x
, msg
->y
, msg
->width
, msg
->height
809 OOP_DoMethod(o
, (OOP_Msg
)m
);
815 struct pHidd_BitMap_PutMemPattern32 __m
=
817 SD(cl
)->mid_PutMemPattern32
, msg
->gc
, msg
->pattern
, msg
->patternsrcx
,
818 msg
->patternsrcy
, msg
->patternheight
, msg
->patterndepth
, msg
->patternlut
,
819 msg
->invertpattern
, msg
->mask
, msg
->maskmodulo
, msg
->masksrcx
,
820 bmdata
->bo
->map
, bmdata
->pitch
, msg
->x
,msg
->y
, msg
->width
,
823 OOP_DoMethod(o
, (OOP_Msg
)m
);
826 } /* switch(bmdata->bytesperpixel) */
831 VOID
METHOD(NouveauBitMap
, Hidd_BitMap
, DrawLine
)
833 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
837 if ((GC_DRMD(msg
->gc
) == vHidd_GC_DrawMode_Copy
) && (GC_COLMASK(msg
->gc
) == ~0))
841 HIDDNouveauBitMapDrawSolidLine(bmdata
, msg
->gc
, msg
->x1
, msg
->y1
, msg
->x2
, msg
->y2
);
848 OOP_DoSuperMethod(cl
, o
, (OOP_Msg
)msg
);
853 VOID
METHOD(NouveauBitMap
, Hidd_BitMap
, UpdateRect
)
855 struct HIDDNouveauBitMapData
* bmdata
= OOP_INST_DATA(cl
, o
);
857 if (bmdata
->displayable
)
859 struct pHidd_Compositor_BitMapRectChanged brcmsg
=
861 mID
: SD(cl
)->mid_BitMapRectChanged
,
869 OOP_DoMethod(bmdata
->compositor
, (OOP_Msg
)&brcmsg
);