cc: Remove PaintCanvas::drawBitmap API.

The PaintCanvas API for drawing SkBitmaps has 2 short-comings when used
with a recording canvas:

1) It re-generates a PaintImage with a new key for potentially same
bitmaps.

2) It creates an internal SkImage wrapping this bitmap, which may incur
a copy of the pixels if the bitmap is not marked immutable.

Both of the above are also non-obvious from the API. Remove it and
switch callers to use PaintImages instead. The main user of this is ui/,
which already caches bitmaps for reuse in ImageSkiaRep. Also cache a
PaintImage with it to ensure we use a stable key for the bitmap.

[email protected]

Bug: 851282
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I0ef7e8db798778b52b74a96dbf1a143fbead2ba9
Reviewed-on: https://chromium-review.googlesource.com/1110950
Reviewed-by: Robert Sesek <[email protected]>
Reviewed-by: danakj <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Chris Harrelson <[email protected]>
Reviewed-by: Evan Stade <[email protected]>
Commit-Queue: Khushal <[email protected]>
Cr-Commit-Position: refs/heads/master@{#570532}
21 files changed