skia2/gn
Hal Canary 94fd66cc25 SkPDF: Refactor PDFShader to use ShTHashMap<>
my tests run ~14% faster.

  - Split out gradient shaders from image shaders.  new compilation
    unit: SkPDFGradientShader
  - Common functions InverseTransformBBox and PopulateTilingPatternDict
    moved to SkPDFUtils
  - Split SkPDFShader::State into image and gradient structures.
  - SkPDFCanon is now a simpler structure, with no logic of its own.
    I am considering just moving all of its fields into SkPDFDocument
  - SkPDFShader::State (the image/fallback shader) now is POD, making
    the use of a hashmap for canonicalization straightforward.
    Formerly, we used a linear search.
  - Do not bother trying to canonicalize the falback image shader.
  - SkPDFGradientShader::Key is not POD; comparison of two objects
    requires looking at the contents of two variable-sized arrays.
    We now pre-calculate the hash of the arrays using SkOpts::hash and
    store a hash for the object in the fHash field.
    Using that hash, we can now canonicalize using a hashmap instead
    of a linar search!
  - several static functions renamed to follow style guidelines
  - stop using codeFunction function pointer; I find that less
    clear than it could be.
  - operator==() for SkPDFShader::State and SkPDFGradientShader::Key is
    now much simpler and can now be inlined.
  - SkArrayEqual template in SkPDFUtils.h

No change to PDF output.

BUG=skia:3585
Change-Id: I354ad1b600be6d6749abccb58d13db257370bc0b
Reviewed-on: https://skia-review.googlesource.com/21376
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-07-05 17:27:54 +00:00
..
toolchain Re-re-land sksl fragment processor support 2017-06-29 14:57:47 +00:00
__init__.py Make gn directory importable in python 2017-03-20 17:40:30 +00:00
android_framework_defines.gni Revert "enable new tiling for android" 2017-07-05 15:17:23 +00:00
ar.py GN: quiet alink spam on Mac 2016-11-07 14:19:32 +00:00
bench.gni Add a nanobench for drawing glyphs as paths 2017-07-05 15:38:22 +00:00
BUILD.gn Re-re-land sksl fragment processor support 2017-06-29 14:57:47 +00:00
BUILDCONFIG.gn Re-re-land sksl fragment processor support 2017-06-29 14:57:47 +00:00
compile_processors.py Re-re-land sksl fragment processor support 2017-06-29 14:57:47 +00:00
core.gni Move threaded BMP device to samples 2017-06-26 17:42:00 +00:00
cp.py GN: get Angle compiling on Windows. 2016-10-17 16:16:16 +00:00
effects.gni Revert "remove unused TableMaskFilter" 2017-06-19 02:50:18 +00:00
find_headers.py Revert "Revert "Update skia to use ifdefs for Vulkan code instead of dummy header"" 2017-06-14 01:43:38 +00:00
find_ios_sysroot.py Add iOS simulator support in GN. 2017-03-13 17:21:43 +00:00
gm.gni Added new edge handling mode (clamp and repeat) to Gaussian blur filter. 2017-06-30 18:11:16 +00:00
gn_helpers.py Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
gn_meta_sln.py Move, rename, and document Visual Studio GN helper script 2016-12-14 16:41:52 +00:00
gn_to_bp.py Implement an SkImage backed by a Android hardware buffer 2017-06-02 14:51:24 +00:00
gn_to_cmake.py Add support for lib_dirs to gn_to_cmake.py. 2016-10-28 15:07:10 +00:00
gpu.gni Move mock gpu and caps, add Gr prefix, and create via GrContext::Create 2017-06-23 15:42:15 +00:00
gypi_to_gn.py Add executable bit and shebang to python files 2016-08-18 04:36:25 -07:00
is_clang.py GN: match shell behavior for cc and cxx in is_clang.py 2016-09-27 09:29:24 -07:00
opts.gni remove MIPS DSP optimizations 2016-12-21 03:55:00 +00:00
package_ios.py Automate more parts of gn/package_ios.py. 2017-01-31 17:41:16 +00:00
pdf.gni SkPDF: Refactor PDFShader to use ShTHashMap<> 2017-07-05 17:27:54 +00:00
push_to_android.py skia_android_serial = "auto" 2017-01-12 16:30:17 +00:00
samples.gni remove unneeded code for index8 imagse 2017-07-03 19:07:25 +00:00
shared_sources.gni remove MIPS DSP optimizations 2016-12-21 03:55:00 +00:00
sksl.gni Re-re-land sksl fragment processor support 2017-06-29 14:57:47 +00:00
tests.gni Re-re-land sksl fragment processor support 2017-06-29 14:57:47 +00:00
utils.gni Remove EXPERIMENTAL_SHADOWING, Part 1 2017-05-02 17:22:44 +00:00
xps.gni SkXPS: new document API. 2017-02-06 19:00:28 +00:00