Name Description Size
mac
SkBitSet.h Set the value of the index-th bit to true. 4645
SkCallableTraits.h Infer the return_type and argument<N> of a callable type T. 2970
SkCamera.cpp 7268
SkCanvasStack.cpp Traverse all canvases (e.g. layers) the stack and ensure that they are clipped to their bounds and that the area covered by any canvas higher in the stack is also clipped out. 4137
SkCanvasStack.h Like NWayCanvas, in that it forwards all canvas methods to each sub-canvas that is "pushed". Unlike NWayCanvas, this takes ownership of each subcanvas, and deletes them when this canvas is deleted. 2510
SkCanvasStateUtils.cpp WARNING: The structs below are part of a stable ABI and as such we explicitly use unambigious primitives (e.g. int32_t instead of an enum). ANY CHANGES TO THE STRUCTS BELOW THAT IMPACT THE ABI SHOULD RESULT IN A NEW NEW SUBCLASS OF SkCanvasState. SUCH CHANGES SHOULD ONLY BE MADE IF ABSOLUTELY NECESSARY! In order to test changes, run the CanvasState tests. gyp/canvas_state_lib.gyp describes how to create a library to pass to the CanvasState tests. The tests should succeed when building the library with your changes and passing that to the tests running in the unchanged Skia. 11370
SkCharToGlyphCache.cpp 3741
SkCharToGlyphCache.h Given a unichar, return its glyphID (if the return value is positive), else return ~index of where to insert the computed glyphID. int result = cache.charToGlyph(unichar); if (result >= 0) { glyphID = result; } else { glyphID = compute_glyph_using_typeface(unichar); cache.insertCharAndGlyph(~result, unichar, glyphID); } 1757
SkClipStackUtils.cpp 1489
SkClipStackUtils.h 455
SkCustomTypeface.cpp ?? 16483
SkDashPath.cpp 18017
SkDashPathPriv.h Calculates the initialDashLength, initialDashIndex, and intervalLength based on the inputed phase and intervals. If adjustedPhase is passed in, then the phase will be adjusted to be between 0 and intervalLength. The result will be stored in adjustedPhase. If adjustedPhase is nullptr then it is assumed phase is already between 0 and intervalLength Caller should have already used ValidDashPath to exclude invalid data. 2302
SkEventTracer.cpp 2268
SkFloatToDecimal.cpp Write a string into output, including a terminating '\0' (for unit testing). Return strlen(output) (for SkWStream::write) The resulting string will be in the form /[-]?([0-9]*.)?[0-9]+/ and sscanf(output, "%f", &x) will return the original value iff the value is finite. This function accepts all possible input values. Motivation: "PDF does not support [numbers] in exponential format (such as 6.02e23)." Otherwise, this function would rely on a sprintf-type function from the standard library. 6708
SkFloatToDecimal.h \fn SkFloatToDecimal Convert a float into a decimal string. The resulting string will be in the form `[-]?([0-9]*\.)?[0-9]+` (It does not use scientific notation.) and `sscanf(output, "%f", &x)` will return the original value if the value is finite. This function accepts all possible input values. INFINITY and -INFINITY are rounded to FLT_MAX and -FLT_MAX. NAN values are converted to 0. This function will always add a terminating '\0' to the output. @param value Any floating-point number @param output The buffer to write the string into. Must be non-null. @return strlen(output) 1035
SkFloatUtils.h Bits is a unsigned integer the same size as the floating point number. 5795
SkMatrix22.cpp 1090
SkMatrix22.h Find the Givens matrix G, which is the rotational matrix that rotates the vector h to the positive hoizontal axis. G * h = [hypot(h), 0] This is equivalent to SkScalar r = h.length(); SkScalar r_inv = r ? SkScalarInvert(r) : 0; h.scale(r_inv); G->setSinCos(-h.fY, h.fX); but has better numerical stability by using (partial) hypot, and saves a multiply by not computing r. 748
SkMultiPictureDocument.cpp File format: BEGINNING_OF_FILE: kMagic uint32_t version_number (==2) uint32_t page_count { float sizeX float sizeY } * page_count skp file 7001
SkMultiPictureDocumentPriv.h Additional API allows one to read the array of page-sizes without parsing the entire file. Used by DM. 650
SkNullCanvas.cpp 477
SkNWayCanvas.cpp 11596
SkOrderedFontMgr.cpp 3125
SkOSPath.cpp 1154
SkOSPath.h Functions for modifying SkStrings which represent paths on the filesystem. 1719
SkPaintFilterCanvas.cpp 10982
SkParse.cpp 5850
SkParseColor.cpp 10877
SkParsePath.cpp 9382
SkPatchUtils.cpp Evaluator to sample the values of a cubic bezier using forward differences. Forward differences is a method for evaluating a nth degree polynomial at a uniform step by only adding precalculated values. For a linear example we have the function f(t) = m*t+b, then the value of that function at t+h would be f(t+h) = m*(t+h)+b. If we want to know the uniform step that we must add to the first evaluation f(t) then we need to substract f(t+h) - f(t) = m*t + m*h + b - m*t + b = mh. After obtaining this value (mh) we could just add this constant step to our first sampled point to compute the next one. For the cubic case the first difference gives as a result a quadratic polynomial to which we can apply again forward differences and get linear function to which we can apply again forward differences to get a constant difference. This is why we keep an array of size 4, the 0th position keeps the sampled value while the next ones keep the quadratic, linear and constant difference values. 15160
SkPatchUtils.h Get the points corresponding to the top cubic of cubics. 1687
SkPolyUtils.cpp 65847
SkPolyUtils.h Generates a polygon that is inset a constant from the boundary of a given convex polygon. The input polygon is expected to have values clamped to the nearest 1/16th. @param inputPolygonVerts Array of points representing the vertices of the original polygon. It should be convex and have no coincident points. @param inputPolygonSize Number of vertices in the original polygon. @param inset How far we wish to inset the polygon. This should be a positive value. @param insetPolygon The resulting inset polygon, if any. @return true if an inset polygon exists, false otherwise. 5159
SkShaderUtils.cpp The heart and soul of our prettification algorithm. The rules should hopefully be self explanatory. For '#' and '//' tokens, we parse until we reach a newline. For long style comments like this one, we search for the ending token. We also preserve whitespace in these comments WITH THE CAVEAT that we do the newlines ourselves. This allows us to remain in control of line numbers, and matching tabs. Existing tabs in the input string are copied over too, but this will look funny. '{' and '}' are handled in basically the same way. We add a newline if we aren't on a fresh line, dirty the line, then add a second newline, i.e. braces are always on their own lines indented properly. '(' and ')' are basically ignored, except as a sign that we need to ignore ';', since we want to keep for loops on a single line. ';' means add a new line. If the previous character was a '}', we make sure that the semicolon comes directly after the brace, not on a newline. ',' doesn't add a new line, but does have special handling to ensure it is on the same line as a '}', much like the semicolon. '\t' and '\n' are ignored in general parsing for backwards compatibility with existing shader code. We also have a special case for handling whitespace at the beginning of fresh lines. Otherwise, just add the new character to the pretty string, indenting if necessary. 9319
SkShaderUtils.h 1124
SkShadowTessellator.cpp Base class 44043
SkShadowTessellator.h This function generates an ambient shadow mesh for a path by walking the path, outsetting by the radius, and setting inner and outer colors to umbraColor and penumbraColor, respectively. If transparent is true, then the center of the ambient shadow will be filled in. 1535
SkShadowUtils.cpp Factory for an ambient shadow mesh with particular shadow properties. 36469
SkTestCanvas.cpp 6449
SkTestCanvas.h 2111
SkTextUtils.cpp 1846
win