gfx/skia/patches/archive/radial-gradients.patch

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 diff --git a/gfx/skia/src/effects/SkGradientShader.cpp b/gfx/skia/src/effects/SkGradientShader.cpp
     2 --- a/gfx/skia/src/effects/SkGradientShader.cpp
     3 +++ b/gfx/skia/src/effects/SkGradientShader.cpp
     4 @@ -1665,17 +1665,20 @@ public:
     5          }
     6          return kRadial2_GradientType;
     7      }
     9      virtual void shadeSpan(int x, int y, SkPMColor* SK_RESTRICT dstC, int count) SK_OVERRIDE {
    10          SkASSERT(count > 0);
    12          // Zero difference between radii:  fill with transparent black.
    13 -        if (fDiffRadius == 0) {
    14 +        // TODO: Is removing this actually correct? Two circles with the 
    15 +        // same radius, but different centers doesn't sound like it
    16 +        // should be cleared
    17 +        if (fDiffRadius == 0 && fCenter1 == fCenter2) {
    18            sk_bzero(dstC, count * sizeof(*dstC));
    19            return;
    20          }
    21          SkMatrix::MapXYProc dstProc = fDstToIndexProc;
    22          TileProc            proc = fTileProc;
    23          const SkPMColor* SK_RESTRICT cache = this->getCache32();
    25          SkScalar foura = fA * 4;

mercurial