Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(726)

Unified Diff: src/gpu/vk/GrVkStencilAttachment.cpp

Issue 1862043002: Refactor to separate backend object lifecycle and GpuResource budget decision (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix unrelated GrBuffer::onGpuMemorySize() lack of override keyword compile error Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkStencilAttachment.h ('k') | src/gpu/vk/GrVkTexture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkStencilAttachment.cpp
diff --git a/src/gpu/vk/GrVkStencilAttachment.cpp b/src/gpu/vk/GrVkStencilAttachment.cpp
index a3d3af345a5a75f93260ca8be520ba5d4c5bdc52..3af5488ed7cb6fbec2dbd57eafcfddf3af2d12f3 100644
--- a/src/gpu/vk/GrVkStencilAttachment.cpp
+++ b/src/gpu/vk/GrVkStencilAttachment.cpp
@@ -14,22 +14,20 @@
#define VK_CALL(GPU, X) GR_VK_CALL(GPU->vkInterface(), X)
GrVkStencilAttachment::GrVkStencilAttachment(GrVkGpu* gpu,
- GrGpuResource::LifeCycle lifeCycle,
const Format& format,
const GrVkImage::ImageDesc& desc,
const GrVkImage::Resource* imageResource,
const GrVkImageView* stencilView)
- : GrStencilAttachment(gpu, lifeCycle, desc.fWidth, desc.fHeight,
+ : GrStencilAttachment(gpu, desc.fWidth, desc.fHeight,
format.fStencilBits, desc.fSamples)
, GrVkImage(imageResource)
, fFormat(format)
, fStencilView(stencilView) {
- this->registerWithCache();
+ this->registerWithCache(SkBudgeted::kYes);
stencilView->ref();
}
GrVkStencilAttachment* GrVkStencilAttachment::Create(GrVkGpu* gpu,
- GrGpuResource::LifeCycle lifeCycle,
int width,
int height,
int sampleCnt,
@@ -59,7 +57,7 @@ GrVkStencilAttachment* GrVkStencilAttachment::Create(GrVkGpu* gpu,
return nullptr;
}
- GrVkStencilAttachment* stencil = new GrVkStencilAttachment(gpu, lifeCycle, format, imageDesc,
+ GrVkStencilAttachment* stencil = new GrVkStencilAttachment(gpu, format, imageDesc,
imageResource, imageView);
imageResource->unref(gpu);
imageView->unref(gpu);
« no previous file with comments | « src/gpu/vk/GrVkStencilAttachment.h ('k') | src/gpu/vk/GrVkTexture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698