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.

michael@0 1 /*
michael@0 2 * Copyright 2013 Google Inc.
michael@0 3 *
michael@0 4 * Use of this source code is governed by a BSD-style license that can be
michael@0 5 * found in the LICENSE file.
michael@0 6 */
michael@0 7
michael@0 8 #ifndef GrCustomCoordsTextureEffect_DEFINED
michael@0 9 #define GrCustomCoordsTextureEffect_DEFINED
michael@0 10
michael@0 11 #include "GrEffect.h"
michael@0 12 #include "GrVertexEffect.h"
michael@0 13
michael@0 14 class GrGLCustomCoordsTextureEffect;
michael@0 15
michael@0 16 /**
michael@0 17 * The output color of this effect is a modulation of the input color and a sample from a texture.
michael@0 18 * It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input
michael@0 19 * coords are a custom attribute.
michael@0 20 */
michael@0 21 class GrCustomCoordsTextureEffect : public GrVertexEffect {
michael@0 22 public:
michael@0 23 static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& p) {
michael@0 24 AutoEffectUnref effect(SkNEW_ARGS(GrCustomCoordsTextureEffect, (tex, p)));
michael@0 25 return CreateEffectRef(effect);
michael@0 26 }
michael@0 27
michael@0 28 virtual ~GrCustomCoordsTextureEffect() {}
michael@0 29
michael@0 30 static const char* Name() { return "Texture"; }
michael@0 31
michael@0 32 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
michael@0 33
michael@0 34 typedef GrGLCustomCoordsTextureEffect GLEffect;
michael@0 35
michael@0 36 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE;
michael@0 37
michael@0 38 private:
michael@0 39 GrCustomCoordsTextureEffect(GrTexture* texture, const GrTextureParams& params);
michael@0 40
michael@0 41 virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE;
michael@0 42
michael@0 43 GrTextureAccess fTextureAccess;
michael@0 44
michael@0 45 GR_DECLARE_EFFECT_TEST;
michael@0 46
michael@0 47 typedef GrVertexEffect INHERITED;
michael@0 48 };
michael@0 49
michael@0 50 #endif

mercurial