SkPDF: Re-use Jpeg Image Shaders

Also, de-dup shader better.

  - SkBitmapKeyFromImage function factors out image de-dup code.
  - SkPDFUtils::ToBitmap funtion factors out to-bitmap code
  - make_image_shader function now takes Image rather than Bitmap.

All tests render the same.  Some are significantly smaller PDFs.

Change-Id: Id8dd36b31c8e573f44a5e9f6058d5a1d622b6385
Reviewed-on: https://skia-review.googlesource.com/24081
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
6 files changed