VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/context.c@ 48999

Last change on this file since 48999 was 48999, checked in by vboxsync, 12 years ago

wddm: ensure all windows are initially hidden

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 40.9 KB
Line 
1/* Copyright (c) 2001, Stanford University
2 * All rights reserved
3 *
4 * See the file LICENSE.txt for information on redistributing this software.
5 */
6
7/**
8 * \mainpage OpenGL_stub
9 *
10 * \section OpenGL_stubIntroduction Introduction
11 *
12 * Chromium consists of all the top-level files in the cr
13 * directory. The OpenGL_stub module basically takes care of API dispatch,
14 * and OpenGL state management.
15 *
16 */
17
18/**
19 * This file manages OpenGL rendering contexts in the faker library.
20 * The big issue is switching between Chromium and native GL context
21 * management. This is where we support multiple client OpenGL
22 * windows. Typically, one window is handled by Chromium while any
23 * other windows are handled by the native OpenGL library.
24 */
25
26#include "chromium.h"
27#include "cr_error.h"
28#include "cr_spu.h"
29#include "cr_mem.h"
30#include "cr_string.h"
31#include "cr_environment.h"
32#include "stub.h"
33
34/**
35 * This function should be called from MakeCurrent(). It'll detect if
36 * we're in a multi-thread situation, and do the right thing for dispatch.
37 */
38#ifdef CHROMIUM_THREADSAFE
39 static void
40stubCheckMultithread( void )
41{
42 static unsigned long knownID;
43 static GLboolean firstCall = GL_TRUE;
44
45 if (stub.threadSafe)
46 return; /* nothing new, nothing to do */
47
48 if (firstCall) {
49 knownID = crThreadID();
50 firstCall = GL_FALSE;
51 }
52 else if (knownID != crThreadID()) {
53 /* going thread-safe now! */
54 stub.threadSafe = GL_TRUE;
55 crSPUCopyDispatchTable(&glim, &stubThreadsafeDispatch);
56 }
57}
58#endif
59
60
61/**
62 * Install the given dispatch table as the table used for all gl* calls.
63 */
64 static void
65stubSetDispatch( SPUDispatchTable *table )
66{
67 CRASSERT(table);
68
69#ifdef CHROMIUM_THREADSAFE
70 /* always set the per-thread dispatch pointer */
71 crSetTSD(&stub.dispatchTSD, (void *) table);
72 if (stub.threadSafe) {
73 /* Do nothing - the thread-safe dispatch functions will call GetTSD()
74 * to get a pointer to the dispatch table, and jump through it.
75 */
76 }
77 else
78#endif
79 {
80 /* Single thread mode - just install the caller's dispatch table */
81 /* This conditional is an optimization to try to avoid unnecessary
82 * copying. It seems to work with atlantis, multiwin, etc. but
83 * _could_ be a problem. (Brian)
84 */
85 if (glim.copy_of != table->copy_of)
86 crSPUCopyDispatchTable(&glim, table);
87 }
88}
89
90void stubForcedFlush(GLint con)
91{
92#if 0
93 GLint buffer;
94 stub.spu->dispatch_table.GetIntegerv(GL_DRAW_BUFFER, &buffer);
95 stub.spu->dispatch_table.DrawBuffer(GL_FRONT);
96 stub.spu->dispatch_table.Flush();
97 stub.spu->dispatch_table.DrawBuffer(buffer);
98#else
99 if (con)
100 {
101 stub.spu->dispatch_table.VBoxConFlush(con);
102 }
103 else
104 {
105 stub.spu->dispatch_table.Flush();
106 }
107#endif
108}
109
110void stubConChromiumParameteriCR(GLint con, GLenum param, GLint value)
111{
112 if (con)
113 stub.spu->dispatch_table.VBoxConChromiumParameteriCR(con, param, value);
114 else
115 crError("VBoxConChromiumParameteriCR called with null connection");
116}
117
118void stubConFlush(GLint con)
119{
120 if (con)
121 stub.spu->dispatch_table.VBoxConFlush(con);
122 else
123 crError("stubConFlush called with null connection");
124}
125
126static void stubWindowCleanupForContextsCB(unsigned long key, void *data1, void *data2)
127{
128 ContextInfo *context = (ContextInfo *) data1;
129
130 CRASSERT(context);
131
132 if (context->currentDrawable == data2)
133 context->currentDrawable = NULL;
134}
135
136void stubDestroyWindow( GLint con, GLint window )
137{
138 WindowInfo *winInfo = (WindowInfo *)
139 crHashtableSearch(stub.windowTable, (unsigned int) window);
140 if (winInfo && winInfo->type == CHROMIUM && stub.spu)
141 {
142 crHashtableLock(stub.windowTable);
143
144 stub.spu->dispatch_table.VBoxWindowDestroy(con, winInfo->spuWindow );
145
146#ifdef WINDOWS
147 if (winInfo->hVisibleRegion != INVALID_HANDLE_VALUE)
148 {
149 DeleteObject(winInfo->hVisibleRegion);
150 }
151#elif defined(GLX)
152 if (winInfo->pVisibleRegions)
153 {
154 XFree(winInfo->pVisibleRegions);
155 }
156# ifdef CR_NEWWINTRACK
157 if (winInfo->syncDpy)
158 {
159 XCloseDisplay(winInfo->syncDpy);
160 }
161# endif
162#endif
163
164 stubForcedFlush(con);
165
166 crHashtableWalk(stub.contextTable, stubWindowCleanupForContextsCB, winInfo);
167
168 crHashtableDelete(stub.windowTable, window, crFree);
169
170 crHashtableUnlock(stub.windowTable);
171 }
172}
173
174/**
175 * Create a new _Chromium_ window, not GLX, WGL or CGL.
176 * Called by crWindowCreate() only.
177 */
178 GLint
179stubNewWindow( const char *dpyName, GLint visBits )
180{
181 WindowInfo *winInfo;
182 GLint spuWin, size[2];
183
184 spuWin = stub.spu->dispatch_table.WindowCreate( dpyName, visBits );
185 if (spuWin < 0) {
186 return -1;
187 }
188
189 winInfo = (WindowInfo *) crCalloc(sizeof(WindowInfo));
190 if (!winInfo) {
191 stub.spu->dispatch_table.WindowDestroy(spuWin);
192 return -1;
193 }
194
195 winInfo->type = CHROMIUM;
196
197 /* Ask the head SPU for the initial window size */
198 size[0] = size[1] = 0;
199 stub.spu->dispatch_table.GetChromiumParametervCR(GL_WINDOW_SIZE_CR, 0, GL_INT, 2, size);
200 if (size[0] == 0 && size[1] == 0) {
201 /* use some reasonable defaults */
202 size[0] = size[1] = 512;
203 }
204 winInfo->width = size[0];
205 winInfo->height = size[1];
206#ifdef VBOX_WITH_WDDM
207 if (stub.bRunningUnderWDDM)
208 {
209 crError("Should not be here: WindowCreate/Destroy & VBoxPackGetInjectID require connection id!");
210 winInfo->mapped = 0;
211 }
212 else
213#endif
214 {
215 winInfo->mapped = 1;
216 }
217
218 if (!dpyName)
219 dpyName = "";
220
221 crStrncpy(winInfo->dpyName, dpyName, MAX_DPY_NAME);
222 winInfo->dpyName[MAX_DPY_NAME-1] = 0;
223
224 /* Use spuWin as the hash table index and GLX/WGL handle */
225#ifdef WINDOWS
226 winInfo->drawable = (HDC) spuWin;
227 winInfo->hVisibleRegion = INVALID_HANDLE_VALUE;
228#elif defined(Darwin)
229 winInfo->drawable = (CGSWindowID) spuWin;
230#elif defined(GLX)
231 winInfo->drawable = (GLXDrawable) spuWin;
232 winInfo->pVisibleRegions = NULL;
233 winInfo->cVisibleRegions = 0;
234#endif
235#ifdef CR_NEWWINTRACK
236 winInfo->u32ClientID = stub.spu->dispatch_table.VBoxPackGetInjectID(0);
237#endif
238 winInfo->spuWindow = spuWin;
239
240 crHashtableAdd(stub.windowTable, (unsigned int) spuWin, winInfo);
241
242 return spuWin;
243}
244
245#ifdef GLX
246static XErrorHandler oldErrorHandler;
247static unsigned char lastXError = Success;
248
249static int
250errorHandler (Display *dpy, XErrorEvent *e)
251{
252 lastXError = e->error_code;
253 return 0;
254}
255#endif
256
257GLboolean
258stubIsWindowVisible(WindowInfo *win)
259{
260#if defined(WINDOWS)
261# ifdef VBOX_WITH_WDDM
262 if (stub.bRunningUnderWDDM)
263 return win->mapped;
264# endif
265 return GL_TRUE;
266#elif defined(Darwin)
267 return GL_TRUE;
268#elif defined(GLX)
269 Display *dpy = stubGetWindowDisplay(win);
270 if (dpy)
271 {
272 XWindowAttributes attr;
273 XLOCK(dpy);
274 XGetWindowAttributes(dpy, win->drawable, &attr);
275 XUNLOCK(dpy);
276
277 if (attr.map_state == IsUnmapped)
278 {
279 return GL_FALSE;
280 }
281# if 1
282 return GL_TRUE;
283# else
284 if (attr.override_redirect)
285 {
286 return GL_TRUE;
287 }
288
289 if (!stub.bXExtensionsChecked)
290 {
291 stubCheckXExtensions(win);
292 }
293
294 if (!stub.bHaveXComposite)
295 {
296 return GL_TRUE;
297 }
298 else
299 {
300 Pixmap p;
301
302 crLockMutex(&stub.mutex);
303
304 XLOCK(dpy);
305 XSync(dpy, false);
306 oldErrorHandler = XSetErrorHandler(errorHandler);
307 /*@todo this will create new pixmap for window every call*/
308 p = XCompositeNameWindowPixmap(dpy, win->drawable);
309 XSync(dpy, false);
310 XSetErrorHandler(oldErrorHandler);
311 XUNLOCK(dpy);
312
313 switch (lastXError)
314 {
315 case Success:
316 XFreePixmap(dpy, p);
317 crUnlockMutex(&stub.mutex);
318 return GL_FALSE;
319 break;
320 case BadMatch:
321 /*Window isn't redirected*/
322 lastXError = Success;
323 break;
324 default:
325 crWarning("Unexpected XError %i", (int)lastXError);
326 lastXError = Success;
327 }
328
329 crUnlockMutex(&stub.mutex);
330
331 return GL_TRUE;
332 }
333# endif
334 }
335 else {
336 /* probably created by crWindowCreate() */
337 return win->mapped;
338 }
339#endif
340}
341
342
343/**
344 * Given a Windows HDC or GLX Drawable, return the corresponding
345 * WindowInfo structure. Create a new one if needed.
346 */
347WindowInfo *
348#ifdef WINDOWS
349 stubGetWindowInfo( HDC drawable )
350#elif defined(Darwin)
351 stubGetWindowInfo( CGSWindowID drawable )
352#elif defined(GLX)
353stubGetWindowInfo( Display *dpy, GLXDrawable drawable )
354#endif
355{
356#ifndef WINDOWS
357 WindowInfo *winInfo = (WindowInfo *) crHashtableSearch(stub.windowTable, (unsigned int) drawable);
358#else
359 WindowInfo *winInfo;
360 HWND hwnd;
361 hwnd = WindowFromDC(drawable);
362
363 if (!hwnd)
364 {
365 return NULL;
366 }
367
368 winInfo = (WindowInfo *) crHashtableSearch(stub.windowTable, (unsigned int) hwnd);
369#endif
370 if (!winInfo) {
371 winInfo = (WindowInfo *) crCalloc(sizeof(WindowInfo));
372 if (!winInfo)
373 return NULL;
374#ifdef GLX
375 crStrncpy(winInfo->dpyName, DisplayString(dpy), MAX_DPY_NAME);
376 winInfo->dpyName[MAX_DPY_NAME-1] = 0;
377 winInfo->dpy = dpy;
378 winInfo->pVisibleRegions = NULL;
379#elif defined(Darwin)
380 winInfo->connection = _CGSDefaultConnection(); // store our connection as default
381#elif defined(WINDOWS)
382 winInfo->hVisibleRegion = INVALID_HANDLE_VALUE;
383 winInfo->hWnd = hwnd;
384#endif
385 winInfo->drawable = drawable;
386 winInfo->type = UNDECIDED;
387 winInfo->spuWindow = -1;
388#ifdef VBOX_WITH_WDDM
389 if (stub.bRunningUnderWDDM)
390 winInfo->mapped = 0;
391 else
392#endif
393 {
394 winInfo->mapped = -1; /* don't know */
395 }
396 winInfo->pOwner = NULL;
397#ifdef CR_NEWWINTRACK
398 winInfo->u32ClientID = -1;
399#endif
400#ifndef WINDOWS
401 crHashtableAdd(stub.windowTable, (unsigned int) drawable, winInfo);
402#else
403 crHashtableAdd(stub.windowTable, (unsigned int) hwnd, winInfo);
404#endif
405 }
406#ifdef WINDOWS
407 else
408 {
409 winInfo->drawable = drawable;
410 }
411#endif
412 return winInfo;
413}
414
415static void stubWindowCheckOwnerCB(unsigned long key, void *data1, void *data2);
416
417static void
418stubContextFree( ContextInfo *context )
419{
420 crMemZero(context, sizeof(ContextInfo)); /* just to be safe */
421 crFree(context);
422}
423
424static void
425stubDestroyContextLocked( ContextInfo *context )
426{
427 unsigned long contextId = context->id;
428 if (context->type == NATIVE) {
429#ifdef WINDOWS
430 stub.wsInterface.wglDeleteContext( context->hglrc );
431#elif defined(Darwin)
432 stub.wsInterface.CGLDestroyContext( context->cglc );
433#elif defined(GLX)
434 stub.wsInterface.glXDestroyContext( context->dpy, context->glxContext );
435#endif
436 }
437 else if (context->type == CHROMIUM) {
438 /* Have pack SPU or tilesort SPU, etc. destroy the context */
439 CRASSERT(context->spuContext >= 0);
440 stub.spu->dispatch_table.DestroyContext( context->spuContext );
441 crHashtableWalk(stub.windowTable, stubWindowCheckOwnerCB, context);
442#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
443 if (context->spuConnection)
444 {
445 stub.spu->dispatch_table.VBoxConDestroy(context->spuConnection);
446 context->spuConnection = 0;
447 }
448#endif
449 }
450
451#ifdef GLX
452 crFreeHashtable(context->pGLXPixmapsHash, crFree);
453 if (context->damageDpy)
454 {
455 XCloseDisplay(context->damageDpy);
456 }
457#endif
458
459 crHashtableDelete(stub.contextTable, contextId, NULL);
460}
461
462#ifdef CHROMIUM_THREADSAFE
463static DECLCALLBACK(void) stubContextDtor(void*pvContext)
464{
465 stubContextFree((ContextInfo*)pvContext);
466}
467#endif
468
469/**
470 * Allocate a new ContextInfo object, initialize it, put it into the
471 * context hash table. If type==CHROMIUM, call the head SPU's
472 * CreateContext() function too.
473 */
474 ContextInfo *
475stubNewContext( const char *dpyName, GLint visBits, ContextType type,
476 unsigned long shareCtx
477#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
478 , struct VBOXUHGSMI *pHgsmi
479#endif
480 )
481{
482 GLint spuContext = -1, spuShareCtx = 0, spuConnection = 0;
483 ContextInfo *context;
484
485 if (shareCtx > 0) {
486 /* translate shareCtx to a SPU context ID */
487 context = (ContextInfo *)
488 crHashtableSearch(stub.contextTable, shareCtx);
489 if (context)
490 spuShareCtx = context->spuContext;
491 }
492
493 if (type == CHROMIUM) {
494#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
495 if (pHgsmi)
496 {
497 spuConnection = stub.spu->dispatch_table.VBoxConCreate(pHgsmi);
498 if (!spuConnection)
499 {
500 crWarning("VBoxConCreate failed");
501 return NULL;
502 }
503 }
504#endif
505 spuContext
506 = stub.spu->dispatch_table.VBoxCreateContext(spuConnection, dpyName, visBits, spuShareCtx);
507 if (spuContext < 0)
508 {
509 crWarning("VBoxCreateContext failed");
510#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
511 if (spuConnection)
512 stub.spu->dispatch_table.VBoxConDestroy(spuConnection);
513#endif
514 return NULL;
515 }
516 }
517
518 context = crCalloc(sizeof(ContextInfo));
519 if (!context) {
520 stub.spu->dispatch_table.DestroyContext(spuContext);
521#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
522 if (spuConnection)
523 stub.spu->dispatch_table.VBoxConDestroy(spuConnection);
524#endif
525 return NULL;
526 }
527
528 if (!dpyName)
529 dpyName = "";
530
531 context->id = stub.freeContextNumber++;
532 context->type = type;
533 context->spuContext = spuContext;
534 context->visBits = visBits;
535 context->currentDrawable = NULL;
536 crStrncpy(context->dpyName, dpyName, MAX_DPY_NAME);
537 context->dpyName[MAX_DPY_NAME-1] = 0;
538
539#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
540 context->spuConnection = spuConnection;
541 context->pHgsmi = pHgsmi;
542#endif
543
544#ifdef CHROMIUM_THREADSAFE
545 VBoxTlsRefInit(context, stubContextDtor);
546#endif
547
548#if defined(GLX) || defined(DARWIN)
549 context->share = (ContextInfo *)
550 crHashtableSearch(stub.contextTable, (unsigned long) shareCtx);
551#endif
552
553#ifdef GLX
554 context->pGLXPixmapsHash = crAllocHashtable();
555 context->damageInitFailed = GL_FALSE;
556 context->damageDpy = NULL;
557 context->damageEventsBase = 0;
558#endif
559
560 crHashtableAdd(stub.contextTable, context->id, (void *) context);
561
562 return context;
563}
564
565
566#ifdef Darwin
567
568#define SET_ATTR(l,i,a) ( (l)[(i)++] = (a) )
569#define SET_ATTR_V(l,i,a,v) ( SET_ATTR(l,i,a), SET_ATTR(l,i,v) )
570
571void stubSetPFA( ContextInfo *ctx, CGLPixelFormatAttribute *attribs, int size, GLint *num ) {
572 GLuint visual = ctx->visBits;
573 int i = 0;
574
575 CRASSERT(visual & CR_RGB_BIT);
576
577 SET_ATTR_V(attribs, i, kCGLPFAColorSize, 8);
578
579 if( visual & CR_DEPTH_BIT )
580 SET_ATTR_V(attribs, i, kCGLPFADepthSize, 16);
581
582 if( visual & CR_ACCUM_BIT )
583 SET_ATTR_V(attribs, i, kCGLPFAAccumSize, 1);
584
585 if( visual & CR_STENCIL_BIT )
586 SET_ATTR_V(attribs, i, kCGLPFAStencilSize, 1);
587
588 if( visual & CR_ALPHA_BIT )
589 SET_ATTR_V(attribs, i, kCGLPFAAlphaSize, 1);
590
591 if( visual & CR_DOUBLE_BIT )
592 SET_ATTR(attribs, i, kCGLPFADoubleBuffer);
593
594 if( visual & CR_STEREO_BIT )
595 SET_ATTR(attribs, i, kCGLPFAStereo);
596
597/* SET_ATTR_V(attribs, i, kCGLPFASampleBuffers, 1);
598 SET_ATTR_V(attribs, i, kCGLPFASamples, 0);
599 SET_ATTR_V(attribs, i, kCGLPFADisplayMask, 0); */
600 SET_ATTR(attribs, i, kCGLPFABackingStore);
601 SET_ATTR(attribs, i, kCGLPFAWindow);
602 SET_ATTR_V(attribs, i, kCGLPFADisplayMask, ctx->disp_mask);
603
604 SET_ATTR(attribs, i, 0);
605
606 *num = i;
607}
608
609#endif
610
611/**
612 * This creates a native GLX/WGL context.
613 */
614static GLboolean
615InstantiateNativeContext( WindowInfo *window, ContextInfo *context )
616{
617#ifdef WINDOWS
618 context->hglrc = stub.wsInterface.wglCreateContext( window->drawable );
619 return context->hglrc ? GL_TRUE : GL_FALSE;
620#elif defined(Darwin)
621 CGLContextObj shareCtx = NULL;
622 CGLPixelFormatObj pix;
623 long npix;
624
625 CGLPixelFormatAttribute attribs[16];
626 GLint ind = 0;
627
628 if( context->share ) {
629 if( context->cglc != context->share->cglc ) {
630 crWarning("CGLCreateContext() is trying to share a non-existant "
631 "CGL context. Setting share context to zero.");
632 shareCtx = 0;
633 }
634 else
635 shareCtx = context->cglc;
636 }
637
638 stubSetPFA( context, attribs, 16, &ind );
639
640 stub.wsInterface.CGLChoosePixelFormat( attribs, &pix, &npix );
641 stub.wsInterface.CGLCreateContext( pix, shareCtx, &context->cglc );
642 if( !context->cglc )
643 crError("InstantiateNativeContext: Couldn't Create the context!");
644
645 stub.wsInterface.CGLDestroyPixelFormat( pix );
646
647 if( context->parambits ) {
648 /* Set the delayed parameters */
649 if( context->parambits & VISBIT_SWAP_RECT )
650 stub.wsInterface.CGLSetParameter( context->cglc, kCGLCPSwapRectangle, context->swap_rect );
651
652 if( context->parambits & VISBIT_SWAP_INTERVAL )
653 stub.wsInterface.CGLSetParameter( context->cglc, kCGLCPSwapInterval, &(context->swap_interval) );
654
655 if( context->parambits & VISBIT_CLIENT_STORAGE )
656 stub.wsInterface.CGLSetParameter( context->cglc, kCGLCPClientStorage, (long*)&(context->client_storage) );
657
658 context->parambits = 0;
659 }
660
661 return context->cglc ? GL_TRUE : GL_FALSE;
662#elif defined(GLX)
663 GLXContext shareCtx = 0;
664
665 /* sort out context sharing here */
666 if (context->share) {
667 if (context->glxContext != context->share->glxContext) {
668 crWarning("glXCreateContext() is trying to share a non-existant "
669 "GLX context. Setting share context to zero.");
670 shareCtx = 0;
671 }
672 else {
673 shareCtx = context->glxContext;
674 }
675 }
676
677 context->glxContext = stub.wsInterface.glXCreateContext( window->dpy,
678 context->visual, shareCtx, context->direct );
679
680 return context->glxContext ? GL_TRUE : GL_FALSE;
681#endif
682}
683
684
685/**
686 * Utility functions to get window size and titlebar text.
687 */
688#ifdef WINDOWS
689
690void
691stubGetWindowGeometry(const WindowInfo *window, int *x, int *y,
692 unsigned int *w, unsigned int *h )
693{
694 RECT rect;
695
696 if (!window->drawable || !window->hWnd) {
697 *w = *h = 0;
698 return;
699 }
700
701 if (window->hWnd!=WindowFromDC(window->drawable))
702 {
703 crWarning("Window(%i) DC is no longer valid", window->spuWindow);
704 return;
705 }
706
707 if (!GetClientRect(window->hWnd, &rect))
708 {
709 crWarning("GetClientRect failed for %p", window->hWnd);
710 *w = *h = 0;
711 return;
712 }
713 *w = rect.right - rect.left;
714 *h = rect.bottom - rect.top;
715
716 if (!ClientToScreen( window->hWnd, (LPPOINT) &rect ))
717 {
718 crWarning("ClientToScreen failed for %p", window->hWnd);
719 *w = *h = 0;
720 return;
721 }
722 *x = rect.left;
723 *y = rect.top;
724}
725
726static void
727GetWindowTitle( const WindowInfo *window, char *title )
728{
729 /* XXX - we don't handle recurseUp */
730 if (window->hWnd)
731 GetWindowText(window->hWnd, title, 100);
732 else
733 title[0] = 0;
734}
735
736static void
737GetCursorPosition(WindowInfo *window, int pos[2])
738{
739 RECT rect;
740 POINT point;
741 GLint size[2], x, y;
742 unsigned int NativeHeight, NativeWidth, ChromiumHeight, ChromiumWidth;
743 float WidthRatio, HeightRatio;
744 static int DebugFlag = 0;
745
746 // apparently the "window" parameter passed to this
747 // function contains the native window information
748 HWND NATIVEhwnd = window->hWnd;
749
750 if (NATIVEhwnd!=WindowFromDC(window->drawable))
751 {
752 crWarning("Window(%i) DC is no longer valid", window->spuWindow);
753 return;
754 }
755
756 // get the native window's height and width
757 stubGetWindowGeometry(window, &x, &y, &NativeWidth, &NativeHeight);
758
759 // get the spu window's height and width
760 stub.spu->dispatch_table.GetChromiumParametervCR(GL_WINDOW_SIZE_CR, window->spuWindow, GL_INT, 2, size);
761 ChromiumWidth = size[0];
762 ChromiumHeight = size[1];
763
764 // get the ratio of the size of the native window to the cr window
765 WidthRatio = (float)ChromiumWidth / (float)NativeWidth;
766 HeightRatio = (float)ChromiumHeight / (float)NativeHeight;
767
768 // output some debug information at the beginning
769 if(DebugFlag)
770 {
771 DebugFlag = 0;
772 crDebug("Native Window Handle = %d", NATIVEhwnd);
773 crDebug("Native Width = %i", NativeWidth);
774 crDebug("Native Height = %i", NativeHeight);
775 crDebug("Chromium Width = %i", ChromiumWidth);
776 crDebug("Chromium Height = %i", ChromiumHeight);
777 }
778
779 if (NATIVEhwnd)
780 {
781 GetClientRect( NATIVEhwnd, &rect );
782 GetCursorPos (&point);
783
784 // make sure these coordinates are relative to the native window,
785 // not the whole desktop
786 ScreenToClient(NATIVEhwnd, &point);
787
788 // calculate the new position of the virtual cursor
789 pos[0] = (int)(point.x * WidthRatio);
790 pos[1] = (int)((NativeHeight - point.y) * HeightRatio);
791 }
792 else
793 {
794 pos[0] = 0;
795 pos[1] = 0;
796 }
797}
798
799#elif defined(Darwin)
800
801extern OSStatus CGSGetScreenRectForWindow( CGSConnectionID cid, CGSWindowID wid, float *outRect );
802extern OSStatus CGSGetWindowBounds( CGSConnectionID cid, CGSWindowID wid, float *bounds );
803
804void
805stubGetWindowGeometry( const WindowInfo *window, int *x, int *y, unsigned int *w, unsigned int *h )
806{
807 float rect[4];
808
809 if( !window ||
810 !window->connection ||
811 !window->drawable ||
812 CGSGetWindowBounds( window->connection, window->drawable, rect ) != noErr )
813 {
814 *x = *y = 0;
815 *w = *h = 0;
816 } else {
817 *x = (int) rect[0];
818 *y = (int) rect[1];
819 *w = (int) rect[2];
820 *h = (int) rect[3];
821 }
822}
823
824
825static void
826GetWindowTitle( const WindowInfo *window, char *title )
827{
828 /* XXX \todo Darwin window Title */
829 title[0] = '\0';
830}
831
832
833static void
834GetCursorPosition( const WindowInfo *window, int pos[2] )
835{
836 Point mouse_pos;
837 float window_rect[4];
838
839 GetMouse( &mouse_pos );
840 CGSGetScreenRectForWindow( window->connection, window->drawable, window_rect );
841
842 pos[0] = mouse_pos.h - (int) window_rect[0];
843 pos[1] = (int) window_rect[3] - (mouse_pos.v - (int) window_rect[1]);
844
845 /*crDebug( "%i %i", pos[0], pos[1] );*/
846}
847
848#elif defined(GLX)
849
850void
851stubGetWindowGeometry(WindowInfo *window, int *x, int *y, unsigned int *w, unsigned int *h)
852{
853 Window root, child;
854 unsigned int border, depth;
855 Display *dpy;
856
857 dpy = stubGetWindowDisplay(window);
858
859 //@todo: Performing those checks is expensive operation, especially for simple apps with high FPS.
860 // Disabling those triples glxgears fps, thus using xevents instead of per frame polling is much more preferred.
861 //@todo: Check similar on windows guests, though doubtful as there're no XSync like calls on windows.
862 if (window && dpy)
863 {
864 XLOCK(dpy);
865 }
866
867 if (!window
868 || !dpy
869 || !window->drawable
870 || !XGetGeometry(dpy, window->drawable, &root, x, y, w, h, &border, &depth)
871 || !XTranslateCoordinates(dpy, window->drawable, root, 0, 0, x, y, &child))
872 {
873 crWarning("Failed to get windows geometry for %p, try xwininfo", window);
874 *x = *y = 0;
875 *w = *h = 0;
876 }
877
878 if (window && dpy)
879 {
880 XUNLOCK(dpy);
881 }
882}
883
884static char *
885GetWindowTitleHelper( Display *dpy, Window window, GLboolean recurseUp )
886{
887 while (1) {
888 char *name;
889 if (!XFetchName(dpy, window, &name))
890 return NULL;
891 if (name[0]) {
892 return name;
893 }
894 else if (recurseUp) {
895 /* This window has no name, try the parent */
896 Status stat;
897 Window root, parent, *children;
898 unsigned int numChildren;
899 stat = XQueryTree( dpy, window, &root, &parent,
900 &children, &numChildren );
901 if (!stat || window == root)
902 return NULL;
903 if (children)
904 XFree(children);
905 window = parent;
906 }
907 else {
908 XFree(name);
909 return NULL;
910 }
911 }
912}
913
914static void
915GetWindowTitle( const WindowInfo *window, char *title )
916{
917 char *t = GetWindowTitleHelper(window->dpy, window->drawable, GL_TRUE);
918 if (t) {
919 crStrcpy(title, t);
920 XFree(t);
921 }
922 else {
923 title[0] = 0;
924 }
925}
926
927
928/**
929 *Return current cursor position in local window coords.
930 */
931static void
932GetCursorPosition(WindowInfo *window, int pos[2] )
933{
934 int rootX, rootY;
935 Window root, child;
936 unsigned int mask;
937 int x, y;
938
939 XLOCK(window->dpy);
940
941 Bool q = XQueryPointer(window->dpy, window->drawable, &root, &child,
942 &rootX, &rootY, &pos[0], &pos[1], &mask);
943 if (q) {
944 unsigned int w, h;
945 stubGetWindowGeometry( window, &x, &y, &w, &h );
946 /* invert Y */
947 pos[1] = (int) h - pos[1] - 1;
948 }
949 else {
950 pos[0] = pos[1] = 0;
951 }
952
953 XUNLOCK(window->dpy);
954}
955
956#endif
957
958
959/**
960 * This function is called by MakeCurrent() and determines whether or
961 * not a new rendering context should be bound to Chromium or the native
962 * OpenGL.
963 * \return GL_FALSE if native OpenGL should be used, or GL_TRUE if Chromium
964 * should be used.
965 */
966static GLboolean
967stubCheckUseChromium( WindowInfo *window )
968{
969 int x, y;
970 unsigned int w, h;
971
972 /* If the provided window is CHROMIUM, we're clearly intended
973 * to create a CHROMIUM context.
974 */
975 if (window->type == CHROMIUM)
976 return GL_TRUE;
977
978 if (stub.ignoreFreeglutMenus) {
979 const char *glutMenuTitle = "freeglut menu";
980 char title[1000];
981 GetWindowTitle(window, title);
982 if (crStrcmp(title, glutMenuTitle) == 0) {
983 crDebug("GL faker: Ignoring freeglut menu window");
984 return GL_FALSE;
985 }
986 }
987
988 /* If the user's specified a window count for Chromium, see if
989 * this window satisfies that criterium.
990 */
991 stub.matchChromiumWindowCounter++;
992 if (stub.matchChromiumWindowCount > 0) {
993 if (stub.matchChromiumWindowCounter != stub.matchChromiumWindowCount) {
994 crDebug("Using native GL, app window doesn't meet match_window_count");
995 return GL_FALSE;
996 }
997 }
998
999 /* If the user's specified a window list to ignore, see if this
1000 * window satisfies that criterium.
1001 */
1002 if (stub.matchChromiumWindowID) {
1003 GLuint i;
1004
1005 for (i = 0; i <= stub.numIgnoreWindowID; i++) {
1006 if (stub.matchChromiumWindowID[i] == stub.matchChromiumWindowCounter) {
1007 crDebug("Ignore window ID %d, using native GL", stub.matchChromiumWindowID[i]);
1008 return GL_FALSE;
1009 }
1010 }
1011 }
1012
1013 /* If the user's specified a minimum window size for Chromium, see if
1014 * this window satisfies that criterium.
1015 */
1016 if (stub.minChromiumWindowWidth > 0 &&
1017 stub.minChromiumWindowHeight > 0) {
1018 stubGetWindowGeometry( window, &x, &y, &w, &h );
1019 if (w >= stub.minChromiumWindowWidth &&
1020 h >= stub.minChromiumWindowHeight) {
1021
1022 /* Check for maximum sized window now too */
1023 if (stub.maxChromiumWindowWidth &&
1024 stub.maxChromiumWindowHeight) {
1025 if (w < stub.maxChromiumWindowWidth &&
1026 h < stub.maxChromiumWindowHeight)
1027 return GL_TRUE;
1028 else
1029 return GL_FALSE;
1030 }
1031
1032 return GL_TRUE;
1033 }
1034 crDebug("Using native GL, app window doesn't meet minimum_window_size");
1035 return GL_FALSE;
1036 }
1037 else if (stub.matchWindowTitle) {
1038 /* If the user's specified a window title for Chromium, see if this
1039 * window satisfies that criterium.
1040 */
1041 GLboolean wildcard = GL_FALSE;
1042 char title[1000];
1043 char *titlePattern;
1044 int len;
1045 /* check for leading '*' wildcard */
1046 if (stub.matchWindowTitle[0] == '*') {
1047 titlePattern = crStrdup( stub.matchWindowTitle + 1 );
1048 wildcard = GL_TRUE;
1049 }
1050 else {
1051 titlePattern = crStrdup( stub.matchWindowTitle );
1052 }
1053 /* check for trailing '*' wildcard */
1054 len = crStrlen(titlePattern);
1055 if (len > 0 && titlePattern[len - 1] == '*') {
1056 titlePattern[len - 1] = '\0'; /* terminate here */
1057 wildcard = GL_TRUE;
1058 }
1059
1060 GetWindowTitle( window, title );
1061 if (title[0]) {
1062 if (wildcard) {
1063 if (crStrstr(title, titlePattern)) {
1064 crFree(titlePattern);
1065 return GL_TRUE;
1066 }
1067 }
1068 else if (crStrcmp(title, titlePattern) == 0) {
1069 crFree(titlePattern);
1070 return GL_TRUE;
1071 }
1072 }
1073 crFree(titlePattern);
1074 crDebug("Using native GL, app window title doesn't match match_window_title string (\"%s\" != \"%s\")", title, stub.matchWindowTitle);
1075 return GL_FALSE;
1076 }
1077
1078 /* Window title and size don't matter */
1079 CRASSERT(stub.minChromiumWindowWidth == 0);
1080 CRASSERT(stub.minChromiumWindowHeight == 0);
1081 CRASSERT(stub.matchWindowTitle == NULL);
1082
1083 /* User hasn't specified a width/height or window title.
1084 * We'll use chromium for this window (and context) if no other is.
1085 */
1086
1087 return GL_TRUE; /* use Chromium! */
1088}
1089
1090static void stubWindowCheckOwnerCB(unsigned long key, void *data1, void *data2)
1091{
1092 WindowInfo *pWindow = (WindowInfo *) data1;
1093 ContextInfo *pCtx = (ContextInfo *) data2;
1094
1095 if (pWindow->pOwner == pCtx)
1096 {
1097#ifdef WINDOWS
1098 /* Note: can't use WindowFromDC(context->pOwnWindow->drawable) here
1099 because GL context is already released from DC and actual guest window
1100 could be destroyed.
1101 */
1102 stubDestroyWindow(CR_CTX_CON(pCtx), (GLint)pWindow->hWnd);
1103#else
1104 stubDestroyWindow(CR_CTX_CON(pCtx), (GLint)pWindow->drawable);
1105#endif
1106 }
1107}
1108
1109GLboolean stubCtxCreate(ContextInfo *context)
1110{
1111 /*
1112 * Create a Chromium context.
1113 */
1114#if defined(GLX) || defined(DARWIN)
1115 GLint spuShareCtx = context->share ? context->share->spuContext : 0;
1116#else
1117 GLint spuShareCtx = 0;
1118#endif
1119 GLint spuConnection = 0;
1120 CRASSERT(stub.spu);
1121 CRASSERT(stub.spu->dispatch_table.CreateContext);
1122 context->type = CHROMIUM;
1123
1124#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
1125 if (context->pHgsmi)
1126 {
1127 spuConnection = stub.spu->dispatch_table.VBoxConCreate(context->pHgsmi);
1128 if (!spuConnection)
1129 {
1130 crWarning("VBoxConCreate failed");
1131 return GL_FALSE;
1132 }
1133 context->spuConnection = spuConnection;
1134 }
1135#endif
1136
1137 context->spuContext
1138 = stub.spu->dispatch_table.VBoxCreateContext(spuConnection, context->dpyName,
1139 context->visBits,
1140 spuShareCtx);
1141
1142 return GL_TRUE;
1143}
1144
1145GLboolean stubCtxCheckCreate(ContextInfo *context)
1146{
1147 if (context->type == UNDECIDED)
1148 return stubCtxCreate(context);
1149 return CHROMIUM == context->type;
1150}
1151
1152
1153GLboolean
1154stubMakeCurrent( WindowInfo *window, ContextInfo *context )
1155{
1156 GLboolean retVal;
1157
1158 /*
1159 * Get WindowInfo and ContextInfo pointers.
1160 */
1161
1162 if (!context || !window) {
1163 ContextInfo * currentContext = stubGetCurrentContext();
1164 if (currentContext)
1165 currentContext->currentDrawable = NULL;
1166 if (context)
1167 context->currentDrawable = NULL;
1168 stubSetCurrentContext(NULL);
1169 return GL_TRUE; /* OK */
1170 }
1171
1172#ifdef CHROMIUM_THREADSAFE
1173 stubCheckMultithread();
1174#endif
1175
1176 if (context->type == UNDECIDED) {
1177 /* Here's where we really create contexts */
1178#ifdef CHROMIUM_THREADSAFE
1179 crLockMutex(&stub.mutex);
1180#endif
1181
1182 if (stubCheckUseChromium(window)) {
1183 GLint spuConnection = 0;
1184
1185 if (!stubCtxCreate(context))
1186 {
1187 crWarning("stubCtxCreate failed");
1188 return GL_FALSE;
1189 }
1190
1191#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
1192 spuConnection = context->spuConnection;
1193#endif
1194
1195 if (window->spuWindow == -1)
1196 {
1197 /*crDebug("(1)stubMakeCurrent ctx=%p(%i) window=%p(%i)", context, context->spuContext, window, window->spuWindow);*/
1198 window->spuWindow = stub.spu->dispatch_table.VBoxWindowCreate(spuConnection, window->dpyName, context->visBits );
1199#ifdef CR_NEWWINTRACK
1200 window->u32ClientID = stub.spu->dispatch_table.VBoxPackGetInjectID(spuConnection);
1201#endif
1202 }
1203 }
1204 else {
1205 /*
1206 * Create a native OpenGL context.
1207 */
1208 if (!InstantiateNativeContext(window, context))
1209 {
1210#ifdef CHROMIUM_THREADSAFE
1211 crUnlockMutex(&stub.mutex);
1212#endif
1213 return 0; /* false */
1214 }
1215 context->type = NATIVE;
1216 }
1217
1218#ifdef CHROMIUM_THREADSAFE
1219 crUnlockMutex(&stub.mutex);
1220#endif
1221 }
1222
1223
1224 if (context->type == NATIVE) {
1225 /*
1226 * Native OpenGL MakeCurrent().
1227 */
1228#ifdef WINDOWS
1229 retVal = (GLboolean) stub.wsInterface.wglMakeCurrent( window->drawable, context->hglrc );
1230#elif defined(Darwin)
1231 // XXX \todo We need to differentiate between these two..
1232 retVal = ( stub.wsInterface.CGLSetSurface(context->cglc, window->connection, window->drawable, window->surface) == noErr );
1233 retVal = ( stub.wsInterface.CGLSetCurrentContext(context->cglc) == noErr );
1234#elif defined(GLX)
1235 retVal = (GLboolean) stub.wsInterface.glXMakeCurrent( window->dpy, window->drawable, context->glxContext );
1236#endif
1237 }
1238 else {
1239 /*
1240 * SPU chain MakeCurrent().
1241 */
1242 CRASSERT(context->type == CHROMIUM);
1243 CRASSERT(context->spuContext >= 0);
1244
1245 /*if (context->currentDrawable && context->currentDrawable != window)
1246 crDebug("Rebinding context %p to a different window", context);*/
1247
1248 if (window->type == NATIVE) {
1249 crWarning("Can't rebind a chromium context to a native window\n");
1250 retVal = 0;
1251 }
1252 else {
1253 if (window->spuWindow == -1)
1254 {
1255 /*crDebug("(2)stubMakeCurrent ctx=%p(%i) window=%p(%i)", context, context->spuContext, window, window->spuWindow);*/
1256 window->spuWindow = stub.spu->dispatch_table.VBoxWindowCreate(
1257#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
1258 context->spuConnection,
1259#else
1260 0,
1261#endif
1262 window->dpyName, context->visBits );
1263#ifdef CR_NEWWINTRACK
1264 window->u32ClientID = stub.spu->dispatch_table.VBoxPackGetInjectID(
1265# if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
1266 context->spuConnection
1267# else
1268 0
1269# endif
1270 );
1271#endif
1272 if (context->currentDrawable && context->currentDrawable->type==CHROMIUM
1273 && context->currentDrawable->pOwner==context)
1274 {
1275#ifdef WINDOWS
1276 if (context->currentDrawable->hWnd!=WindowFromDC(context->currentDrawable->drawable))
1277 {
1278 stubDestroyWindow(CR_CTX_CON(context), (GLint)context->currentDrawable->hWnd);
1279 }
1280#else
1281 Window root;
1282 int x, y;
1283 unsigned int border, depth, w, h;
1284
1285 XLOCK(context->currentDrawable->dpy);
1286 if (!XGetGeometry(context->currentDrawable->dpy, context->currentDrawable->drawable, &root, &x, &y, &w, &h, &border, &depth))
1287 {
1288 stubDestroyWindow(CR_CTX_CON(context), (GLint)context->currentDrawable->drawable);
1289 }
1290 XUNLOCK(context->currentDrawable->dpy);
1291#endif
1292
1293 }
1294 }
1295
1296 if (window->spuWindow != (GLint)window->drawable)
1297 stub.spu->dispatch_table.MakeCurrent( window->spuWindow, (GLint) window->drawable, context->spuContext );
1298 else
1299 stub.spu->dispatch_table.MakeCurrent( window->spuWindow, 0, /* native window handle */ context->spuContext );
1300
1301 retVal = 1;
1302 }
1303 }
1304
1305 window->type = context->type;
1306 window->pOwner = context;
1307 context->currentDrawable = window;
1308 stubSetCurrentContext(context);
1309
1310 if (retVal) {
1311 /* Now, if we've transitions from Chromium to native rendering, or
1312 * vice versa, we have to change all the OpenGL entrypoint pointers.
1313 */
1314 if (context->type == NATIVE) {
1315 /* Switch to native API */
1316 /*printf(" Switching to native API\n");*/
1317 stubSetDispatch(&stub.nativeDispatch);
1318 }
1319 else if (context->type == CHROMIUM) {
1320 /* Switch to stub (SPU) API */
1321 /*printf(" Switching to spu API\n");*/
1322 stubSetDispatch(&stub.spuDispatch);
1323 }
1324 else {
1325 /* no API switch needed */
1326 }
1327 }
1328
1329 if (!window->width && window->type == CHROMIUM) {
1330 /* One time window setup */
1331 int x, y;
1332 unsigned int winW, winH;
1333
1334 stubGetWindowGeometry( window, &x, &y, &winW, &winH );
1335
1336 /* If we're not using GLX/WGL (no app window) we'll always get
1337 * a width and height of zero here. In that case, skip the viewport
1338 * call since we're probably using a tilesort SPU with fake_window_dims
1339 * which the tilesort SPU will use for the viewport.
1340 */
1341 window->width = winW;
1342 window->height = winH;
1343#if defined(WINDOWS) && defined(VBOX_WITH_WDDM)
1344 if (stubIsWindowVisible(window))
1345#endif
1346 {
1347 if (stub.trackWindowSize)
1348 stub.spuDispatch.WindowSize( window->spuWindow, winW, winH );
1349 if (stub.trackWindowPos)
1350 stub.spuDispatch.WindowPosition(window->spuWindow, x, y);
1351 if (winW > 0 && winH > 0)
1352 stub.spu->dispatch_table.Viewport( 0, 0, winW, winH );
1353 }
1354#ifdef VBOX_WITH_WDDM
1355 if (stub.trackWindowVisibleRgn)
1356 stub.spu->dispatch_table.WindowVisibleRegion(window->spuWindow, 0, NULL);
1357#endif
1358 }
1359
1360 /* Update window mapping state.
1361 * Basically, this lets us hide render SPU windows which correspond
1362 * to unmapped application windows. Without this, "pertly" (for example)
1363 * opens *lots* of temporary windows which otherwise clutter the screen.
1364 */
1365 if (stub.trackWindowVisibility && window->type == CHROMIUM && window->drawable) {
1366 const int mapped = stubIsWindowVisible(window);
1367 if (mapped != window->mapped) {
1368 crDebug("Dispatched: WindowShow(%i, %i)", window->spuWindow, mapped);
1369 stub.spu->dispatch_table.WindowShow(window->spuWindow, mapped);
1370 window->mapped = mapped;
1371 }
1372 }
1373
1374 return retVal;
1375}
1376
1377void
1378stubDestroyContext( unsigned long contextId )
1379{
1380 ContextInfo *context;
1381
1382 if (!stub.contextTable) {
1383 return;
1384 }
1385
1386 /* the lock order is windowTable->contextTable (see wglMakeCurrent_prox, glXMakeCurrent)
1387 * this is why we need to take a windowTable lock since we will later do stub.windowTable access & locking */
1388 crHashtableLock(stub.windowTable);
1389 crHashtableLock(stub.contextTable);
1390
1391 context = (ContextInfo *) crHashtableSearch(stub.contextTable, contextId);
1392
1393 CRASSERT(context);
1394
1395 stubDestroyContextLocked(context);
1396
1397#ifdef CHROMIUM_THREADSAFE
1398 if (stubGetCurrentContext() == context) {
1399 stubSetCurrentContext(NULL);
1400 }
1401
1402 VBoxTlsRefMarkDestroy(context);
1403 VBoxTlsRefRelease(context);
1404#else
1405 if (stubGetCurrentContext() == context) {
1406 stubSetCurrentContext(NULL);
1407 }
1408 stubContextFree(context);
1409#endif
1410 crHashtableUnlock(stub.contextTable);
1411 crHashtableUnlock(stub.windowTable);
1412}
1413
1414void
1415stubSwapBuffers(WindowInfo *window, GLint flags)
1416{
1417 if (!window)
1418 return;
1419
1420 /* Determine if this window is being rendered natively or through
1421 * Chromium.
1422 */
1423
1424 if (window->type == NATIVE) {
1425 /*printf("*** Swapping native window %d\n", (int) drawable);*/
1426#ifdef WINDOWS
1427 (void) stub.wsInterface.wglSwapBuffers( window->drawable );
1428#elif defined(Darwin)
1429 /* ...is this ok? */
1430/* stub.wsInterface.CGLFlushDrawable( context->cglc ); */
1431 crDebug("stubSwapBuffers: unable to swap (no context!)");
1432#elif defined(GLX)
1433 stub.wsInterface.glXSwapBuffers( window->dpy, window->drawable );
1434#endif
1435 }
1436 else if (window->type == CHROMIUM) {
1437 /* Let the SPU do the buffer swap */
1438 /*printf("*** Swapping chromium window %d\n", (int) drawable);*/
1439 if (stub.appDrawCursor) {
1440 int pos[2];
1441 GetCursorPosition(window, pos);
1442 stub.spu->dispatch_table.ChromiumParametervCR(GL_CURSOR_POSITION_CR, GL_INT, 2, pos);
1443 }
1444 stub.spu->dispatch_table.SwapBuffers( window->spuWindow, flags );
1445 }
1446 else {
1447 crDebug("Calling SwapBuffers on a window we haven't seen before (no-op).");
1448 }
1449}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette