| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "GrContext.h" | 9 #include "GrContext.h" |
| 10 #include "SkSurface.h" | 10 #include "SkSurface.h" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 fImages = new VkImage[fImageCount]; | 248 fImages = new VkImage[fImageCount]; |
| 249 fGetSwapchainImagesKHR(fBackendContext->fDevice, fSwapchain, &fImageCount, f
Images); | 249 fGetSwapchainImagesKHR(fBackendContext->fDevice, fSwapchain, &fImageCount, f
Images); |
| 250 | 250 |
| 251 // set up initial image layouts and create surfaces | 251 // set up initial image layouts and create surfaces |
| 252 fImageLayouts = new VkImageLayout[fImageCount]; | 252 fImageLayouts = new VkImageLayout[fImageCount]; |
| 253 fSurfaces = new sk_sp<SkSurface>[fImageCount]; | 253 fSurfaces = new sk_sp<SkSurface>[fImageCount]; |
| 254 for (uint32_t i = 0; i < fImageCount; ++i) { | 254 for (uint32_t i = 0; i < fImageCount; ++i) { |
| 255 fImageLayouts[i] = VK_IMAGE_LAYOUT_UNDEFINED; | 255 fImageLayouts[i] = VK_IMAGE_LAYOUT_UNDEFINED; |
| 256 | 256 |
| 257 GrBackendRenderTargetDesc desc; | 257 GrBackendRenderTargetDesc desc; |
| 258 GrVkTextureInfo info; | 258 GrVkImageInfo info; |
| 259 info.fImage = fImages[i]; | 259 info.fImage = fImages[i]; |
| 260 info.fAlloc = VK_NULL_HANDLE; | 260 info.fAlloc = VK_NULL_HANDLE; |
| 261 info.fImageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; | 261 info.fImageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; |
| 262 info.fImageTiling = VK_IMAGE_TILING_OPTIMAL; | 262 info.fImageTiling = VK_IMAGE_TILING_OPTIMAL; |
| 263 info.fFormat = format; | 263 info.fFormat = format; |
| 264 info.fLevelCount = 1; | 264 info.fLevelCount = 1; |
| 265 desc.fWidth = fWidth; | 265 desc.fWidth = fWidth; |
| 266 desc.fHeight = fHeight; | 266 desc.fHeight = fHeight; |
| 267 desc.fConfig = fPixelConfig; | 267 desc.fConfig = fPixelConfig; |
| 268 desc.fOrigin = kTopLeft_GrSurfaceOrigin; | 268 desc.fOrigin = kTopLeft_GrSurfaceOrigin; |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 &fSwapchain, // pSwapchains | 581 &fSwapchain, // pSwapchains |
| 582 &backbuffer->fImageIndex, // pImageIndices | 582 &backbuffer->fImageIndex, // pImageIndices |
| 583 NULL // pResults | 583 NULL // pResults |
| 584 }; | 584 }; |
| 585 | 585 |
| 586 fQueuePresentKHR(fPresentQueue, &presentInfo); | 586 fQueuePresentKHR(fPresentQueue, &presentInfo); |
| 587 | 587 |
| 588 } | 588 } |
| 589 | 589 |
| 590 } //namespace sk_app | 590 } //namespace sk_app |
| OLD | NEW |