gfx/angle/src/libGLESv2/renderer/shaders/Blit.ps

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 (c) 2012 The ANGLE Project Authors. All rights reserved.
michael@0 3 // Use of this source code is governed by a BSD-style license that can be
michael@0 4 // found in the LICENSE file.
michael@0 5 //
michael@0 6
michael@0 7 sampler2D tex : s0;
michael@0 8
michael@0 9 uniform float4 mode : c0;
michael@0 10
michael@0 11 // Passthrough Pixel Shader
michael@0 12 // Outputs texture 0 sampled at texcoord 0.
michael@0 13 float4 passthroughps(float4 texcoord : TEXCOORD0) : COLOR
michael@0 14 {
michael@0 15 return tex2D(tex, texcoord.xy);
michael@0 16 };
michael@0 17
michael@0 18 // Luminance Conversion Pixel Shader
michael@0 19 // Outputs sample(tex0, tc0).rrra.
michael@0 20 // For LA output (pass A) set C0.X = 1, C0.Y = 0.
michael@0 21 // For L output (A = 1) set C0.X = 0, C0.Y = 1.
michael@0 22 float4 luminanceps(float4 texcoord : TEXCOORD0) : COLOR
michael@0 23 {
michael@0 24 float4 tmp = tex2D(tex, texcoord.xy);
michael@0 25 tmp.w = tmp.w * mode.x + mode.y;
michael@0 26 return tmp.xxxw;
michael@0 27 };
michael@0 28
michael@0 29 // RGB/A Component Mask Pixel Shader
michael@0 30 // Outputs sample(tex0, tc0) with options to force RGB = 0 and/or A = 1.
michael@0 31 // To force RGB = 0, set C0.X = 0, otherwise C0.X = 1.
michael@0 32 // To force A = 1, set C0.Z = 0, C0.W = 1, otherwise C0.Z = 1, C0.W = 0.
michael@0 33 float4 componentmaskps(float4 texcoord : TEXCOORD0) : COLOR
michael@0 34 {
michael@0 35 float4 tmp = tex2D(tex, texcoord.xy);
michael@0 36 tmp.xyz = tmp.xyz * mode.x;
michael@0 37 tmp.w = tmp.w * mode.z + mode.w;
michael@0 38 return tmp;
michael@0 39 };

mercurial