VirtualBox

Ignore:
Timestamp:
Apr 18, 2019 12:07:07 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
130111
Message:

Merge first stage of the Chromium cleanup from the branch:

  • r129818 (Remove VBOX_WITH_CR_DISPLAY_LISTS and accompanying code as it was disabled since r108676 and was never brought back (see ​bugref:3456 and ​bugref:8485))
  • r129819 (HostServices/SharedOpenGL: Remove unused main entry point from upstream server process based implementation)
  • r129820 (HostServices/SharedOpenGL: Started eliminating all backends other than HGCM. They are not used and probably wouldn't work anymore anyway)
  • r129821 (HostServices/SharedOpenGL,GuestHost/OpenGLAdditions/common/crOpenGL: Kill crTimer* API as it is not used anywhere)
  • r129822 (HostServices/SharedOpenGL,GuestHost/OpenGLAdditions/common/crOpenGL: Kill most from cr_process.h apart from two used methods)
  • r129823 (HostServices/SharedOpenGL,GuestHost/OpenGLAdditions/common/crOpenGL: Kill crList* API as it is unused)
  • r129824 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Kill crHullInteriorBox API as it is unused)
  • r129825 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Kill crWarpPoint API as it is unused)
  • r129826 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Kill CrSa* API as it is unused and not even compiled in)
  • r129827 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Kill cr_bbox.h as it is unused)
  • r129828 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove a few crParseUrl() two uses)
  • r129829 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove last crParseURL() use)
  • r129830 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove crParseURL())
  • r129831 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove VBOX_WITH_COCOA_QT and related code when not set as it is the default for years now and we don't support anything else anymore)
  • r129832 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused cr_logo.h)
  • r129833 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused crut_api.h and crut_clientapi.h)
  • r129834 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused cr_dmx.h)
  • r129835 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused cr_perf.h)
  • r129836 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove cr_rand.h and friends as it is not actively used anywhere)
  • r129837 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of all the swapped versions in the packer SPU, we never change endianess from guest to host and don't need it)
  • r129838 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove more swapper versions in the packer related code)
  • r129839 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove more swapper versions in the packer related code)
  • r129840 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused pack_pica.c)
  • r129841 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove more swapper versions in the packer related code)
  • r129842 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of cr_endianess.h and friends)
  • r129843 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of unused lowercase.py)
  • r129844 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of unused cr_calllists.h and friends)
  • r129845 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of completely unused idpool.c, not even compiled in)
  • r129846 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of unused cr_debugopcodes.h and friends)
  • r129847 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Make the cr_mem.h API inline and get rid of the implementation in the util library)
  • r129848 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of SPUOptions and related code as it is of no use for us)
  • r129849 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of cr_environment.h and friends and convert usage to RTEnv* APIs)
  • r129850 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of unused renderspu_agl.c)
  • r129851 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused code in cr_htable.h)
  • r129853 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Introduce a state paremeter for the unpacker workers instead of reyling on global variables, work in progress)
  • r129854 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Let the caller of crUnpack set up the initial state. This allows to get rid of the global return_ptr and writeback_ptr as they get supplied in the unpacker state by the server)
  • r129855 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of the cr_lastDispatch and cr_unpackDispatch as they are of no use now)
  • r129856 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of the global cr_unpackData and cr_unpackDataEnd symbols by indtroducing another hack to make it possible for certail server dispatch callbacks to access the data buffer)
  • r129857 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: build fix for release builds)
  • r129858 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Make the pointer to the unpacker state non const (is required for the access verification))
  • r129859 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: First iteration of the buffer size validation to prevent out of bound read access + added todos for places where additional checks are needed)
  • r129860 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129861 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129871 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129872 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Stop as soon as the unpacker encountered an error)
  • r129876 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129880 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129882 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Fixed some offsets in unpack_texture.c, 3DMark03 renders correctly again)
  • r130013 (HostServices/SharedOpenGL: Convert files to C++ so we can use C99 featuers on Windows with cl.exe)
  • r130014 (HostServices/SharedOpenGL,GuestHost/OpenGL: WIndows build fixes)
  • r130015 (HostServices/SharedOpenGL,GuestHost/OpenGL: More Windows build fixes)
  • r130036 (Config.kmk: Fix linker error on Windows by temporarily disabling the use of VBoxGuestR3DllMinW2K)
  • r130094 (src/VBox/GuestHost/OpenGL: Revert inlining the allocation/free functions in R3 completely as it doesn't work on Windows if memory is allocated and freed across different DLLs which don't share a common CRT, causes crashes in RtlValidtaeHeap())
  • r130095 (src/VBox/GuestHost/OpenGL,src/VBox/Additions/common/crOpenGL/pack: Don't use floating point specifiers in packspu_GetString() to avoid R6002 errors (couldn't fully understand why they occur suddenly after the rework but this gets rid of it))
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:mergeinfo
      •  

        old new  
        99/branches/VBox-5.1:112367,115992,116543,116550,116568,116573
        1010/branches/VBox-5.2:119536,120083,120099,120213,120221,120239,123597-123598,123600-123601,123755,124260,124263,124271,124273,124277-124279,124284-124286,124288-124290,125768,125779-125780,125812
         11/branches/aeichner/vbox-chromium-cleanup:129816,129818-129851,129853-129861,129871-129872,129876,129880,129882,130013-130015,130036,130094-130095
        1112/branches/andy/draganddrop:90781-91268
        1213/branches/andy/guestctrl20:78916,78930
  • trunk/src/VBox

    • Property svn:mergeinfo
      •  

        old new  
        99/branches/VBox-5.1/src/VBox:112367,116543,116550,116568,116573
        1010/branches/VBox-5.2/src/VBox:119536,120083,120099,120213,120221,120239,123597-123598,123600-123601,123755,124263,124273,124277-124279,124284-124286,124288-124290,125768,125779-125780,125812,127158-127159,127162-127167,127180
         11/branches/aeichner/vbox-chromium-cleanup/src/VBox:129818-129851,129853-129861,129871-129872,129876,129880,129882,130013-130015,130094-130095
        1112/branches/andy/draganddrop/src/VBox:90781-91268
        1213/branches/andy/guestctrl20/src/VBox:78916,78930
  • trunk/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py

    r69392 r78190  
    2121#include "cr_string.h"
    2222#include "cr_error.h"
    23 #include "cr_environment.h"
     23
     24#include <iprt/env.h>
    2425
    2526#include <stdio.h>
     
    3637#define SYSTEM_GL "libGL.dylib"
    3738#define SYSTEM_CGL "OpenGL"
    38 # ifndef VBOX_WITH_COCOA_QT
    39 #  define SYSTEM_AGL "AGL"
    40 # endif
    4139#include <string.h> /* VBOX */
    4240#elif defined(IRIX) || defined(IRIX64) || defined(Linux) || defined(FreeBSD) || defined(AIX) || defined(SunOS) || defined(OSF1)
     
    5957#define SYSTEM_CGL_DIR  "/System/Library/Frameworks/OpenGL.framework"
    6058static CRDLL *cglDll = NULL;
    61 # ifndef VBOX_WITH_COCOA_QT
    62 #  define SYSTEM_AGL_DIR  "/System/Library/Frameworks/AGL.framework"
    63 static CRDLL *aglDll = NULL;
    64 # endif
    6559#endif
    6660
     
    263257        crDLLClose( cglDll );
    264258        cglDll = NULL;
    265 
    266 # ifndef VBOX_WITH_COCOA_QT
    267         crDLLClose( aglDll );
    268         aglDll = NULL;
    269 # endif
    270259#endif
    271260}
     
    294283        int i;
    295284
    296         const char *env_syspath = crGetenv( "CR_SYSTEM_GL_PATH" );
    297 #ifdef DARWIN
    298         const char *env_cgl_syspath = crGetenv( "CR_SYSTEM_CGL_PATH" );
    299 # ifndef VBOX_WITH_COCOA_QT
    300         const char *env_agl_syspath = crGetenv( "CR_SYSTEM_AGL_PATH" );
    301 # endif
     285        const char *env_syspath = RTEnvGet( "CR_SYSTEM_GL_PATH" );
     286#ifdef DARWIN
     287        const char *env_cgl_syspath = RTEnvGet( "CR_SYSTEM_CGL_PATH" );
    302288#endif
    303289
     
    326312
    327313        crDebug( "Found it in %s.", !env_cgl_syspath ? "default path" : env_cgl_syspath );
    328 
    329 # ifndef VBOX_WITH_COCOA_QT
    330         crDebug( "Looking for the system's AGL library..." );
    331         aglDll = __findSystemGL( env_agl_syspath, SYSTEM_AGL_DIR, SYSTEM_AGL );
    332         if (!aglDll)
    333         {
    334                 crError("Unable to find system AGL!");
    335                 return 0;
    336         }
    337 
    338         crDebug( "Found it in %s.", !env_agl_syspath ? "default path" : env_agl_syspath );
    339 # endif
    340314#endif
    341315""")
     
    466440
    467441print('#elif defined(DARWIN)')
    468 print('# ifndef VBOX_WITH_COCOA_QT')
    469 for fun in useful_agl_functions:
    470         print('\tinterface->%s = (%sFunc_t) crDLLGetNoError(aglDll, "%s");' % (fun,fun,fun))
    471 print('# endif')
    472 
    473442for fun in useful_cgl_functions:
    474443        print('\tinterface->%s = (%sFunc_t) crDLLGetNoError(cglDll, "%s");' % (fun, fun,fun))
     
    580549        static CRDLL *osMesaDll = NULL;
    581550
    582         const char *env_syspath = crGetenv( "CR_SYSTEM_GL_PATH" );
     551        const char *env_syspath = RTEnvGet( "CR_SYSTEM_GL_PATH" );
    583552
    584553        crDebug( "Looking for the system's OSMesa library..." );
  • trunk/src/VBox/GuestHost/OpenGL/spu_loader/spuinit.c

    r69392 r78190  
    2828}
    2929
    30 #if 0 /* unused */
    31 
    32 static int validate_int( const char *response,
    33              const char *min,
    34              const char *max )
    35 {
    36     int i, imin, imax;   
    37     if (sscanf(response, "%d", &i) != 1)
    38         return 0;
    39     if (min && sscanf(min, "%d", &imin) == 1 && imin > i)
    40         return 0;
    41     if (max && sscanf(max, "%d", &imax) == 1 && imax < i)
    42         return 0;
    43     return 1;
    44 }
    45 
    46 static int validate_float( const char *response,
    47              const char *min,
    48              const char *max )
    49 {
    50     float f, fmin, fmax;
    51     if (sscanf(response, "%f", &f) != 1)
    52         return 0;
    53     if (min && sscanf(min, "%f", &fmin) == 1 && fmin > f)
    54         return 0;
    55     if (max && sscanf(max, "%f", &fmax) == 1 && fmax < f)
    56         return 0;
    57     return 1;
    58 }
    59 
    60 static int validate_one_option( const SPUOptions *opt,
    61                 const char *response,
    62                 const char *min,
    63                 const char *max )
    64 {
    65     switch (opt->type) {
    66     case CR_BOOL:
    67         return validate_int( response, "0", "1" );
    68     case CR_INT:
    69         return validate_int( response, min, max );
    70     case CR_FLOAT:
    71         return validate_float( response, min, max );
    72     case CR_ENUM:
    73         /* Make sure response string is present in the min string.
    74          * For enums, the min string is a comma-separated list of valid values.
    75          */
    76         CRASSERT(opt->numValues == 1); /* an enum limitation for now */
    77         {
    78             const char *p = crStrstr(min, response);
    79             if (!p)
    80                 return 0;  /* invalid value! */
    81             if (p[-1] != '\'')
    82                 return 0;  /* right substring */
    83             if (p[crStrlen(response)] != '\'')
    84                 return 0;  /* left substring */
    85             return 1;
    86         }
    87     default:
    88         return 0;
    89     }
    90 }
    91 
    92 
    93 /**
    94  * Make sure the response matches the opt's parameters (right number
    95  * and type of values, etc.)
    96  * Return 1 if OK, 0 if error.
    97  */
    98 static int validate_option( const SPUOptions *opt, const char *response )
    99 {
    100     const char *min = opt->min;
    101     const char *max = opt->max;
    102     int i = 0;
    103     int retval;
    104 
    105     if (opt->type == CR_STRING)
    106         return 1;
    107    
    108     CRASSERT(opt->numValues > 0);
    109 
    110     /* skip leading [ for multi-value options */
    111     if (opt->numValues > 1) {
    112         /* multi-valued options must be enclosed in brackets */
    113         if (*response != '[')
    114             return 0;
    115         response++; /* skip [ */
    116         /* make sure min and max are bracketed as well */
    117         if (min) {
    118             CRASSERT(*min == '[');  /* error in <foo>spu_config.c code!!! */
    119             min++;
    120         }
    121         if (max) {
    122             CRASSERT(*max == '[');  /* error in <foo>spu_config.c code!!! */
    123             max++;
    124         }
    125     }
    126 
    127     for (;;)
    128     {
    129         if (!validate_one_option( opt, response, min, max ))
    130         {
    131             retval = 0;
    132             break;
    133         }
    134         if (++i == opt->numValues)
    135         {
    136             retval = 1; /* all done! */
    137             break;
    138         }
    139         /* advance pointers to next item */
    140         if (min)
    141         {
    142             while (*min != ' ' && *min)
    143                 min++;
    144             while (*min == ' ')
    145                 min++;
    146         }
    147         if (max)
    148         {
    149             while (*max != ' ' && *max)
    150                 max++;
    151             while (*max == ' ')
    152                 max++;
    153         }
    154         if (response)
    155         {
    156             while (*response != ' ' && *response)
    157                 response++;
    158             while (*response == ' ')
    159                 response++;
    160         }
    161     }
    162 
    163     return retval;
    164 }
    165 
    166 #endif /* unused */
    167 
    168 /** Use the default values for all the options:
    169  */
    170 void crSPUSetDefaultParams( void *spu, SPUOptions *options )
    171 {
    172     int i;
    173    
    174     for (i = 0 ; options[i].option ; i++)
    175     {
    176         SPUOptions *opt = &options[i];
    177         opt->cb( spu, opt->deflt );
    178     }
    179 }
    180 
    181 
    182 /**
    183  * Find the index of the given enum value in the SPUOption's list of
    184  * possible enum values.
    185  * Return the enum index, or -1 if not found.
    186  */
    187 int crSPUGetEnumIndex( const SPUOptions *options, const char *optName, const char *value )
    188 {
    189     const SPUOptions *opt;
    190     const int valueLen = crStrlen(value);
    191 
    192     /* first, find the right option */
    193     for (opt = options; opt->option; opt++) {
    194         if (crStrcmp(opt->option, optName) == 0) {
    195             char **values;
    196             int i;
    197 
    198             CRASSERT(opt->type == CR_ENUM);
    199 
    200             /* break into array of strings */
    201             /* min string should be of form "'enum1', 'enum2', 'enum3', etc" */
    202             values = crStrSplit(opt->min, ",");
    203 
    204             /* search the array */
    205             for (i = 0; values[i]; i++) {
    206                 /* find leading quote */
    207                 const char *e = crStrchr(values[i], '\'');
    208                 CRASSERT(e);
    209                 if (e) {
    210                     /* test for match */
    211                     if (crStrncmp(value, e + 1, valueLen) == 0 &&   e[valueLen + 1] == '\'') {
    212                         crFreeStrings(values);
    213                         return i;
    214                     }
    215                 }
    216             }
    217 
    218             /* enum value not found! */
    219             crFreeStrings(values);
    220             return -1;
    221         }
    222     }
    223 
    224     return -1;
    225 }
  • trunk/src/VBox/GuestHost/OpenGL/spu_loader/spuload.c

    r69392 r78190  
    66
    77#include "cr_mem.h"
    8 #include "cr_environment.h"
    98#include "cr_string.h"
    109#include "cr_dll.h"
     
    120119                                   &(the_spu->init), &(the_spu->self),
    121120                                   &(the_spu->cleanup),
    122                                    &(the_spu->options),
    123121                                   &(the_spu->spu_flags)) )
    124122        {
Note: See TracChangeset for help on using the changeset viewer.

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