Lines Matching defs:drawable

153    ac->drawable = NULL;
249 fprintf(stderr, "error: while clearing drawable!\n");
260 if (ac->drawable) {
261 ac->drawable->destroy(ac->drawable);
285 GLXDrawable drawable)
294 apple_glx_diagnostic("%s: oldac %p ac %p drawable 0x%lx\n",
295 __func__, (void *) oldac, (void *) ac, drawable);
304 if (ac && ac->drawable && ac->drawable->drawable == drawable) {
322 if (oldac->drawable) {
323 oldac->drawable->destroy(oldac->drawable);
324 oldac->drawable = NULL;
334 if (None == drawable) {
337 /* Clear the current drawable for this context_obj. */
345 if (ac->drawable) {
346 ac->drawable->destroy(ac->drawable);
347 ac->drawable = NULL;
353 apple_glx_diagnostic("%s: drawable is None, error is: %d\n",
359 /* This is an optimisation to avoid searching for the current drawable. */
360 if (ac->drawable && ac->drawable->drawable == drawable) {
361 newagd = ac->drawable;
364 /* Find the drawable if possible, and retain a reference to it. */
366 apple_glx_drawable_find(drawable, APPLE_GLX_DRAWABLE_REFERENCE);
370 * Try to destroy the old drawable, so long as the new one
373 if (ac->drawable && !same_drawable) {
374 ac->drawable->destroy(ac->drawable);
375 ac->drawable = NULL;
379 if (apple_glx_surface_create(dpy, ac->screen, drawable, &newagd))
382 /* The drawable is referenced once by apple_glx_surface_create. */
405 /* Save the new drawable with the context structure. */
406 ac->drawable = newagd;
409 /* We are reusing an existing drawable structure. */
412 assert(ac->drawable == newagd);
416 ac->drawable = newagd;
421 * Avoid this costly path if this is the same drawable and the
441 assert(NULL != ac->drawable);
448 switch (ac->drawable->type) {
452 if (ac->drawable->callbacks.make_current) {
453 if (ac->drawable->callbacks.make_current(ac, ac->drawable))
459 fprintf(stderr, "internal error: invalid drawable type: %d\n",
460 ac->drawable->type);
468 apple_glx_is_current_drawable(Display * dpy, void *ptr, GLXDrawable drawable)
472 if (ac->drawable && ac->drawable->drawable == drawable) {
475 else if (NULL == ac->drawable && None != ac->last_surface_window) {
478 return (ac->drawable && ac->drawable->drawable == drawable);
537 if (ac->drawable && APPLE_GLX_DRAWABLE_SURFACE == ac->drawable->type
538 && ac->drawable->types.surface.uid == uid) {
563 if (NULL == ac->drawable && None != ac->last_surface_window) {
566 /* Attempt to recreate the surface for a destroyed drawable. */
581 if (ac->drawable && APPLE_GLX_DRAWABLE_SURFACE == ac->drawable->type
582 && ac->drawable->types.surface.pending_destroy) {
583 apple_glx_diagnostic("%s: clearing drawable %p\n", __func__, ptr);
586 if (ac->drawable) {
589 apple_glx_diagnostic("%s: attempting to destroy drawable %p\n",
591 apple_glx_diagnostic("%s: ac->drawable->drawable is 0x%lx\n",
592 __func__, ac->drawable->drawable);
594 d = ac->drawable;
596 ac->last_surface_window = d->drawable;
598 ac->drawable = NULL;
601 * This will destroy the surface drawable if there are