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); | 36 bool reallocForMipmap(const GrVkGpu* gpu); |
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 const GrVkImage::Resource* texImpl); | 44 uint32_t levels, const GrVkImage::Resource* texIm pl); |
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 | 58 const GrVkImageView* fTextureView; |
59 const GrVkImageView* fTextureView; | 59 GrBackendObjectOwnership fTextureOwnership; |
jvanverth1
2016/04/29 13:44:14
Removed based on offline comments.
| |
60 | 60 |
61 typedef GrTexture INHERITED; | 61 typedef GrTexture INHERITED; |
62 }; | 62 }; |
63 | 63 |
64 #endif | 64 #endif |
OLD | NEW |