Use SkImage_Raster's unique ID to cache textures.

SkImages can share SkBitmaps and have different unique IDs/mipmap
status. Currently we cache the texture version using the bitmap's
unique ID. Instead use the image's ID so different images produce
different textures (e.g. mipped and nonmipped).

Bug: skia:11983
Change-Id: Ic37564186f675277e5a9de1bcf36b40a19c3a3de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407356
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 files changed