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 | 8 |
9 #ifndef GrVkTextureRenderTarget_DEFINED | 9 #ifndef GrVkTextureRenderTarget_DEFINED |
10 #define GrVkTextureRenderTarget_DEFINED | 10 #define GrVkTextureRenderTarget_DEFINED |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 class GrVkImageView; | 22 class GrVkImageView; |
23 struct GrVkImageInfo; | 23 struct GrVkImageInfo; |
24 | 24 |
25 class GrVkTextureRenderTarget: public GrVkTexture, public GrVkRenderTarget { | 25 class GrVkTextureRenderTarget: public GrVkTexture, public GrVkRenderTarget { |
26 public: | 26 public: |
27 static GrVkTextureRenderTarget* CreateNewTextureRenderTarget(GrVkGpu*, SkBud
geted, | 27 static GrVkTextureRenderTarget* CreateNewTextureRenderTarget(GrVkGpu*, SkBud
geted, |
28 const GrSurface
Desc&, | 28 const GrSurface
Desc&, |
29 const GrVkImage
::ImageDesc&); | 29 const GrVkImage
::ImageDesc&); |
30 | 30 |
31 static GrVkTextureRenderTarget* CreateWrappedTextureRenderTarget(GrVkGpu*, | 31 static sk_sp<GrVkTextureRenderTarget> MakeWrappedTextureRenderTarget(GrVkGpu
*, |
32 const GrSur
faceDesc&, | 32 const G
rSurfaceDesc&, |
33 GrWrapOwner
ship, | 33 GrWrapO
wnership, |
34 const GrVkI
mageInfo*); | 34 const G
rVkImageInfo*); |
35 | 35 |
36 bool updateForMipmap(GrVkGpu* gpu, const GrVkImageInfo& newInfo); | 36 bool updateForMipmap(GrVkGpu* gpu, const GrVkImageInfo& newInfo); |
37 | 37 |
38 protected: | 38 protected: |
39 void onAbandon() override { | 39 void onAbandon() override { |
40 GrVkRenderTarget::onAbandon(); | 40 GrVkRenderTarget::onAbandon(); |
41 GrVkTexture::onAbandon(); | 41 GrVkTexture::onAbandon(); |
42 } | 42 } |
43 | 43 |
44 void onRelease() override { | 44 void onRelease() override { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 SkBudgeted budgeted, | 110 SkBudgeted budgeted, |
111 GrVkImage::Wrapped wrapped); | 111 GrVkImage::Wrapped wrapped); |
112 | 112 |
113 // GrGLRenderTarget accounts for the texture's memory and any MSAA renderbuf
fer's memory. | 113 // GrGLRenderTarget accounts for the texture's memory and any MSAA renderbuf
fer's memory. |
114 size_t onGpuMemorySize() const override { | 114 size_t onGpuMemorySize() const override { |
115 return GrVkRenderTarget::onGpuMemorySize(); | 115 return GrVkRenderTarget::onGpuMemorySize(); |
116 } | 116 } |
117 }; | 117 }; |
118 | 118 |
119 #endif | 119 #endif |
OLD | NEW |