Lines Matching refs:overlay

12 /* define the supported overlay input colorspaces */
26 /* apparantly overlay count should report the number of 'overlay units' on the card */
76 AQUIRE_BEN(si->overlay.lock)
85 if (si->overlay.myBuffer[offset].buffer == NULL) break;
99 si->overlay.myBuffer[offset].width = width;
103 si->overlay.myBuffer[offset].width = (width & ~0x0007) + 8;
105 si->overlay.myBuffer[offset].bytes_per_row = 2 * si->overlay.myBuffer[offset].width;
109 if (si->overlay.myBuffer[offset].width > 2048)
114 RELEASE_BEN(si->overlay.lock)
124 RELEASE_BEN(si->overlay.lock)
131 if (si->overlay.myBuffer[offset].width > 1024)
136 RELEASE_BEN(si->overlay.lock)
146 RELEASE_BEN(si->overlay.lock)
151 /* store slopspace (in pixels) for each bitmap for use by 'overlay unit' (BES) */
152 si->overlay.myBufInfo[offset].slopspace = si->overlay.myBuffer[offset].width - width;
154 si->overlay.myBuffer[offset].space = cs;
155 si->overlay.myBuffer[offset].height = height;
157 /* we define the overlay buffers to reside 'in the back' of the cards RAM */
159 * Beware that an app using overlay needs to track workspace switches and screenprefs
161 * newly created overlay bitmaps, which will be assigned by BeOS automatically after such
167 * and if this happens, it needs to fallback to single buffered overlay or even fallback to
171 * A *positive* side-effect of assigning the first overlay buffer exactly at the end of the
180 * free space: - used for overlay,
187 oldsize = si->overlay.myBufInfo[offset].size;
188 si->overlay.myBufInfo[offset].size =
189 si->overlay.myBuffer[offset].bytes_per_row * si->overlay.myBuffer[offset].height;
198 adress -= si->overlay.myBufInfo[cnt].size;
211 si->overlay.myBufInfo[offset].size += (temp32 - (temp32 & 0xfffffff0));
223 * If you are going to delete a overlay buffer you created, you should delete them *all* and
225 * space in between your overlay buffers for instance, so cardRAM is used 'to the max'.
232 if (si->overlay.myBuffer[cnt].buffer != NULL)
235 if (si->overlay.myBufInfo[offset].size <= oldsize)
239 adress -= (oldsize - si->overlay.myBufInfo[offset].size);
240 si->overlay.myBufInfo[offset].size = oldsize;
253 si->overlay.myBufInfo[offset].size = oldsize;
256 RELEASE_BEN(si->overlay.lock)
264 * (preventing overlap of desktop RAMspace & overlay bitmap RAMspace here) */
271 RELEASE_BEN(si->overlay.lock)
276 si->overlay.myBuffer[offset].buffer = (void *) adress;
284 adress -= si->overlay.myBufInfo[cnt].size;
287 si->overlay.myBuffer[offset].buffer_dma = (void *) adress;
290 (uint32)((uint8*)si->overlay.myBuffer[offset].buffer),
291 (uint32)((uint8*)si->overlay.myBuffer[offset].buffer_dma), cs));
292 LOG(4,("Overlay: New buffer's size is $%08x\n", si->overlay.myBufInfo[offset].size));
295 RELEASE_BEN(si->overlay.lock)
297 return &si->overlay.myBuffer[offset];
305 RELEASE_BEN(si->overlay.lock)
321 if (si->overlay.myBuffer[offset].buffer == ob->buffer) break;
327 si->overlay.myBuffer[offset].buffer = NULL;
328 si->overlay.myBuffer[offset].buffer_dma = NULL;
368 if (si->overlay.myBuffer[offset].buffer == ob->buffer) break;
452 AQUIRE_BEN(si->overlay.lock)
454 /* overlay unit already in use? */
455 if (si->overlay.myToken == NULL)
456 /* overlay unit is available */
460 si->overlay.myToken = &tmpToken;
463 RELEASE_BEN(si->overlay.lock)
465 return si->overlay.myToken;
468 /* sorry, overlay unit is occupied */
473 RELEASE_BEN(si->overlay.lock)
484 if ((ot == NULL) || (si->overlay.myToken == NULL) || (ot != si->overlay.myToken))
499 si->overlay.myToken = NULL;
512 * When a Workspace switch, screen prefs change, or overlay app shutdown occurs, BeOS will
513 * release all overlay buffers. The buffer currently displayed at that moment, may need some
527 * If during overlay use the screen prefs are changed, or the workspace has changed, it
528 * may be that we were not able to re-allocate the requested overlay buffers (or only partly)
536 LOG(4,("no overlay buffer specified\n"));
542 if ((ot == NULL) || (si->overlay.myToken == NULL) || (ot != si->overlay.myToken))
555 if (si->overlay.myBuffer[offset].buffer == ob->buffer) break;