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

Unified Diff: src/gpu/vk/GrVkTextureRenderTarget.h

Issue 1974983002: Refactor Vulkan image, texture, RTs so that create and getter handles match. (Closed) Base URL: https://skia.googlesource.com/skia.git@fixLayerVersion
Patch Set: nits Created 4 years, 7 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/GrVkTexture.cpp ('k') | src/gpu/vk/GrVkTextureRenderTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkTextureRenderTarget.h
diff --git a/src/gpu/vk/GrVkTextureRenderTarget.h b/src/gpu/vk/GrVkTextureRenderTarget.h
index e888397cddbbaa036fceb2471e48ec3b9b1b8e73..6ea332a0ae2ed098ebd8a56befbbc75e2d35be68 100644
--- a/src/gpu/vk/GrVkTextureRenderTarget.h
+++ b/src/gpu/vk/GrVkTextureRenderTarget.h
@@ -20,7 +20,7 @@
#endif
class GrVkImageView;
-struct GrVkTextureInfo;
+struct GrVkImageInfo;
class GrVkTextureRenderTarget: public GrVkTexture, public GrVkRenderTarget {
public:
@@ -31,8 +31,7 @@ public:
static GrVkTextureRenderTarget* CreateWrappedTextureRenderTarget(GrVkGpu*,
const GrSurfaceDesc&,
GrWrapOwnership,
- VkFormat,
- const GrVkTextureInfo*);
+ const GrVkImageInfo*);
protected:
void onAbandon() override {
@@ -49,67 +48,65 @@ private:
GrVkTextureRenderTarget(GrVkGpu* gpu,
SkBudgeted budgeted,
const GrSurfaceDesc& desc,
- const GrVkImage::Resource* imageResource,
+ const GrVkImageInfo& info,
const GrVkImageView* texView,
- const GrVkImage::Resource* msaaResource,
+ const GrVkImageInfo& msaaInfo,
const GrVkImageView* colorAttachmentView,
const GrVkImageView* resolveAttachmentView)
: GrSurface(gpu, desc)
- , GrVkImage(imageResource)
- , GrVkTexture(gpu, desc, imageResource, texView)
- , GrVkRenderTarget(gpu, desc, imageResource, msaaResource, colorAttachmentView,
- resolveAttachmentView) {
+ , GrVkImage(info, GrVkImage::kNot_Wrapped)
+ , GrVkTexture(gpu, desc, info, texView, GrVkImage::kNot_Wrapped)
+ , GrVkRenderTarget(gpu, desc, info, msaaInfo, colorAttachmentView,
+ resolveAttachmentView, GrVkImage::kNot_Wrapped) {
this->registerWithCache(budgeted);
}
GrVkTextureRenderTarget(GrVkGpu* gpu,
SkBudgeted budgeted,
const GrSurfaceDesc& desc,
- const GrVkImage::Resource* imageResource,
+ const GrVkImageInfo& info,
const GrVkImageView* texView,
const GrVkImageView* colorAttachmentView)
: GrSurface(gpu, desc)
- , GrVkImage(imageResource)
- , GrVkTexture(gpu, desc, imageResource, texView)
- , GrVkRenderTarget(gpu, desc, imageResource, colorAttachmentView) {
+ , GrVkImage(info, GrVkImage::kNot_Wrapped)
+ , GrVkTexture(gpu, desc, info, texView, GrVkImage::kNot_Wrapped)
+ , GrVkRenderTarget(gpu, desc, info, colorAttachmentView, GrVkImage::kNot_Wrapped) {
this->registerWithCache(budgeted);
}
- enum Wrapped { kWrapped };
GrVkTextureRenderTarget(GrVkGpu* gpu,
- Wrapped,
const GrSurfaceDesc& desc,
- const GrVkImage::Resource* imageResource,
+ const GrVkImageInfo& info,
const GrVkImageView* texView,
- const GrVkImage::Resource* msaaResource,
+ const GrVkImageInfo& msaaInfo,
const GrVkImageView* colorAttachmentView,
- const GrVkImageView* resolveAttachmentView)
+ const GrVkImageView* resolveAttachmentView,
+ GrVkImage::Wrapped wrapped)
: GrSurface(gpu, desc)
- , GrVkImage(imageResource)
- , GrVkTexture(gpu, desc, imageResource, texView)
- , GrVkRenderTarget(gpu, desc, imageResource, msaaResource, colorAttachmentView,
- resolveAttachmentView) {
+ , GrVkImage(info, wrapped)
+ , GrVkTexture(gpu, desc, info, texView, wrapped)
+ , GrVkRenderTarget(gpu, desc, info, msaaInfo, colorAttachmentView,
+ resolveAttachmentView, wrapped) {
this->registerWithCacheWrapped();
}
GrVkTextureRenderTarget(GrVkGpu* gpu,
- Wrapped,
const GrSurfaceDesc& desc,
- const GrVkImage::Resource* imageResource,
+ const GrVkImageInfo& info,
const GrVkImageView* texView,
- const GrVkImageView* colorAttachmentView)
+ const GrVkImageView* colorAttachmentView,
+ GrVkImage::Wrapped wrapped)
: GrSurface(gpu, desc)
- , GrVkImage(imageResource)
- , GrVkTexture(gpu, desc, imageResource, texView)
- , GrVkRenderTarget(gpu, desc, imageResource, colorAttachmentView) {
+ , GrVkImage(info, wrapped)
+ , GrVkTexture(gpu, desc, info, texView, wrapped)
+ , GrVkRenderTarget(gpu, desc, info, colorAttachmentView, wrapped) {
this->registerWithCacheWrapped();
}
- template <typename ResourceType>
static GrVkTextureRenderTarget* Create(GrVkGpu*,
- ResourceType,
const GrSurfaceDesc&,
- VkFormat,
- const GrVkImage::Resource* imageResource);
+ const GrVkImageInfo&,
+ SkBudgeted budgeted,
+ GrVkImage::Wrapped wrapped);
// GrGLRenderTarget accounts for the texture's memory and any MSAA renderbuffer's memory.
size_t onGpuMemorySize() const override {
« no previous file with comments | « src/gpu/vk/GrVkTexture.cpp ('k') | src/gpu/vk/GrVkTextureRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698