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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/gpu/vk/GrVkSampler.cpp ('k') | src/gpu/vk/GrVkStencilAttachment.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrVkStencil_DEFINED
9 #define GrVkStencil_DEFINED
10
11 #include "GrStencilAttachment.h"
12 #include "GrVkImage.h"
13 #include "vulkan/vulkan.h"
14
15 class GrVkImageView;
16 class GrVkGpu;
17
18 class GrVkStencilAttachment : public GrStencilAttachment {
19 public:
20 struct Format {
21 VkFormat fInternalFormat;
22 int fStencilBits;
23 int fTotalBits;
24 bool fPacked;
25 };
26
27 static GrVkStencilAttachment* Create(GrVkGpu* gpu, GrGpuResource::LifeCycle lifeCycle,
28 int width, int height,
29 int sampleCnt, const Format& format);
30
31 ~GrVkStencilAttachment() override;
32
33 const GrVkImage::Resource* imageResource() const { return fImageResource; }
34 const GrVkImageView* stencilView() const { return fStencilView; }
35
36 VkFormat vkFormat() const { return fFormat.fInternalFormat; }
37
38 protected:
39 void onRelease() override;
40 void onAbandon() override;
41
42 private:
43 size_t onGpuMemorySize() const override;
44
45 GrVkStencilAttachment(GrVkGpu* gpu,
46 GrGpuResource::LifeCycle lifeCycle,
47 const Format& format,
48 const GrVkImage::ImageDesc&,
49 const GrVkImage::Resource*,
50 const GrVkImageView* stencilView);
51
52 GrVkGpu* getVkGpu() const;
53
54 Format fFormat;
55
56 const GrVkImage::Resource* fImageResource;
57 const GrVkImageView* fStencilView;
58
59 typedef GrStencilAttachment INHERITED;
60 };
61
62 #endif
OLDNEW
« 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