Go to file
mtklein 0c263fa9f8 Deduplicate typefaces across sub-pictures
Old flow to serialize a picture:
   1) serialize picture ops
   2) serialize all sub pictures recursively
   3) flatten the rest of this picture into a buffer, deduping flattenable factories and typefaces as we go
   4) serialize the factories and typefaces
   5) serialize the bytes from 3)

This allows the data in step 5) to refer to the deduplicated factories and typefaces from step 4).  But, each sub picture in step 2) is completely siloed, so they can't dedup with the parent picture or each other.

New flow:
   1) serialize picture ops
   2) flatten the rest of this picture into a buffer, deduping flattenable factories and typefaces as we go
   3) dummy-serialize sub pictures into /dev/null, with the effect of adding any new typefaces to our dedup set
   4) serialize the factories and typefaces
   5) serialize the bytes from 2)
   6) serialize all sub pictures recursively, with perfect deduplication because of step 3).

Now all typefaces in the top-level picture and all sub pictures recursively should end up deduplicated in the top-level typeface set.

Decoding changes are similar: we just thread through the top-level typefaces to the sub pictures.  What's convenient / surprising is that this new code correctly reads old pictures if we just have each picture prefer its local typeface set over the top-level one: old pictures always just use their own typefaces, and new pictures always use the top-level ones.

BUG=skia:4092

Review URL: https://codereview.chromium.org/1233953004
2015-08-18 08:29:59 -07:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench flag to use const& instead of const* for src-rect 2015-08-06 10:02:53 -07:00
bin Change to use mean and to use stderr. 2015-07-09 10:50:24 -07:00
debugger Fix no-gpu debugger. 2015-07-31 15:46:03 -07:00
dm Support more swizzles to 565 in SkCodec 2015-08-14 08:32:46 -07:00
example Propagate SkSurfaceProps to more call sites 2015-06-23 06:26:08 -07:00
experimental Remove experimental/PdfViewer 2015-08-04 14:08:44 -07:00
forth Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
gm Move normal map creation methods to sk_tools 2015-08-17 15:04:47 -07:00
gyp Remove SkOpts_sse2.cpp. 2015-08-18 05:18:53 -07:00
include Deduplicate typefaces across sub-pictures 2015-08-18 08:29:59 -07:00
infra Build buckets: tryjob access 2015-07-30 10:32:27 -07:00
platform_tools Switching Skia to chromium's libjpeg-turbo 2015-08-11 13:32:54 -07:00
resources Fix bmp RLE "bug" 2015-08-12 08:08:56 -07:00
samplecode support both box and circle lcd 2015-08-15 14:02:29 -07:00
site Move Perf documentation to the testing section 2015-08-11 07:00:01 -07:00
src Deduplicate typefaces across sub-pictures 2015-08-18 08:29:59 -07:00
tests fix pathops fuzz failures 2015-08-18 07:12:44 -07:00
third_party Revert of Depend on ETC1 via DEPS instead of a direct third_party checkin. (patchset #1 id:1 of https://codereview.chromium.org/1296253003/ ) 2015-08-17 11:15:00 -07:00
tools Reland of Fix a few bugs in the google3 sync scripts. (patchset #1 id:1 of https://codereview.chromium.org/1295213002/ ) 2015-08-18 06:25:14 -07:00
.gitignore Update Android Apps to use gradle 2015-07-24 13:15:59 -07:00
AUTHORS Optimize RGB16 blitV functions with NEON for ARM platform. 2015-07-15 07:07:30 -07:00
BUILD.public Remove a couple zombie pathops files. 2015-08-18 05:51:56 -07:00
codereview.settings Automatically add a docs preview link and NOTRY=true when there are only docs changes. 2015-02-26 10:16:13 -08:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Add benjaminwagner@ to CQ_COMMITTERS. 2015-06-08 10:22:34 -07:00
DEPS Revert of Depend on ETC1 via DEPS instead of a direct third_party checkin. (patchset #1 id:1 of https://codereview.chromium.org/1296253003/ ) 2015-08-17 11:15:00 -07:00
Doxyfile Documentation: SkCanvas API 2015-05-19 10:21:29 -07:00
gyp_skia Support SKIA_OUT on Mac and ChromeOS 2015-05-04 08:04:28 -07:00
gyp_skia.py Roll gyp deps from 1765 to 1796. 2013-11-21 18:11:14 +00:00
HASHTAGS Fix cr SKPs naming 2015-03-31 08:03:02 -07:00
LICENSE Add files added to Skia HEAD in google3 to the Git repo. 2015-08-17 12:58:10 -07:00
make.bat Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
make.py Fix make.py: BUILDTYPE 2015-08-05 11:30:28 -04:00
Makefile Remove experimental/PdfViewer 2015-08-04 14:08:44 -07:00
OWNERS add root files from chrome 2013-08-13 19:11:15 +00:00
PRESUBMIT.py update presubmit to know about include/private 2015-07-28 08:54:12 -07:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
skia.gyp Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
SKP_VERSION Update SKP version 2015-08-16 00:20:54 -07:00
whitespace.txt Whitespace change to test Gerrit ACLs 2015-08-04 14:23:48 -07:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.