gfx/skia/trunk/include/utils/SkPathUtils.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 * CAUTION: EXPERIMENTAL CODE
michael@0 3 *
michael@0 4 * This code is not to be used and will not be supported
michael@0 5 * if it fails on you. DO NOT USE!
michael@0 6 *
michael@0 7 */
michael@0 8
michael@0 9 #ifndef SkPathUtils_DEFINED
michael@0 10 #define SkPathUtils_DEFINED
michael@0 11
michael@0 12 #include "SkPath.h"
michael@0 13
michael@0 14 /*
michael@0 15 * The following methods return the boundary path given a 1-bit bitmap, specified
michael@0 16 * by width/height and stride. The bits are interpreted as 1 being "in" the path,
michael@0 17 * and 0 being "out". The bits are interpreted as MSB on the left, and LSB on the right.
michael@0 18 */
michael@0 19
michael@0 20 class SK_API SkPathUtils {
michael@0 21 public:
michael@0 22 /**
michael@0 23 This variation iterates the binary data sequentially (as in scanline fashion)
michael@0 24 and will add each run of 1's to the path as a rectangular path. Upon parsing
michael@0 25 all binary data the path is simplified using the PathOps::Simplify() method.
michael@0 26 */
michael@0 27 static void BitsToPath_Path(SkPath* path, const char* bitmap,
michael@0 28 int w, int h, int rowBytes);
michael@0 29
michael@0 30 /**
michael@0 31 This variation utilizes the SkRegion class to generate paths, adding
michael@0 32 each run of 1's to the SkRegion as an SkIRect. Upon parsing the entirety
michael@0 33 of the binary the SkRegion is converted to a Path via getBoundaryPath().
michael@0 34 */
michael@0 35 static void BitsToPath_Region(SkPath* path, const char* bitmap,
michael@0 36 int w, int h, int rowBytes);
michael@0 37
michael@0 38 };
michael@0 39
michael@0 40 #endif

mercurial