gfx/angle/angle-build-ttype.patch

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 From: Jeff Gilbert <jgilbert@mozilla.com>
     3 diff --git a/gfx/angle/src/compiler/Types.h b/gfx/angle/src/compiler/Types.h
     4 --- a/gfx/angle/src/compiler/Types.h
     5 +++ b/gfx/angle/src/compiler/Types.h
     6 @@ -90,17 +90,17 @@ private:
     7  //
     8  // Base class for things that have a type.
     9  //
    10  class TType
    11  {
    12  public:
    13      POOL_ALLOCATOR_NEW_DELETE();
    14      TType() {}
    15 -    TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s = 1, bool m = false, bool a = false) :
    16 +    TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, char s = 1, bool m = false, bool a = false) :
    17              type(t), precision(p), qualifier(q), size(s), matrix(m), array(a), arraySize(0), structure(0)
    18      {
    19      }
    20      explicit TType(const TPublicType &p);
    21      TType(TStructure* userDef, TPrecision p = EbpUndefined) :
    22              type(EbtStruct), precision(p), qualifier(EvqTemporary), size(1), matrix(false), array(false), arraySize(0), structure(userDef)
    23      {
    24      }
    25 @@ -229,22 +229,22 @@ public:
    27      bool isStructureContainingArrays() const {
    28          return structure ? structure->containsArrays() : false;
    29      }
    31  private:
    32      TString buildMangledName() const;
    34 -    TBasicType type      : 6;
    35 +    TBasicType type;
    36      TPrecision precision;
    37 -    TQualifier qualifier : 7;
    38 -    int size             : 8; // size of vector or matrix, not size of array
    39 -    unsigned int matrix  : 1;
    40 -    unsigned int array   : 1;
    41 +    TQualifier qualifier;
    42 +    char size; // size of vector or matrix, not size of array
    43 +    bool matrix;
    44 +    bool array;
    45      int arraySize;
    47      TStructure* structure;      // 0 unless this is a struct
    49      mutable TString mangled;
    50  };
    52  //

mercurial