gfx/angle/src/compiler/VariableInfo.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 //
     2 // Copyright (c) 2002-2011 The ANGLE Project Authors. All rights reserved.
     3 // Use of this source code is governed by a BSD-style license that can be
     4 // found in the LICENSE file.
     5 //
     7 #ifndef COMPILER_VARIABLE_INFO_H_
     8 #define COMPILER_VARIABLE_INFO_H_
    10 #include "GLSLANG/ShaderLang.h"
    11 #include "compiler/intermediate.h"
    13 // Provides information about a variable.
    14 // It is currently being used to store info about active attribs and uniforms.
    15 struct TVariableInfo {
    16     TVariableInfo(ShDataType type, int size);
    17     TVariableInfo();
    19     TPersistString name;
    20     TPersistString mappedName;
    21     ShDataType type;
    22     int size;
    23 };
    24 typedef std::vector<TVariableInfo> TVariableInfoList;
    26 // Traverses intermediate tree to collect all attributes and uniforms.
    27 class CollectAttribsUniforms : public TIntermTraverser {
    28 public:
    29     CollectAttribsUniforms(TVariableInfoList& attribs,
    30                            TVariableInfoList& uniforms,
    31                            ShHashFunction64 hashFunction);
    33     virtual void visitSymbol(TIntermSymbol*);
    34     virtual void visitConstantUnion(TIntermConstantUnion*);
    35     virtual bool visitBinary(Visit, TIntermBinary*);
    36     virtual bool visitUnary(Visit, TIntermUnary*);
    37     virtual bool visitSelection(Visit, TIntermSelection*);
    38     virtual bool visitAggregate(Visit, TIntermAggregate*);
    39     virtual bool visitLoop(Visit, TIntermLoop*);
    40     virtual bool visitBranch(Visit, TIntermBranch*);
    42 private:
    43     TVariableInfoList& mAttribs;
    44     TVariableInfoList& mUniforms;
    46     ShHashFunction64 mHashFunction;
    47 };
    49 #endif  // COMPILER_VARIABLE_INFO_H_

mercurial