Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: src/gpu/vk/GrVkTextureRenderTarget.cpp

Issue 2018933004: Add offset to memory allocations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix tests Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698