Add "GrMipMapped" parameter to visitProxies
This will allow us to detect textures that need their mipmap levels
regenerated, and resolve them before executing the command buffer.
Bug: skia:
Change-Id: I65a1cd2b2d5ba2247d1c4a613ce9ba85b8d02377
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215142
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/GrTextureOpList.cpp b/src/gpu/GrTextureOpList.cpp
index c6d41c4..843537e 100644
--- a/src/gpu/GrTextureOpList.cpp
+++ b/src/gpu/GrTextureOpList.cpp
@@ -150,7 +150,7 @@
}
const GrCaps* caps = context->priv().caps();
- auto addDependency = [ caps, this ] (GrSurfaceProxy* p) {
+ auto addDependency = [ caps, this ] (GrSurfaceProxy* p, GrMipMapped) {
this->addDependency(p, *caps);
};
op->visitProxies(addDependency);
@@ -161,7 +161,7 @@
void GrTextureOpList::purgeOpsWithUninstantiatedProxies() {
bool hasUninstantiatedProxy = false;
- auto checkInstantiation = [&hasUninstantiatedProxy](GrSurfaceProxy* p) {
+ auto checkInstantiation = [&hasUninstantiatedProxy](GrSurfaceProxy* p, GrMipMapped) {
if (!p->isInstantiated()) {
hasUninstantiatedProxy = true;
}
@@ -182,7 +182,7 @@
bool GrTextureOpList::onIsUsed(GrSurfaceProxy* proxyToCheck) const {
bool used = false;
- auto visit = [ proxyToCheck, &used ] (GrSurfaceProxy* p) {
+ auto visit = [ proxyToCheck, &used ] (GrSurfaceProxy* p, GrMipMapped) {
if (p == proxyToCheck) {
used = true;
}
@@ -214,7 +214,7 @@
alloc->incOps();
}
- auto gather = [ alloc SkDEBUGCODE(, this) ] (GrSurfaceProxy* p) {
+ auto gather = [ alloc SkDEBUGCODE(, this) ] (GrSurfaceProxy* p, GrMipMapped) {
alloc->addInterval(p, alloc->curOp(), alloc->curOp(), GrResourceAllocator::ActualUse::kYes
SkDEBUGCODE(, p == fTarget.get()));
};