Lines Matching refs:overlay

12 /* define the supported overlay input colorspaces */
28 /* apparantly overlay count should report the number of 'overlay units' on the card */
79 AQUIRE_BEN(si->overlay.lock)
88 if (si->overlay.myBuffer[offset].buffer == NULL) break;
102 si->overlay.myBuffer[offset].width = ((width + 0x000f) & ~0x000f);
109 si->overlay.myBuffer[offset].width = ((width + 0x001f) & ~0x001f);
111 si->overlay.myBuffer[offset].bytes_per_row = 2 * si->overlay.myBuffer[offset].width;
115 if (si->overlay.myBuffer[offset].width > 4088)
120 RELEASE_BEN(si->overlay.lock)
130 RELEASE_BEN(si->overlay.lock)
137 if (si->overlay.myBuffer[offset].width > 1024)
142 RELEASE_BEN(si->overlay.lock)
152 RELEASE_BEN(si->overlay.lock)
157 /* store slopspace (in pixels) for each bitmap for use by 'overlay unit' (BES) */
158 si->overlay.myBufInfo[offset].slopspace = si->overlay.myBuffer[offset].width - width;
160 si->overlay.myBuffer[offset].space = cs;
161 si->overlay.myBuffer[offset].height = height;
163 /* we define the overlay buffers to reside 'in the back' of the cards RAM */
165 * Beware that an app using overlay needs to track workspace switches and screenprefs
167 * newly created overlay bitmaps, which will be assigned by BeOS automatically after such
173 * and if this happens, it needs to fallback to single buffered overlay or even fallback to
177 * A *positive* side-effect of assigning the first overlay buffer exactly at the end of the
192 oldsize = si->overlay.myBufInfo[offset].size;
193 si->overlay.myBufInfo[offset].size =
194 si->overlay.myBuffer[offset].bytes_per_row * si->overlay.myBuffer[offset].height;
199 * that do not have enough cardRAM left for allocation of overlay bitmaps, you need a card with
205 * bitmap output or maybe single buffered overlay output if small bitmaps are used. */
210 adress -= si->overlay.myBufInfo[cnt].size;
223 si->overlay.myBufInfo[offset].size += (temp32 - (temp32 & 0xfffffff0));
235 * If you are going to delete a overlay buffer you created, you should delete them *all* and
237 * space in between your overlay buffers for instance, so cardRAM is used 'to the max'.
244 if (si->overlay.myBuffer[cnt].buffer != NULL)
247 if (si->overlay.myBufInfo[offset].size <= oldsize)
251 adress -= (oldsize - si->overlay.myBufInfo[offset].size);
252 si->overlay.myBufInfo[offset].size = oldsize;
265 si->overlay.myBufInfo[offset].size = oldsize;
268 RELEASE_BEN(si->overlay.lock)
276 * (preventing overlap of desktop RAMspace & overlay bitmap RAMspace here) */
283 RELEASE_BEN(si->overlay.lock)
288 si->overlay.myBuffer[offset].buffer = (void *) adress;
294 adress -= si->overlay.myBufInfo[cnt].size;
297 si->overlay.myBuffer[offset].buffer_dma = (void *) adress;
300 (uint32)((uint8*)si->overlay.myBuffer[offset].buffer),
301 (uint32)((uint8*)si->overlay.myBuffer[offset].buffer_dma), cs));
302 LOG(4,("Overlay: New buffer's size is $%08x\n", si->overlay.myBufInfo[offset].size));
305 RELEASE_BEN(si->overlay.lock)
307 return &si->overlay.myBuffer[offset];
315 RELEASE_BEN(si->overlay.lock)
331 if (si->overlay.myBuffer[offset].buffer == ob->buffer) break;
337 si->overlay.myBuffer[offset].buffer = NULL;
338 si->overlay.myBuffer[offset].buffer_dma = NULL;
378 if (si->overlay.myBuffer[offset].buffer == ob->buffer) break;
489 AQUIRE_BEN(si->overlay.lock)
491 /* overlay unit already in use? */
492 if (si->overlay.myToken == NULL)
493 /* overlay unit is available */
497 si->overlay.myToken = &tmpToken;
500 RELEASE_BEN(si->overlay.lock)
502 return si->overlay.myToken;
505 /* sorry, overlay unit is occupied */
510 RELEASE_BEN(si->overlay.lock)
521 if ((ot == NULL) || (si->overlay.myToken == NULL) || (ot != si->overlay.myToken))
536 si->overlay.myToken = NULL;
549 * When a Workspace switch, screen prefs change, or overlay app shutdown occurs, BeOS will
550 * release all overlay buffers. The buffer currently displayed at that moment, may need some
564 * If during overlay use the screen prefs are changed, or the workspace has changed, it
565 * may be that we were not able to re-allocate the requested overlay buffers (or only partly)
573 LOG(4,("no overlay buffer specified\n"));
579 if ((ot == NULL) || (si->overlay.myToken == NULL) || (ot != si->overlay.myToken))
592 if (si->overlay.myBuffer[offset].buffer == ob->buffer) break;
599 /* program overlay hardware */