Remove unused tracking methods in GrManagedResource
Bug: skia:10584 Change-Id: Id335e243bb1c594922053ef98500d5a5ce59ea65 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/426457 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
parent
6de2e1db03
commit
b161a77d03
@ -133,13 +133,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called every time this resource is queued for use on the GPU (typically because
|
|
||||||
// it was added to a command buffer).
|
|
||||||
virtual void notifyQueuedForWorkOnGpu() const {}
|
|
||||||
// Called every time this resource has finished its use on the GPU (typically because
|
|
||||||
// the command buffer finished execution on the GPU.)
|
|
||||||
virtual void notifyFinishedWithWorkOnGpu() const {}
|
|
||||||
|
|
||||||
#ifdef SK_DEBUG
|
#ifdef SK_DEBUG
|
||||||
// This is used for validating in the vulkan backend when using a main command buffer and temp
|
// This is used for validating in the vulkan backend when using a main command buffer and temp
|
||||||
// command buffer at the same time. We need to validate that no images in the temp command
|
// command buffer at the same time. We need to validate that no images in the temp command
|
||||||
|
@ -67,11 +67,7 @@ void GrD3DCommandList::releaseResources() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SkASSERT(!fIsActive);
|
SkASSERT(!fIsActive);
|
||||||
for (int i = 0; i < fTrackedResources.count(); ++i) {
|
|
||||||
fTrackedResources[i]->notifyFinishedWithWorkOnGpu();
|
|
||||||
}
|
|
||||||
for (int i = 0; i < fTrackedRecycledResources.count(); ++i) {
|
for (int i = 0; i < fTrackedRecycledResources.count(); ++i) {
|
||||||
fTrackedRecycledResources[i]->notifyFinishedWithWorkOnGpu();
|
|
||||||
auto resource = fTrackedRecycledResources[i].release();
|
auto resource = fTrackedRecycledResources[i].release();
|
||||||
resource->recycle();
|
resource->recycle();
|
||||||
}
|
}
|
||||||
|
@ -117,14 +117,12 @@ protected:
|
|||||||
// execution
|
// execution
|
||||||
void addResource(sk_sp<GrManagedResource> resource) {
|
void addResource(sk_sp<GrManagedResource> resource) {
|
||||||
SkASSERT(resource);
|
SkASSERT(resource);
|
||||||
resource->notifyQueuedForWorkOnGpu();
|
|
||||||
fTrackedResources.push_back(std::move(resource));
|
fTrackedResources.push_back(std::move(resource));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add ref-counted resource that will be tracked and released when this command buffer finishes
|
// Add ref-counted resource that will be tracked and released when this command buffer finishes
|
||||||
// execution. When it is released, it will signal that the resource can be recycled for reuse.
|
// execution. When it is released, it will signal that the resource can be recycled for reuse.
|
||||||
void addRecycledResource(sk_sp<GrRecycledResource> resource) {
|
void addRecycledResource(sk_sp<GrRecycledResource> resource) {
|
||||||
resource->notifyQueuedForWorkOnGpu();
|
|
||||||
fTrackedRecycledResources.push_back(std::move(resource));
|
fTrackedRecycledResources.push_back(std::move(resource));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,13 +57,7 @@ void GrVkCommandBuffer::freeGPUData(const GrGpu* gpu, VkCommandPool cmdPool) con
|
|||||||
void GrVkCommandBuffer::releaseResources() {
|
void GrVkCommandBuffer::releaseResources() {
|
||||||
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
|
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
|
||||||
SkASSERT(!fIsActive || this->isWrapped());
|
SkASSERT(!fIsActive || this->isWrapped());
|
||||||
for (int i = 0; i < fTrackedResources.count(); ++i) {
|
|
||||||
fTrackedResources[i]->notifyFinishedWithWorkOnGpu();
|
|
||||||
}
|
|
||||||
fTrackedResources.reset();
|
fTrackedResources.reset();
|
||||||
for (int i = 0; i < fTrackedRecycledResources.count(); ++i) {
|
|
||||||
fTrackedRecycledResources[i]->notifyFinishedWithWorkOnGpu();
|
|
||||||
}
|
|
||||||
fTrackedRecycledResources.reset();
|
fTrackedRecycledResources.reset();
|
||||||
|
|
||||||
fTrackedGpuBuffers.reset();
|
fTrackedGpuBuffers.reset();
|
||||||
|
@ -110,7 +110,6 @@ public:
|
|||||||
// execution
|
// execution
|
||||||
void addResource(sk_sp<const GrManagedResource> resource) {
|
void addResource(sk_sp<const GrManagedResource> resource) {
|
||||||
SkASSERT(resource);
|
SkASSERT(resource);
|
||||||
resource->notifyQueuedForWorkOnGpu();
|
|
||||||
fTrackedResources.push_back(std::move(resource));
|
fTrackedResources.push_back(std::move(resource));
|
||||||
}
|
}
|
||||||
void addResource(const GrManagedResource* resource) {
|
void addResource(const GrManagedResource* resource) {
|
||||||
@ -121,7 +120,6 @@ public:
|
|||||||
// execution. When it is released, it will signal that the resource can be recycled for reuse.
|
// execution. When it is released, it will signal that the resource can be recycled for reuse.
|
||||||
void addRecycledResource(gr_rp<const GrRecycledResource> resource) {
|
void addRecycledResource(gr_rp<const GrRecycledResource> resource) {
|
||||||
SkASSERT(resource);
|
SkASSERT(resource);
|
||||||
resource->notifyQueuedForWorkOnGpu();
|
|
||||||
fTrackedRecycledResources.push_back(std::move(resource));
|
fTrackedRecycledResources.push_back(std::move(resource));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user