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

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

Issue 1718693002: Add vulkan files into skia repo. (Closed) Base URL: https://skia.googlesource.com/skia.git@merge
Patch Set: fix path Created 4 years, 10 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/GrVkSampler.cpp ('k') | src/gpu/vk/GrVkStencilAttachment.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkStencilAttachment.h
diff --git a/src/gpu/vk/GrVkStencilAttachment.h b/src/gpu/vk/GrVkStencilAttachment.h
new file mode 100644
index 0000000000000000000000000000000000000000..ab1b32bc70d20b69984f5cb060dc018d8ddfb6ad
--- /dev/null
+++ b/src/gpu/vk/GrVkStencilAttachment.h
@@ -0,0 +1,62 @@
+/*
+* Copyright 2015 Google Inc.
+*
+* Use of this source code is governed by a BSD-style license that can be
+* found in the LICENSE file.
+*/
+
+#ifndef GrVkStencil_DEFINED
+#define GrVkStencil_DEFINED
+
+#include "GrStencilAttachment.h"
+#include "GrVkImage.h"
+#include "vulkan/vulkan.h"
+
+class GrVkImageView;
+class GrVkGpu;
+
+class GrVkStencilAttachment : public GrStencilAttachment {
+public:
+ struct Format {
+ VkFormat fInternalFormat;
+ int fStencilBits;
+ int fTotalBits;
+ bool fPacked;
+ };
+
+ static GrVkStencilAttachment* Create(GrVkGpu* gpu, GrGpuResource::LifeCycle lifeCycle,
+ int width, int height,
+ int sampleCnt, const Format& format);
+
+ ~GrVkStencilAttachment() override;
+
+ const GrVkImage::Resource* imageResource() const { return fImageResource; }
+ const GrVkImageView* stencilView() const { return fStencilView; }
+
+ VkFormat vkFormat() const { return fFormat.fInternalFormat; }
+
+protected:
+ void onRelease() override;
+ void onAbandon() override;
+
+private:
+ size_t onGpuMemorySize() const override;
+
+ GrVkStencilAttachment(GrVkGpu* gpu,
+ GrGpuResource::LifeCycle lifeCycle,
+ const Format& format,
+ const GrVkImage::ImageDesc&,
+ const GrVkImage::Resource*,
+ const GrVkImageView* stencilView);
+
+ GrVkGpu* getVkGpu() const;
+
+ Format fFormat;
+
+ const GrVkImage::Resource* fImageResource;
+ const GrVkImageView* fStencilView;
+
+ typedef GrStencilAttachment INHERITED;
+};
+
+#endif
« no previous file with comments | « src/gpu/vk/GrVkSampler.cpp ('k') | src/gpu/vk/GrVkStencilAttachment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698