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 */
78 AQUIRE_BEN(si->overlay.lock)
87 if (si->overlay.myBuffer[offset].buffer == NULL) break;
99 si->overlay.myBuffer[offset].width = ((width + 0x0007) & ~0x0007);
100 si->overlay.myBuffer[offset].bytes_per_row = 2 * si->overlay.myBuffer[offset].width;
104 if (si->overlay.myBuffer[offset].width > 4088)
109 RELEASE_BEN(si->overlay.lock)
119 RELEASE_BEN(si->overlay.lock)
126 if (si->overlay.myBuffer[offset].width > 1024)
131 RELEASE_BEN(si->overlay.lock)
141 RELEASE_BEN(si->overlay.lock)
146 /* store slopspace (in pixels) for each bitmap for use by 'overlay unit' (BES) */
147 si->overlay.myBufInfo[offset].slopspace = si->overlay.myBuffer[offset].width - width;
149 si->overlay.myBuffer[offset].space = cs;
150 si->overlay.myBuffer[offset].height = height;
152 /* we define the overlay buffers to reside 'in the back' of the cards RAM */
154 * Beware that an app using overlay needs to track workspace switches and screenprefs
156 * newly created overlay bitmaps, which will be assigned by BeOS automatically after such
162 * and if this happens, it needs to fallback to single buffered overlay or even fallback to
166 * A *positive* side-effect of assigning the first overlay buffer exactly at the end of the
181 oldsize = si->overlay.myBufInfo[offset].size;
182 si->overlay.myBufInfo[offset].size =
183 si->overlay.myBuffer[offset].bytes_per_row * si->overlay.myBuffer[offset].height;
188 * that do not have enough cardRAM left for allocation of overlay bitmaps, you need a card with
194 * bitmap output or maybe single buffered overlay output if small bitmaps are used. */
199 adress -= si->overlay.myBufInfo[cnt].size;
212 si->overlay.myBufInfo[offset].size += (temp32 - (temp32 & 0xfffffff0));
224 * If you are going to delete a overlay buffer you created, you should delete them *all* and
226 * space in between your overlay buffers for instance, so cardRAM is used 'to the max'.
233 if (si->overlay.myBuffer[cnt].buffer != NULL)
236 if (si->overlay.myBufInfo[offset].size <= oldsize)
240 adress -= (oldsize - si->overlay.myBufInfo[offset].size);
241 si->overlay.myBufInfo[offset].size = oldsize;
254 si->overlay.myBufInfo[offset].size = oldsize;
257 RELEASE_BEN(si->overlay.lock)
265 * (preventing overlap of desktop RAMspace & overlay bitmap RAMspace here) */
272 RELEASE_BEN(si->overlay.lock)
277 si->overlay.myBuffer[offset].buffer = (void *) adress;
283 adress -= si->overlay.myBufInfo[cnt].size;
286 si->overlay.myBuffer[offset].buffer_dma = (void *) adress;
289 (uint8*)si->overlay.myBuffer[offset].buffer,
290 (uint8*)si->overlay.myBuffer[offset].buffer_dma, cs));
291 LOG(4,("Overlay: New buffer's size is $%08x\n", si->overlay.myBufInfo[offset].size));
294 RELEASE_BEN(si->overlay.lock)
296 return &si->overlay.myBuffer[offset];
304 RELEASE_BEN(si->overlay.lock)
320 if (si->overlay.myBuffer[offset].buffer == ob->buffer) break;
326 si->overlay.myBuffer[offset].buffer = NULL;
327 si->overlay.myBuffer[offset].buffer_dma = NULL;
367 if (si->overlay.myBuffer[offset].buffer == ob->buffer) break;
451 AQUIRE_BEN(si->overlay.lock)
453 /* overlay unit already in use? */
454 if (si->overlay.myToken == NULL)
455 /* overlay unit is available */
459 si->overlay.myToken = &tmpToken;
462 RELEASE_BEN(si->overlay.lock)
464 return si->overlay.myToken;
467 /* sorry, overlay unit is occupied */
472 RELEASE_BEN(si->overlay.lock)
483 if ((ot == NULL) || (si->overlay.myToken == NULL) || (ot != si->overlay.myToken))
498 si->overlay.myToken = NULL;
511 * When a Workspace switch, screen prefs change, or overlay app shutdown occurs, BeOS will
512 * release all overlay buffers. The buffer currently displayed at that moment, may need some
526 * If during overlay use the screen prefs are changed, or the workspace has changed, it
527 * may be that we were not able to re-allocate the requested overlay buffers (or only partly)
535 LOG(4,("no overlay buffer specified\n"));
541 if ((ot == NULL) || (si->overlay.myToken == NULL) || (ot != si->overlay.myToken))
554 if (si->overlay.myBuffer[offset].buffer == ob->buffer) break;
561 /* program overlay hardware */