Try finding exact scratch texture in cache before approx, take 2
This is a reland of https://skia-review.googlesource.com/c/skia/+/42940 which was reverted since its parent CL had to be reverted. The parent has since relanded. Bug: skia: Change-Id: Ibf4bf7ce0332e4faea9a6e95a40d1c1f07fb0e75 Reviewed-on: https://skia-review.googlesource.com/51244 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
8e0c2c9832
commit
6b60b6eefb
@ -187,6 +187,10 @@ sk_sp<GrTexture> GrResourceProvider::createApproxTexture(const GrSurfaceDesc& de
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (auto tex = this->refScratchTexture(desc, flags)) {
|
||||
return tex;
|
||||
}
|
||||
|
||||
SkTCopyOnFirstWrite<GrSurfaceDesc> copyDesc(desc);
|
||||
|
||||
// bin by pow2 with a reasonable min
|
||||
|
Loading…
Reference in New Issue
Block a user