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 |
(...skipping 23 matching lines...) Expand all Loading... |
34 const GrVkImageView* textureView() const { return fTextureView; } | 34 const GrVkImageView* textureView() const { return fTextureView; } |
35 | 35 |
36 bool reallocForMipmap(const GrVkGpu* gpu, uint32_t mipLevels); | 36 bool reallocForMipmap(const GrVkGpu* gpu, uint32_t mipLevels); |
37 | 37 |
38 protected: | 38 protected: |
39 GrVkTexture(GrVkGpu*, const GrSurfaceDesc&, | 39 GrVkTexture(GrVkGpu*, const GrSurfaceDesc&, |
40 const GrVkImage::Resource*, const GrVkImageView* imageView); | 40 const GrVkImage::Resource*, const GrVkImageView* imageView); |
41 | 41 |
42 template<typename ResourceType> | 42 template<typename ResourceType> |
43 static GrVkTexture* Create(GrVkGpu*, ResourceType, const GrSurfaceDesc&, VkF
ormat, | 43 static GrVkTexture* Create(GrVkGpu*, ResourceType, const GrSurfaceDesc&, VkF
ormat, |
44 uint32_t levels, const GrVkImage::Resource* texIm
pl); | 44 const GrVkImage::Resource* texImpl); |
45 | 45 |
46 GrVkGpu* getVkGpu() const; | 46 GrVkGpu* getVkGpu() const; |
47 | 47 |
48 void onAbandon() override; | 48 void onAbandon() override; |
49 void onRelease() override; | 49 void onRelease() override; |
50 | 50 |
51 private: | 51 private: |
52 enum Wrapped { kWrapped }; | 52 enum Wrapped { kWrapped }; |
53 GrVkTexture(GrVkGpu*, SkBudgeted, const GrSurfaceDesc&, | 53 GrVkTexture(GrVkGpu*, SkBudgeted, const GrSurfaceDesc&, |
54 const GrVkImage::Resource*, const GrVkImageView* imageView); | 54 const GrVkImage::Resource*, const GrVkImageView* imageView); |
55 GrVkTexture(GrVkGpu*, Wrapped, const GrSurfaceDesc&, | 55 GrVkTexture(GrVkGpu*, Wrapped, const GrSurfaceDesc&, |
56 const GrVkImage::Resource*, const GrVkImageView* imageView); | 56 const GrVkImage::Resource*, const GrVkImageView* imageView); |
57 | 57 |
58 const GrVkImageView* fTextureView; | 58 const GrVkImageView* fTextureView; |
59 | 59 |
60 typedef GrTexture INHERITED; | 60 typedef GrTexture INHERITED; |
61 }; | 61 }; |
62 | 62 |
63 #endif | 63 #endif |
OLD | NEW |