Changeset 87178 in webkit


Ignore:
Timestamp:
May 24, 2011 11:50:48 AM (13 years ago)
Author:
senorblanco@chromium.org
Message:

2011-05-24 Stephen White <senorblanco@chromium.org>

Reviewed by Kenneth Russell.

Remove most style checks on Source/ThirdParty/glu, since it doesn't
follow WebKit style.
https://bugs.webkit.org/show_bug.cgi?id=61365

  • Scripts/webkitpy/style/checker.py:

2011-05-24 Stephen White <senorblanco@chromium.org>

Reviewed by Kenneth Russell.

Unfork glu sources as much as possible.
https://bugs.webkit.org/show_bug.cgi?id=61365

Restore the glu sources closer to the original version on oss.sgi.com
by removing the WebKit-specific include paths, restoring the include
order, and renaming the glu* functions via #defines rather than in
the source.

  • glu/README.webkit: Update the README to reflect the changes from trunk.
  • glu/glu.gyp: Add Source/Thirdparty/glu as an include path, so we can remove the hardcoded paths from the source files.
  • glu/gluos.h: Add #defines to rename the glu entry points to internal_*.
  • glu/internal_glu.h:
  • glu/libtess/dict.c:
  • glu/libtess/geom.c:
  • glu/libtess/geom.h:
  • glu/libtess/memalloc.c:
  • glu/libtess/mesh.c:
  • glu/libtess/mesh.h:
  • glu/libtess/normal.c:
  • glu/libtess/normal.h:
  • glu/libtess/priorityq-heap.c:
  • glu/libtess/priorityq-sort.h:
  • glu/libtess/priorityq.c:
  • glu/libtess/priorityq.h:
  • glu/libtess/render.c:
  • glu/libtess/render.h:
  • glu/libtess/sweep.c:
  • glu/libtess/sweep.h:
  • glu/libtess/tess.c:
  • glu/libtess/tess.h:
  • glu/libtess/tessmono.c: Remove WebKit-specific include paths, and internal_ prefixes from glu entry points. Restore include order to original source order.
