gfx/skia/trunk/src/gpu/effects/GrCustomCoordsTextureEffect.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 GrCustomCoordsTextureEffect_DEFINED
     9 #define GrCustomCoordsTextureEffect_DEFINED
    11 #include "GrEffect.h"
    12 #include "GrVertexEffect.h"
    14 class GrGLCustomCoordsTextureEffect;
    16 /**
    17  * The output color of this effect is a modulation of the input color and a sample from a texture.
    18  * It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input
    19  * coords are a custom attribute.
    20  */
    21 class GrCustomCoordsTextureEffect : public GrVertexEffect {
    22 public:
    23     static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& p) {
    24         AutoEffectUnref effect(SkNEW_ARGS(GrCustomCoordsTextureEffect, (tex, p)));
    25         return CreateEffectRef(effect);
    26     }
    28     virtual ~GrCustomCoordsTextureEffect() {}
    30     static const char* Name() { return "Texture"; }
    32     virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
    34     typedef GrGLCustomCoordsTextureEffect GLEffect;
    36     virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE;
    38 private:
    39     GrCustomCoordsTextureEffect(GrTexture* texture, const GrTextureParams& params);
    41     virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE;
    43     GrTextureAccess fTextureAccess;
    45     GR_DECLARE_EFFECT_TEST;
    47     typedef GrVertexEffect INHERITED;
    48 };
    50 #endif

mercurial