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 "GrVkGpu.h" | 8 #include "GrVkGpu.h" |
9 | 9 |
10 #include "GrContextOptions.h" | 10 #include "GrContextOptions.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 , fQueue(queue) | 173 , fQueue(queue) |
174 , fCmdPool(cmdPool) | 174 , fCmdPool(cmdPool) |
175 , fResourceProvider(this) | 175 , fResourceProvider(this) |
176 , fVkInstance(inst) { | 176 , fVkInstance(inst) { |
177 fInterface.reset(GrVkCreateInterface(fVkInstance)); | 177 fInterface.reset(GrVkCreateInterface(fVkInstance)); |
178 fCompiler = shaderc_compiler_initialize(); | 178 fCompiler = shaderc_compiler_initialize(); |
179 | 179 |
180 fVkCaps.reset(new GrVkCaps(options, fInterface, physDev)); | 180 fVkCaps.reset(new GrVkCaps(options, fInterface, physDev)); |
181 fCaps.reset(SkRef(fVkCaps.get())); | 181 fCaps.reset(SkRef(fVkCaps.get())); |
182 | 182 |
| 183 fResourceProvider.init(); |
| 184 |
183 fCurrentCmdBuffer = fResourceProvider.createCommandBuffer(); | 185 fCurrentCmdBuffer = fResourceProvider.createCommandBuffer(); |
184 SkASSERT(fCurrentCmdBuffer); | 186 SkASSERT(fCurrentCmdBuffer); |
185 fCurrentCmdBuffer->begin(this); | 187 fCurrentCmdBuffer->begin(this); |
186 VK_CALL(GetPhysicalDeviceMemoryProperties(physDev, &fPhysDevMemProps)); | 188 VK_CALL(GetPhysicalDeviceMemoryProperties(physDev, &fPhysDevMemProps)); |
187 | 189 |
188 } | 190 } |
189 | 191 |
190 GrVkGpu::~GrVkGpu() { | 192 GrVkGpu::~GrVkGpu() { |
191 shaderc_compiler_release(fCompiler); | 193 shaderc_compiler_release(fCompiler); |
192 fCurrentCmdBuffer->end(this); | 194 fCurrentCmdBuffer->end(this); |
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1263 int set_a_break_pt_here = 9; | 1265 int set_a_break_pt_here = 9; |
1264 aglSwapBuffers(aglGetCurrentContext()); | 1266 aglSwapBuffers(aglGetCurrentContext()); |
1265 #elif defined(SK_BUILD_FOR_WIN32) | 1267 #elif defined(SK_BUILD_FOR_WIN32) |
1266 SwapBuf(); | 1268 SwapBuf(); |
1267 int set_a_break_pt_here = 9; | 1269 int set_a_break_pt_here = 9; |
1268 SwapBuf(); | 1270 SwapBuf(); |
1269 #endif | 1271 #endif |
1270 #endif | 1272 #endif |
1271 } | 1273 } |
1272 | 1274 |
OLD | NEW |