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 "GrVkTexture.h" | 8 #include "GrVkTexture.h" |
9 #include "GrVkGpu.h" | 9 #include "GrVkGpu.h" |
10 #include "GrVkImageView.h" | 10 #include "GrVkImageView.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 return false; | 209 return false; |
210 } | 210 } |
211 | 211 |
212 oldResource->unref(gpu); | 212 oldResource->unref(gpu); |
213 oldView->unref(gpu); | 213 oldView->unref(gpu); |
214 if (fLinearTextureView) { | 214 if (fLinearTextureView) { |
215 fLinearTextureView->unref(gpu); | 215 fLinearTextureView->unref(gpu); |
216 fLinearTextureView = nullptr; | 216 fLinearTextureView = nullptr; |
217 } | 217 } |
218 | 218 |
219 this->setNewResource(info.fImage, info.fAlloc); | 219 this->setNewResource(info.fImage, info.fAlloc, info.fImageTiling); |
220 fTextureView = textureView; | 220 fTextureView = textureView; |
221 fInfo = info; | 221 fInfo = info; |
222 this->texturePriv().setMaxMipMapLevel(mipLevels); | 222 this->texturePriv().setMaxMipMapLevel(mipLevels); |
223 | 223 |
224 return true; | 224 return true; |
225 } | 225 } |
OLD | NEW |