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

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

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.cpp ('k') | src/gpu/vk/GrVkTexture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkTexture.h
diff --git a/src/gpu/vk/GrVkTexture.h b/src/gpu/vk/GrVkTexture.h
index 7c476ca5425ead6a658113f279b887aadf414e7e..936eeb7b30efb30f0768509ba058dcae73f2a133 100644
--- a/src/gpu/vk/GrVkTexture.h
+++ b/src/gpu/vk/GrVkTexture.h
@@ -18,12 +18,11 @@ struct GrVkTextureInfo;
class GrVkTexture : public GrTexture, public virtual GrVkImage {
public:
- static GrVkTexture* CreateNewTexture(GrVkGpu*, const GrSurfaceDesc&,
- GrGpuResource::LifeCycle,
+ static GrVkTexture* CreateNewTexture(GrVkGpu*, SkBudgeted budgeted, const GrSurfaceDesc&,
const GrVkImage::ImageDesc&);
static GrVkTexture* CreateWrappedTexture(GrVkGpu*, const GrSurfaceDesc&,
- GrGpuResource::LifeCycle,
+ GrWrapOwnership,
VkFormat, const GrVkTextureInfo*);
~GrVkTexture() override;
@@ -35,16 +34,11 @@ public:
const GrVkImageView* textureView() const { return fTextureView; }
protected:
- enum Derived { kDerived };
-
- GrVkTexture(GrVkGpu*, const GrSurfaceDesc&, GrGpuResource::LifeCycle,
+ GrVkTexture(GrVkGpu*, const GrSurfaceDesc&,
const GrVkImage::Resource*, const GrVkImageView* imageView);
- GrVkTexture(GrVkGpu*, const GrSurfaceDesc&, GrGpuResource::LifeCycle,
- const GrVkImage::Resource*, const GrVkImageView* imageView, Derived);
-
- static GrVkTexture* Create(GrVkGpu*, const GrSurfaceDesc&,
- GrGpuResource::LifeCycle, VkFormat,
+ template<typename ResourceType>
+ static GrVkTexture* Create(GrVkGpu*, ResourceType, const GrSurfaceDesc&, VkFormat,
const GrVkImage::Resource* texImpl);
GrVkGpu* getVkGpu() const;
@@ -53,6 +47,13 @@ protected:
void onRelease() override;
private:
+ enum Wrapped { kWrapped };
+ GrVkTexture(GrVkGpu*, SkBudgeted, const GrSurfaceDesc&,
+ const GrVkImage::Resource*, const GrVkImageView* imageView);
+ GrVkTexture(GrVkGpu*, Wrapped, const GrSurfaceDesc&,
+ const GrVkImage::Resource*, const GrVkImageView* imageView);
+
+
const GrVkImageView* fTextureView;
typedef GrTexture INHERITED;
« no previous file with comments | « src/gpu/vk/GrVkStencilAttachment.cpp ('k') | src/gpu/vk/GrVkTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698