mac |
|
|
SkAnimCodecPlayer.cpp |
|
5498 |
SkBase64.cpp |
|
4515 |
SkBitSet.h |
Set the value of the index-th bit to true. |
4645 |
SkBlitterTrace.h |
scanlines= |
2412 |
SkBlitterTraceCommon.h |
This class collects information for RasterPipeLine vs SkVM
performance comparison.
How to get the comparison table:
1. Add to your Release/args.gn an argument: skia_compare_vm_vs_rp=true
Build nanobench.
2. Run nanobench for SkVM:
[]/Release/nanobench
--csv --config 8888 --skvm --loops 100 --samples 1
--match $(ls skps | grep --invert-match svg ) 2>&1 | tee VM.data
3. Run nanobench for RasterPipeLine:
[]/Release/nanobench
--csv --config 8888 --forceRasterPipeline --loops 100
--samples 1 --match $(ls skps | grep --invert-match svg )
2>&1 | tee RP.data
4. Extract the information side-by-side:
awk 'BEGIN {OFS=","; fileNum = 0} ($2 ~ /MB/) && fileNum == 0
{vmvmcycles[$3] = $6; vmvmscan[$3] = $8; vmvmpixels[$3] = $10;
vmvminterp[$3] = $11; vmrpcycle[$3] = $14; vmrpscan[$3] = $16;
vmrppixels[$3] = $18} ($2 ~ /MB/) && fileNum == 1 {print $3,
vmvmcycles[$3], vmvmscan[$3], vmvmpixels[$3], vmvminterp[$3], $6, $8,
$10, $11, $14, $16, $18} ENDFILE {fileNum += 1}'
VM.data RP.data > compare.csv
5. Open the compare.csv table in Google Spreadsheets.
You will get columns [A:P]. Add 4 more columns with formulas:
Q: =B/M-1
R: =N-C
S: =O-D
T: =2*(S<>0)+(R<>0)
To be honest R, S, T columns are here for checking only (they all
supposed to have zero values in them)
Column Q shows the actual performance difference. Negative value means
that wins SkVM, positive - RasterPipeLine.
|
6205 |
SkCallableTraits.h |
Infer the return_type and argument<N> of a callable type T. |
2970 |
SkCamera.cpp |
|
7256 |
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.
|
2498 |
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.
|
11385 |
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 |
?? |
16857 |
SkCycles.h |
|
1505 |
SkDashPath.cpp |
|
17870 |
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 |
SkGaussianColorFilter.cpp |
Remaps the input color's alpha to a Gaussian ramp and then outputs premul white using the
remapped alpha.
|
4468 |
SkJSON.cpp |
|
29877 |
SkJSON.h |
A fast and likely non-conforming JSON parser.
Some known limitations/compromises:
-- single-precision FP numbers
-- missing string unescaping (no current users, could be easily added)
Values are opaque, fixed-size (64 bits), immutable records.
They can be converted to facade types for type-specific functionality.
E.g.:
if (v.is<ArrayValue>()) {
for (const auto& item : v.as<ArrayValue>()) {
if (const NumberValue* n = item) {
printf("Found number: %f", **n);
}
}
}
if (v.is<ObjectValue>()) {
const StringValue* id = v.as<ObjectValue>()["id"];
if (id) {
printf("Found object ID: %s", id->begin());
} else {
printf("Missing object ID");
}
}
|
10847 |
SkJSONWriter.cpp |
|
1149 |
SkJSONWriter.h |
Lightweight class for writing properly structured JSON data. No random-access, everything must
be generated in-order. The resulting JSON is written directly to the SkWStream supplied at
construction time. Output is buffered, so writing to disk (via an SkFILEWStream) is ideal.
There is a basic state machine to ensure that JSON is structured correctly, and to allow for
(optional) pretty formatting.
This class adheres to the RFC-4627 usage of JSON (not ECMA-404). In other words, all JSON
created with this class must have a top-level object or array. Free-floating values of other
types are not considered valid.
Note that all error checking is in the form of asserts - invalid usage in a non-debug build
will simply produce invalid JSON.
|
15091 |
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
|
7170 |
SkMultiPictureDocument.h |
Writes into a file format that is similar to SkPicture::serialize()
Accepts a callback for endPage behavior
|
1474 |
SkMultiPictureDocumentPriv.h |
Additional API allows one to read the array of page-sizes without parsing
the entire file. Used by DM.
|
638 |
SkNullCanvas.cpp |
|
477 |
SkNWayCanvas.cpp |
|
11708 |
SkOrderedFontMgr.cpp |
|
3256 |
SkOSPath.cpp |
|
1154 |
SkOSPath.h |
Functions for modifying SkStrings which represent paths on the filesystem.
|
1719 |
SkPaintFilterCanvas.cpp |
|
10982 |
SkParse.cpp |
|
5850 |
SkParseColor.cpp |
|
10876 |
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 |
|
65849 |
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, ie braces are always
on their own lines indented properly. The one funkiness here is structs print
with the semicolon on its own line. Its not a problem for a glsl compiler though
'(' and ')' are basically ignored, except as a sign we need to ignore ';' ala
in for loops.
';' means add a new line
'\t' and '\n' are ignored in general parsing for backwards compatability with
existing shader code and 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.
|
7972 |
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. |
36473 |
SkTestCanvas.h |
|
2099 |
SkTextUtils.cpp |
|
1846 |
SkVMVisualizer.cpp |
|
19435 |
SkVMVisualizer.h |
|
3544 |
win |
|
|