tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

0032-Bug-974900-More-missing-include-guards.patch (4433B)


      1 # HG changeset patch
      2 # Parent c8288d0c7a1544a590a0cac9c39397ac10c8a45b
      3 Bug 974900 - Add missing include guards to Skia headers - r=gw280
      4 
      5 diff --git a/gfx/skia/trunk/include/images/SkImages.h b/gfx/skia/trunk/include/images/SkImages.h
      6 --- a/gfx/skia/trunk/include/images/SkImages.h
      7 +++ b/gfx/skia/trunk/include/images/SkImages.h
      8 @@ -1,14 +1,19 @@
      9 /*
     10  * Copyright 2012 Google Inc.
     11  *
     12  * Use of this source code is governed by a BSD-style license that can be
     13  * found in the LICENSE file.
     14  */
     15 
     16 +#ifndef SkImages_DEFINED
     17 +#define SkImages_DEFINED
     18 +
     19 class SkImages {
     20 public:
     21     /**
     22      * Initializes flattenables in the images project.
     23      */
     24     static void InitializeFlattenables();
     25 };
     26 +
     27 +#endif
     28 diff --git a/gfx/skia/trunk/src/core/SkConvolver.h b/gfx/skia/trunk/src/core/SkConvolver.h
     29 --- a/gfx/skia/trunk/src/core/SkConvolver.h
     30 +++ b/gfx/skia/trunk/src/core/SkConvolver.h
     31 @@ -8,16 +8,18 @@
     32 #include "SkSize.h"
     33 #include "SkTypes.h"
     34 #include "SkTArray.h"
     35 
     36 // avoid confusion with Mac OS X's math library (Carbon)
     37 #if defined(__APPLE__)
     38 #undef FloatToConvolutionFixed
     39 #undef ConvolutionFixedToFloat
     40 +#undef FloatToFixed
     41 +#undef FixedToFloat
     42 #endif
     43 
     44 // Represents a filter in one dimension. Each output pixel has one entry in this
     45 // object for the filter values contributing to it. You build up the filter
     46 // list by calling AddFilter for each output pixel (in order).
     47 //
     48 // We do 2-dimensional convolution by first convolving each row by one
     49 // SkConvolutionFilter1D, then convolving each column by another one.
     50 diff --git a/gfx/skia/trunk/src/gpu/GrAAConvexPathRenderer.h b/gfx/skia/trunk/src/gpu/GrAAConvexPathRenderer.h
     51 --- a/gfx/skia/trunk/src/gpu/GrAAConvexPathRenderer.h
     52 +++ b/gfx/skia/trunk/src/gpu/GrAAConvexPathRenderer.h
     53 @@ -3,24 +3,28 @@
     54  * Copyright 2012 Google Inc.
     55  *
     56  * Use of this source code is governed by a BSD-style license that can be
     57  * found in the LICENSE file.
     58  */
     59 
     60 #include "GrPathRenderer.h"
     61 
     62 +#ifndef GrAAConvexPathRenderer_DEFINED
     63 +#define GrAAConvexPathRenderer_DEFINED
     64 
     65 class GrAAConvexPathRenderer : public GrPathRenderer {
     66 public:
     67     GrAAConvexPathRenderer();
     68 
     69     virtual bool canDrawPath(const SkPath& path,
     70                              const SkStrokeRec& stroke,
     71                              const GrDrawTarget* target,
     72                              bool antiAlias) const SK_OVERRIDE;
     73 
     74 protected:
     75     virtual bool onDrawPath(const SkPath& path,
     76                             const SkStrokeRec& stroke,
     77                             GrDrawTarget* target,
     78                             bool antiAlias) SK_OVERRIDE;
     79 };
     80 +
     81 +#endif
     82 diff --git a/gfx/skia/trunk/src/gpu/GrReducedClip.h b/gfx/skia/trunk/src/gpu/GrReducedClip.h
     83 --- a/gfx/skia/trunk/src/gpu/GrReducedClip.h
     84 +++ b/gfx/skia/trunk/src/gpu/GrReducedClip.h
     85 @@ -1,16 +1,19 @@
     86 
     87 /*
     88  * Copyright 2012 Google Inc.
     89  *
     90  * Use of this source code is governed by a BSD-style license that can be
     91  * found in the LICENSE file.
     92  */
     93 
     94 +#ifndef GrReducedClip_DEFINED
     95 +#define GrReducedClip_DEFINED
     96 +
     97 #include "SkClipStack.h"
     98 #include "SkTLList.h"
     99 
    100 namespace GrReducedClip {
    101 
    102 typedef SkTLList<SkClipStack::Element> ElementList;
    103 
    104 enum InitialState {
    105 @@ -36,8 +39,10 @@ SK_API void ReduceClipStack(const SkClip
    106                             const SkIRect& queryBounds,
    107                             ElementList* result,
    108                             int32_t* resultGenID,
    109                             InitialState* initialState,
    110                             SkIRect* tighterBounds = NULL,
    111                             bool* requiresAA = NULL);
    112 
    113 } // namespace GrReducedClip
    114 +
    115 +#endif
    116 diff --git a/gfx/skia/trunk/src/pathops/SkLineParameters.h b/gfx/skia/trunk/src/pathops/SkLineParameters.h
    117 --- a/gfx/skia/trunk/src/pathops/SkLineParameters.h
    118 +++ b/gfx/skia/trunk/src/pathops/SkLineParameters.h
    119 @@ -1,14 +1,18 @@
    120 /*
    121  * Copyright 2012 Google Inc.
    122  *
    123  * Use of this source code is governed by a BSD-style license that can be
    124  * found in the LICENSE file.
    125  */
    126 +
    127 +#ifndef SkLineParameters_DEFINED
    128 +#define SkLineParameters_DEFINED
    129 +
    130 #include "SkPathOpsCubic.h"
    131 #include "SkPathOpsLine.h"
    132 #include "SkPathOpsQuad.h"
    133 
    134 // Sources
    135 // computer-aided design - volume 22 number 9 november 1990 pp 538 - 549
    136 // online at http://cagd.cs.byu.edu/~tom/papers/bezclip.pdf
    137 
    138 @@ -164,8 +168,10 @@ public:
    139         return -a;
    140     }
    141 
    142 private:
    143     double a;
    144     double b;
    145     double c;
    146 };
    147 +
    148 +#endif