diff options
Diffstat (limited to 'src/gpu/vk/GrVkImage.h')
-rw-r--r-- | src/gpu/vk/GrVkImage.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/gpu/vk/GrVkImage.h b/src/gpu/vk/GrVkImage.h index 9e99743fe7..038b0ee86d 100644 --- a/src/gpu/vk/GrVkImage.h +++ b/src/gpu/vk/GrVkImage.h @@ -30,7 +30,6 @@ public: , fLayout(std::move(layout)) , fIsBorrowed(GrBackendObjectOwnership::kBorrowed == ownership) { SkASSERT(fLayout->getImageLayout() == fInfo.fImageLayout); - fTempLayoutTracker = fLayout->getImageLayout(); if (fIsBorrowed) { fResource = new BorrowedResource(info.fImage, info.fAlloc, info.fImageTiling); } else { @@ -52,23 +51,6 @@ public: sk_sp<GrVkImageLayout> grVkImageLayout() const { return fLayout; } VkImageLayout currentLayout() const { - // This check and set is temporary since clients can still change the layout using - // the old GrBackendObject call and we need a way to respect those changes. This only works - // if the client isn't using GrBackendObjects and GrBackendTextures to update the layout - // at the same time. This check and set should all be made atomic but the plan is to remove - // the use of fInfo.fImageLayout so ignoring this issue for now. - // TODO: Delete all this ugliness as soon as we get rid of GrBackendObject getters. - if (fInfo.fImageLayout != fLayout->getImageLayout()) { - if (fLayout->getImageLayout() == fTempLayoutTracker) { - fLayout->setImageLayout(fInfo.fImageLayout); - } else { - SkASSERT(fInfo.fImageLayout == fTempLayoutTracker); - *const_cast<VkImageLayout*>(&fInfo.fImageLayout) = fLayout->getImageLayout(); - } - *const_cast<VkImageLayout*>(&fTempLayoutTracker) = fLayout->getImageLayout(); - } - SkASSERT(fInfo.fImageLayout == fTempLayoutTracker && - fLayout->getImageLayout() == fTempLayoutTracker); return fLayout->getImageLayout(); } @@ -83,8 +65,6 @@ public: // blit each layer, and then at the end need to update our tracking. void updateImageLayout(VkImageLayout newLayout) { fLayout->setImageLayout(newLayout); - fInfo.fImageLayout = newLayout; - fTempLayoutTracker = newLayout; } struct ImageDesc { @@ -128,11 +108,6 @@ protected: GrVkImageInfo fInfo; sk_sp<GrVkImageLayout> fLayout; - // This is used while we still have GrBackendObjects around that are able to change our image - // layout without using the ref count method. This helps us determine which value has gotten out - // of sync. - // TODO: Delete this when get rid of a GrBackendObject getters - VkImageLayout fTempLayoutTracker; bool fIsBorrowed; private: |