Location:
trunk
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/ChangeLog

    r86965 r87178  
     12011-05-24  Stephen White  <senorblanco@chromium.org>
     2
     3        Reviewed by Kenneth Russell.
     4
     5        Unfork glu sources as much as possible.
     6        https://bugs.webkit.org/show_bug.cgi?id=61365
     7
     8        Restore the glu sources closer to the original version on oss.sgi.com
     9        by removing the WebKit-specific include paths, restoring the include
     10        order, and renaming the glu* functions via #defines rather than in
     11        the source.
     12
     13        * glu/README.webkit:
     14        Update the README to reflect the changes from trunk.
     15        * glu/glu.gyp:
     16        Add Source/Thirdparty/glu as an include path, so we can remove the
     17        hardcoded paths from the source files.
     18        * glu/gluos.h:
     19        Add #defines to rename the glu entry points to internal_*.
     20        * glu/internal_glu.h:
     21        * glu/libtess/dict.c:
     22        * glu/libtess/geom.c:
     23        * glu/libtess/geom.h:
     24        * glu/libtess/memalloc.c:
     25        * glu/libtess/mesh.c:
     26        * glu/libtess/mesh.h:
     27        * glu/libtess/normal.c:
     28        * glu/libtess/normal.h:
     29        * glu/libtess/priorityq-heap.c:
     30        * glu/libtess/priorityq-sort.h:
     31        * glu/libtess/priorityq.c:
     32        * glu/libtess/priorityq.h:
     33        * glu/libtess/render.c:
     34        * glu/libtess/render.h:
     35        * glu/libtess/sweep.c:
     36        * glu/libtess/sweep.h:
     37        * glu/libtess/tess.c:
     38        * glu/libtess/tess.h:
     39        * glu/libtess/tessmono.c:
     40        Remove WebKit-specific include paths, and internal_ prefixes from glu
     41        entry points.  Restore include order to original source order.
     42
    1432011-05-19  Evan Martin  <evan@chromium.org>
    244
  • trunk/Source/ThirdParty/glu/README.webkit

    r83641 r87178  
    99
    1010  - The addition of a simplified gluos.h to eliminate operating system
    11     dependencies.
     11    dependencies.  All entry points to the tesselator were prefixed
     12    with internal_ via #defines, to avoid symbol collisions with any
     13    host OS version of GLU.
    1214
    1315  - The removal of inclusion of GL/glu.h and replacement with an
    1416    include of internal_glu.h.
    15 
    16   - Includes were modified to be scoped within ThirdParty/glu/ and
    17     ThirdParty/glu/libtess/.
    18 
    19   - The entry points to the tessellator were prefixed with internal_
    20     to avoid symbol collisions with any host OS version of GLU.
    2117
    2218  - In tess.c, the obsolete entry points gluBeginPolygon,
  • trunk/Source/ThirdParty/glu/glu.gyp

    r86965 r87178  
    44    'type': 'static_library',
    55    'include_dirs': [
    6       '../..',
     6      '.',
    77    ],
    88    'sources': [
  • trunk/Source/ThirdParty/glu/gluos.h

    r76235 r87178  
    4343typedef void GLvoid;
    4444
     45#define gluNewTess internal_gluNewTess
     46#define gluDeleteTess internal_gluDeleteTess
     47#define gluTessProperty internal_gluTessProperty
     48#define gluGetTessProperty internal_gluGetTessProperty
     49#define gluTessNormal internal_gluTessNormal
     50#define gluTessCallback internal_gluTessCallback
     51#define gluTessVertex internal_gluTessVertex
     52#define gluTessBeginPolygon internal_gluTessBeginPolygon
     53#define gluTessBeginContour internal_gluTessBeginContour
     54#define gluTessEndContour internal_gluTessEndContour
     55#define gluTessEndPolygon internal_gluTessEndPolygon
     56
    4557#undef MIN
    4658#undef MAX
  • trunk/Source/ThirdParty/glu/internal_glu.h

    r83641 r87178  
    3737#define INTERNAL_GLU_H_
    3838
    39 #include "ThirdParty/glu/gluos.h"
     39#include "gluos.h"
    4040
    4141/* Primitives */
  • trunk/Source/ThirdParty/glu/libtess/dict.c

    r83641 r87178  
    4141
    4242#include <stddef.h>
    43 #include "ThirdParty/glu/libtess/dict-list.h"
    44 #include "ThirdParty/glu/libtess/memalloc.h"
     43#include "dict-list.h"
     44#include "memalloc.h"
    4545
    4646/* really __gl_dictListNewDict */
  • trunk/Source/ThirdParty/glu/libtess/geom.c

    r83641 r87178  
    4040*/
    4141
     42#include "gluos.h"
    4243#include <assert.h>
    43 #include "ThirdParty/glu/gluos.h"
    44 #include "ThirdParty/glu/libtess/mesh.h"
    45 #include "ThirdParty/glu/libtess/geom.h"
     44#include "mesh.h"
     45#include "geom.h"
    4646
    4747int __gl_vertLeq( GLUvertex *u, GLUvertex *v )
  • trunk/Source/ThirdParty/glu/libtess/geom.h

    r83641 r87178  
    4343#define __geom_h_
    4444
    45 #include "ThirdParty/glu/libtess/mesh.h"
     45#include "mesh.h"
    4646
    4747#ifdef NO_BRANCH_CONDITIONS
  • trunk/Source/ThirdParty/glu/libtess/memalloc.c

    r83641 r87178  
    4040*/
    4141
     42#include "memalloc.h"
    4243#include "string.h"
    43 #include "ThirdParty/glu/libtess/memalloc.h"
    4444
    4545int __gl_memInit( size_t maxFast )
  • trunk/Source/ThirdParty/glu/libtess/mesh.c

    r83641 r87178  
    4040*/
    4141
     42#include "gluos.h"
     43#include <stddef.h>
    4244#include <assert.h>
    43 #include <stddef.h>
    44 #include "ThirdParty/glu/gluos.h"
    45 #include "ThirdParty/glu/libtess/memalloc.h"
    46 #include "ThirdParty/glu/libtess/mesh.h"
     45#include "mesh.h"
     46#include "memalloc.h"
    4747
    4848#define TRUE 1
  • trunk/Source/ThirdParty/glu/libtess/mesh.h

    r83641 r87178  
    4343#define __mesh_h_
    4444
    45 #include "ThirdParty/glu/internal_glu.h"
     45#include <internal_glu.h>
    4646
    4747typedef struct GLUmesh GLUmesh;
  • trunk/Source/ThirdParty/glu/libtess/normal.c

    r83641 r87178  
    4040*/
    4141
     42#include "gluos.h"
     43#include "mesh.h"
     44#include "tess.h"
     45#include "normal.h"
     46#include <math.h>
    4247#include <assert.h>
    43 #include <math.h>
    44 #include "ThirdParty/glu/gluos.h"
    45 #include "ThirdParty/glu/libtess/mesh.h"
    46 #include "ThirdParty/glu/libtess/normal.h"
    47 #include "ThirdParty/glu/libtess/tess.h"
    4848
    4949#define TRUE 1
  • trunk/Source/ThirdParty/glu/libtess/normal.h

    r83641 r87178  
    4343#define __normal_h_
    4444
    45 #include "ThirdParty/glu/libtess/tess.h"
     45#include "tess.h"
    4646
    4747/* __gl_projectPolygon( tess ) determines the polygon normal
  • trunk/Source/ThirdParty/glu/libtess/priorityq-heap.c

    r83641 r87178  
    4040*/
    4141
     42#include <stddef.h>
    4243#include <assert.h>
    4344#include <limits.h>
    44 #include <stddef.h>
    45 #include "ThirdParty/glu/libtess/memalloc.h"
    46 #include "ThirdParty/glu/libtess/priorityq-heap.h"
     45#include "priorityq-heap.h"
     46#include "memalloc.h"
    4747
    4848#define INIT_SIZE       32
  • trunk/Source/ThirdParty/glu/libtess/priorityq-sort.h

    r83641 r87178  
    4343#define __priorityq_sort_h_
    4444
    45 #include "ThirdParty/glu/libtess/priorityq-heap.h"
     45#include "priorityq-heap.h"
    4646
    4747#undef PQkey
  • trunk/Source/ThirdParty/glu/libtess/priorityq.c

    r83641 r87178  
    4040*/
    4141
     42#include "gluos.h"
     43#include <stddef.h>
    4244#include <assert.h>
    4345#include <limits.h>             /* LONG_MAX */
    44 #include <stddef.h>
    45 #include "ThirdParty/glu/gluos.h"
    46 #include "ThirdParty/glu/libtess/memalloc.h"
     46#include "memalloc.h"
    4747
    4848/* Include all the code for the regular heap-based queue here. */
    4949
    50 #include "ThirdParty/glu/libtess/priorityq-heap.c"
     50#include "priorityq-heap.c"
    5151
    5252/* Now redefine all the function names to map to their "Sort" versions. */
    5353
    54 #include "ThirdParty/glu/libtess/priorityq-sort.h"
     54#include "priorityq-sort.h"
    5555
    5656/* really __gl_pqSortNewPriorityQ */
  • trunk/Source/ThirdParty/glu/libtess/priorityq.h

    r83641 r87178  
    4343#define __priorityq_sort_h_
    4444
    45 #include "ThirdParty/glu/libtess/priorityq-heap.h"
     45#include "priorityq-heap.h"
    4646
    4747#undef PQkey
  • trunk/Source/ThirdParty/glu/libtess/render.c

    r83641 r87178  
    4040*/
    4141
     42#include "gluos.h"
    4243#include <assert.h>
    4344#include <stddef.h>
    44 #include "ThirdParty/glu/gluos.h"
    45 #include "ThirdParty/glu/libtess/mesh.h"
    46 #include "ThirdParty/glu/libtess/render.h"
    47 #include "ThirdParty/glu/libtess/tess.h"
     45#include "mesh.h"
     46#include "tess.h"
     47#include "render.h"
    4848
    4949#define TRUE 1
  • trunk/Source/ThirdParty/glu/libtess/render.h

    r83641 r87178  
    4343#define __render_h_
    4444
    45 #include "ThirdParty/glu/libtess/mesh.h"
     45#include "mesh.h"
    4646
    4747/* __gl_renderMesh( tess, mesh ) takes a mesh and breaks it into triangle
  • trunk/Source/ThirdParty/glu/libtess/sweep.c

    r83641 r87178  
    4040*/
    4141
     42#include "gluos.h"
    4243#include <assert.h>
     44#include <stddef.h>
    4345#include <setjmp.h>             /* longjmp */
    4446#include <limits.h>             /* LONG_MAX */
    45 #include <stddef.h>
    46 
    47 #include "ThirdParty/glu/gluos.h"
    48 #include "ThirdParty/glu/libtess/dict.h"
    49 #include "ThirdParty/glu/libtess/geom.h"
    50 #include "ThirdParty/glu/libtess/memalloc.h"
    51 #include "ThirdParty/glu/libtess/mesh.h"
    52 #include "ThirdParty/glu/libtess/priorityq.h"
    53 #include "ThirdParty/glu/libtess/sweep.h"
    54 #include "ThirdParty/glu/libtess/tess.h"
     47
     48#include "mesh.h"
     49#include "geom.h"
     50#include "tess.h"
     51#include "dict.h"
     52#include "priorityq.h"
     53#include "memalloc.h"
     54#include "sweep.h"
    5555
    5656#define TRUE 1
  • trunk/Source/ThirdParty/glu/libtess/sweep.h

    r83641 r87178  
    4343#define __sweep_h_
    4444
    45 #include "ThirdParty/glu/libtess/mesh.h"
     45#include "mesh.h"
    4646
    4747/* __gl_computeInterior( tess ) computes the planar arrangement specified
  • trunk/Source/ThirdParty/glu/libtess/tess.c

    r83641 r87178  
    4040*/
    4141
     42#include "gluos.h"
     43#include <stddef.h>
    4244#include <assert.h>
    4345#include <setjmp.h>
    44 #include <stddef.h>
    45 
    46 #include "ThirdParty/glu/gluos.h"
    47 #include "ThirdParty/glu/libtess/memalloc.h"
    48 #include "ThirdParty/glu/libtess/mesh.h"
    49 #include "ThirdParty/glu/libtess/normal.h"
    50 #include "ThirdParty/glu/libtess/render.h"
    51 #include "ThirdParty/glu/libtess/sweep.h"
    52 #include "ThirdParty/glu/libtess/tess.h"
    53 #include "ThirdParty/glu/libtess/tessmono.h"
     46#include "memalloc.h"
     47#include "tess.h"
     48#include "mesh.h"
     49#include "normal.h"
     50#include "sweep.h"
     51#include "tessmono.h"
     52#include "render.h"
    5453
    5554#define GLU_TESS_DEFAULT_TOLERANCE 0.0
     
    9392
    9493GLUtesselator * GLAPIENTRY
    95 internal_gluNewTess( void )
     94gluNewTess( void )
    9695{
    9796  GLUtesselator *tess;
     
    165164      case T_DORMANT:
    166165        CALL_ERROR_OR_ERROR_DATA( GLU_TESS_MISSING_BEGIN_POLYGON );
    167         internal_gluTessBeginPolygon( tess, NULL );
     166        gluTessBeginPolygon( tess, NULL );
    168167        break;
    169168      case T_IN_POLYGON:
    170169        CALL_ERROR_OR_ERROR_DATA( GLU_TESS_MISSING_BEGIN_CONTOUR );
    171         internal_gluTessBeginContour( tess );
     170        gluTessBeginContour( tess );
    172171        break;
    173172      default:
     
    179178      case T_IN_CONTOUR:
    180179        CALL_ERROR_OR_ERROR_DATA( GLU_TESS_MISSING_END_CONTOUR );
    181         internal_gluTessEndContour( tess );
     180        gluTessEndContour( tess );
    182181        break;
    183182      case T_IN_POLYGON:
     
    196195
    197196void GLAPIENTRY
    198 internal_gluDeleteTess( GLUtesselator *tess )
     197gluDeleteTess( GLUtesselator *tess )
    199198{
    200199  RequireState( tess, T_DORMANT );
     
    204203
    205204void GLAPIENTRY
    206 internal_gluTessProperty( GLUtesselator *tess, GLenum which, GLdouble value )
     205gluTessProperty( GLUtesselator *tess, GLenum which, GLdouble value )
    207206{
    208207  GLenum windingRule;
     
    243242/* Returns tessellator property */
    244243void GLAPIENTRY
    245 internal_gluGetTessProperty( GLUtesselator *tess, GLenum which, GLdouble *value )
     244gluGetTessProperty( GLUtesselator *tess, GLenum which, GLdouble *value )
    246245{
    247246   switch (which) {
     
    271270
    272271void GLAPIENTRY
    273 internal_gluTessNormal( GLUtesselator *tess, GLdouble x, GLdouble y, GLdouble z )
     272gluTessNormal( GLUtesselator *tess, GLdouble x, GLdouble y, GLdouble z )
    274273{
    275274  tess->normal[0] = x;
     
    279278
    280279void GLAPIENTRY
    281 internal_gluTessCallback( GLUtesselator *tess, GLenum which, void (GLAPIENTRY *fn)())
     280gluTessCallback( GLUtesselator *tess, GLenum which, void (GLAPIENTRY *fn)())
    282281{
    283282  switch( which ) {
     
    418417
    419418void GLAPIENTRY
    420 internal_gluTessVertex( GLUtesselator *tess, GLdouble coords[3], void *data )
     419gluTessVertex( GLUtesselator *tess, GLdouble coords[3], void *data )
    421420{
    422421  int i, tooLarge = FALSE;
     
    465464
    466465void GLAPIENTRY
    467 internal_gluTessBeginPolygon( GLUtesselator *tess, void *data )
     466gluTessBeginPolygon( GLUtesselator *tess, void *data )
    468467{
    469468  RequireState( tess, T_DORMANT );
     
    479478
    480479void GLAPIENTRY
    481 internal_gluTessBeginContour( GLUtesselator *tess )
     480gluTessBeginContour( GLUtesselator *tess )
    482481{
    483482  RequireState( tess, T_IN_POLYGON );
     
    496495
    497496void GLAPIENTRY
    498 internal_gluTessEndContour( GLUtesselator *tess )
     497gluTessEndContour( GLUtesselator *tess )
    499498{
    500499  RequireState( tess, T_IN_CONTOUR );
     
    503502
    504503void GLAPIENTRY
    505 internal_gluTessEndPolygon( GLUtesselator *tess )
     504gluTessEndPolygon( GLUtesselator *tess )
    506505{
    507506  GLUmesh *mesh;
  • trunk/Source/ThirdParty/glu/libtess/tess.h

    r83641 r87178  
    4343#define __tess_h_
    4444
     45#include <internal_glu.h>
    4546#include <setjmp.h>
    46 
    47 #include "ThirdParty/glu/internal_glu.h"
    48 #include "ThirdParty/glu/libtess/dict.h"
    49 #include "ThirdParty/glu/libtess/mesh.h"
    50 #include "ThirdParty/glu/libtess/priorityq.h"
     47#include "mesh.h"
     48#include "dict.h"
     49#include "priorityq.h"
    5150
    5251/* The begin/end calls must be properly nested.  We keep track of
  • trunk/Source/ThirdParty/glu/libtess/tessmono.c

    r83641 r87178  
    4040*/
    4141
     42#include "gluos.h"
     43#include <stdlib.h>
     44#include "geom.h"
     45#include "mesh.h"
     46#include "tessmono.h"
    4247#include <assert.h>
    43 #include <stdlib.h>
    44 
    45 #include "ThirdParty/glu/gluos.h"
    46 #include "ThirdParty/glu/libtess/geom.h"
    47 #include "ThirdParty/glu/libtess/mesh.h"
    48 #include "ThirdParty/glu/libtess/tessmono.h"
    4948
    5049#define AddWinding(eDst,eSrc)   (eDst->winding += eSrc->winding, \
  • trunk/Tools/ChangeLog

    r87176 r87178  
     12011-05-24  Stephen White  <senorblanco@chromium.org>
     2
     3        Reviewed by Kenneth Russell.
     4
     5        Remove most style checks on Source/ThirdParty/glu, since it doesn't
     6        follow WebKit style.
     7        https://bugs.webkit.org/show_bug.cgi?id=61365
     8
     9        * Scripts/webkitpy/style/checker.py:
     10
    1112011-05-24  Adam Roben  <aroben@apple.com>
    212
  • trunk/Tools/Scripts/webkitpy/style/checker.py

    r86165 r87178  
    207207      "-build/header_guard",
    208208      "-build/include_order"]),
     209
     210    ([# glu's libtess is third-party code, and doesn't follow WebKit style.
     211      "Source/ThirdParty/glu"],
     212     ["-readability",
     213      "-whitespace",
     214      "-build/header_guard",
     215      "-build/include_order"]),
    209216]
    210217
Note: See TracChangeset for help on using the changeset viewer.