OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrVkTexture_DEFINED | 8 #ifndef GrVkTexture_DEFINED |
9 #define GrVkTexture_DEFINED | 9 #define GrVkTexture_DEFINED |
10 | 10 |
11 #include "GrGpu.h" | 11 #include "GrGpu.h" |
12 #include "GrTexture.h" | 12 #include "GrTexture.h" |
13 #include "GrVkImage.h" | 13 #include "GrVkImage.h" |
14 | 14 |
15 class GrVkGpu; | 15 class GrVkGpu; |
16 class GrVkImageView; | 16 class GrVkImageView; |
17 struct GrVkImageInfo; | 17 struct GrVkImageInfo; |
18 | 18 |
19 class GrVkTexture : public GrTexture, public virtual GrVkImage { | 19 class GrVkTexture : public GrTexture, public virtual GrVkImage { |
20 public: | 20 public: |
21 static GrVkTexture* CreateNewTexture(GrVkGpu*, SkBudgeted budgeted, const Gr
SurfaceDesc&, | 21 static GrVkTexture* CreateNewTexture(GrVkGpu*, SkBudgeted budgeted, const Gr
SurfaceDesc&, |
22 const GrVkImage::ImageDesc&); | 22 const GrVkImage::ImageDesc&); |
23 | 23 |
24 static GrVkTexture* CreateWrappedTexture(GrVkGpu*, const GrSurfaceDesc&, | 24 static sk_sp<GrVkTexture> MakeWrappedTexture(GrVkGpu*, const GrSurfaceDesc&, |
25 GrWrapOwnership, const GrVkImageInf
o*); | 25 GrWrapOwnership, const GrVkImag
eInfo*); |
26 | 26 |
27 ~GrVkTexture() override; | 27 ~GrVkTexture() override; |
28 | 28 |
29 GrBackendObject getTextureHandle() const override; | 29 GrBackendObject getTextureHandle() const override; |
30 | 30 |
31 void textureParamsModified() override {} | 31 void textureParamsModified() override {} |
32 | 32 |
33 const GrVkImageView* textureView(bool allowSRGB); | 33 const GrVkImageView* textureView(bool allowSRGB); |
34 | 34 |
35 bool reallocForMipmap(GrVkGpu* gpu, uint32_t mipLevels); | 35 bool reallocForMipmap(GrVkGpu* gpu, uint32_t mipLevels); |
(...skipping 14 matching lines...) Expand all Loading... |
50 GrVkTexture(GrVkGpu*, Wrapped, const GrSurfaceDesc&, | 50 GrVkTexture(GrVkGpu*, Wrapped, const GrSurfaceDesc&, |
51 const GrVkImageInfo&, const GrVkImageView* imageView, GrVkImage:
:Wrapped wrapped); | 51 const GrVkImageInfo&, const GrVkImageView* imageView, GrVkImage:
:Wrapped wrapped); |
52 | 52 |
53 const GrVkImageView* fTextureView; | 53 const GrVkImageView* fTextureView; |
54 const GrVkImageView* fLinearTextureView; | 54 const GrVkImageView* fLinearTextureView; |
55 | 55 |
56 typedef GrTexture INHERITED; | 56 typedef GrTexture INHERITED; |
57 }; | 57 }; |
58 | 58 |
59 #endif | 59 #endif |
OLD | NEW |