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 #include "GrVkTextureRenderTarget.h" | 8 #include "GrVkTextureRenderTarget.h" |
9 | 9 |
10 #include "GrRenderTargetPriv.h" | 10 #include "GrRenderTargetPriv.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 return trt; | 149 return trt; |
150 } | 150 } |
151 | 151 |
152 GrVkTextureRenderTarget* | 152 GrVkTextureRenderTarget* |
153 GrVkTextureRenderTarget::CreateWrappedTextureRenderTarget(GrVkGpu* gpu, | 153 GrVkTextureRenderTarget::CreateWrappedTextureRenderTarget(GrVkGpu* gpu, |
154 const GrSurfaceDesc& d
esc, | 154 const GrSurfaceDesc& d
esc, |
155 GrWrapOwnership owners
hip, | 155 GrWrapOwnership owners
hip, |
156 const GrVkImageInfo* i
nfo) { | 156 const GrVkImageInfo* i
nfo) { |
157 SkASSERT(info); | 157 SkASSERT(info); |
158 // Wrapped textures require both image and allocation (because they can be m
apped) | 158 // Wrapped textures require both image and allocation (because they can be m
apped) |
159 SkASSERT(VK_NULL_HANDLE != info->fImage && VK_NULL_HANDLE != info->fAlloc); | 159 SkASSERT(VK_NULL_HANDLE != info->fImage && VK_NULL_HANDLE != info->fAlloc.fM
emory); |
160 | 160 |
161 | |
162 GrVkImage::Wrapped wrapped = kBorrow_GrWrapOwnership == ownership ? GrVkImag
e::kBorrowed_Wrapped | 161 GrVkImage::Wrapped wrapped = kBorrow_GrWrapOwnership == ownership ? GrVkImag
e::kBorrowed_Wrapped |
163 : GrVkImag
e::kAdopted_Wrapped; | 162 : GrVkImag
e::kAdopted_Wrapped; |
164 | 163 |
165 GrVkTextureRenderTarget* trt = Create(gpu, desc, *info, SkBudgeted::kNo, wra
pped); | 164 GrVkTextureRenderTarget* trt = Create(gpu, desc, *info, SkBudgeted::kNo, wra
pped); |
166 | 165 |
167 return trt; | 166 return trt; |
168 } | 167 } |
OLD | NEW |