diff options
author | 2015-10-01 07:28:13 -0700 | |
---|---|---|
committer | 2015-10-01 07:28:13 -0700 | |
commit | 7a14b310d6c618fa2151d93a43b29f9599adc32a (patch) | |
tree | 0df57a285df727f8f892155ea4017eb7072c39ef /dm | |
parent | 7bdd70ab9162980f3173c98c48234f9f345665a3 (diff) |
SkPDF: Implement drawImage*() properly
drawImage calls now properly embeds the original jpeg.
NOTE: drawBitmap*() calls no longer embed JPEG files when
possible (this is in advance of eliminating bitmaps backed
by encoded data). Chromium has already moved from
drawBitmap to drawImage.
Comparisons:
control:
total PDF drawImage/drawBitmap calls: 8010
total PDF jpeg images: 0
total PDF regular images: 3581
experiament:
total PDF drawImage/drawBitmap calls: 8014
total PDF jpeg images: 271
total PDF regular images: 3311
total PDF regular images: 3582 (271 + 3311)
When comparing rendered output there were perceptual
differences in the following four GMs: colorcube, emboss,
colormatrix, and tablecolorfilter. All of these differences
were improvements (that is, closer to the 8888 rendering)
due fixing a bug with colorfilters and forgetting to call
notifyPixelsChanged.
No SKPs had perceptual differences.
Total PDF size dropped from 133964 kB to 126276 kB, a 5.7%
improvement (mostly due to restoring use of JPG images in
SKPs).
BUG=skia:4370
Review URL: https://codereview.chromium.org/1372783003
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DM.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -29,6 +29,10 @@ #include "Timer.h" #include "sk_tool_utils.h" +#ifdef SK_PDF_IMAGE_STATS +extern void SkPDFImageDumpStats(); +#endif + #ifdef SKIA_PNG_PREFIXED // this must proceed png.h #include "pngprefix.h" @@ -1105,6 +1109,9 @@ int dm_main() { SkDebugf("Hrm, we didn't seem to run everything we intended to! Please file a bug.\n"); return 1; } + #ifdef SK_PDF_IMAGE_STATS + SkPDFImageDumpStats(); + #endif // SK_PDF_IMAGE_STATS return 0; } |