| commit | c69f6234783b9c2a1e304bed3a1187cb1030ad30 | [log] [tgz] |
|---|---|---|
| author | Kaylee Lubick <kjlubick@google.com> | Mon Sep 15 19:00:36 2025 +0000 |
| committer | SkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com> | Tue Sep 16 11:42:12 2025 -0700 |
| tree | e99c22f13e5e40960686e84562c5f79564cb0a67 | |
| parent | c897c35ef8651fe528278b1ffe77f3d3f2602d5e [diff] |
Assume LazyTexture images have successfully been pinned. Inspired by a patch from caihui yang [1]. In SkImage_AndroidFactories.cpp, `DeferredFromAHardwareBuffer` creates one of these LazyTexture images via `DeferredFromTextureGenerator`. If these are passed into `PinAsTexture`, we can return true because the data in the image is already in the GPU cache (or can be there quickly). If we return false, then [2] fails and we do unnecessary work to unpin the other images (evicting them from the cache) and then not using the pin shortcut to do work ahead of time. [1] https://skia-review.googlesource.com/c/skia/+/1054976 [2] http://ac/frameworks/base/libs/hwui/pipeline/skia/SkiaDisplayList.cpp?l=100-105 Change-Id: I58b73e508420bd517ed99fa3a9654cafd27bb580 Bug: b/444322854 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1055656 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: John Reck <jreck@google.com>