gfx/skia/trunk/src/gpu/effects/GrVertexEffect.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 2013 Google Inc.
     3  *
     4  * Use of this source code is governed by a BSD-style license that can be
     5  * found in the LICENSE file.
     6  */
     8 #ifndef GrVertexEffect_DEFINED
     9 #define GrVertexEffect_DEFINED
    11 #include "GrEffect.h"
    13 /**
    14  * If an effect needs specialized vertex shader code, then it must inherit from this class.
    15  * Otherwise it won't be able to add vertex attribs, and it might be given a vertexless shader
    16  * program in emitCode.
    17  */
    18 class GrVertexEffect : public GrEffect {
    19 public:
    20     GrVertexEffect() { fHasVertexCode = true; }
    22 protected:
    23     /**
    24      * Subclasses call this from their constructor to register vertex attributes (at most
    25      * kMaxVertexAttribs). This must only be called from the constructor because GrEffects are
    26      * immutable.
    27      */
    28     void addVertexAttrib(GrSLType type) {
    29         SkASSERT(fVertexAttribTypes.count() < kMaxVertexAttribs);
    30         fVertexAttribTypes.push_back(type);
    31     }
    33 private:
    34     typedef GrEffect INHERITED;
    35 };
    37 #endif

mercurial