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

Side by Side Diff: tools/viewer/sk_app/VulkanWindowContext.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
« src/gpu/vk/GrVkBuffer.cpp ('K') | « tools/viewer/Viewer.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "GrRenderTarget.h" 10 #include "GrRenderTarget.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 // set up initial image layouts and create surfaces 258 // set up initial image layouts and create surfaces
259 fImageLayouts = new VkImageLayout[fImageCount]; 259 fImageLayouts = new VkImageLayout[fImageCount];
260 fRenderTargets = new sk_sp<GrRenderTarget>[fImageCount]; 260 fRenderTargets = new sk_sp<GrRenderTarget>[fImageCount];
261 fSurfaces = new sk_sp<SkSurface>[fImageCount]; 261 fSurfaces = new sk_sp<SkSurface>[fImageCount];
262 for (uint32_t i = 0; i < fImageCount; ++i) { 262 for (uint32_t i = 0; i < fImageCount; ++i) {
263 fImageLayouts[i] = VK_IMAGE_LAYOUT_UNDEFINED; 263 fImageLayouts[i] = VK_IMAGE_LAYOUT_UNDEFINED;
264 264
265 GrBackendRenderTargetDesc desc; 265 GrBackendRenderTargetDesc desc;
266 GrVkImageInfo info; 266 GrVkImageInfo info;
267 info.fImage = fImages[i]; 267 info.fImage = fImages[i];
268 info.fAlloc = VK_NULL_HANDLE; 268 info.fAlloc = { VK_NULL_HANDLE, 0 };
269 info.fImageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; 269 info.fImageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
270 info.fImageTiling = VK_IMAGE_TILING_OPTIMAL; 270 info.fImageTiling = VK_IMAGE_TILING_OPTIMAL;
271 info.fFormat = format; 271 info.fFormat = format;
272 info.fLevelCount = 1; 272 info.fLevelCount = 1;
273 desc.fWidth = fWidth; 273 desc.fWidth = fWidth;
274 desc.fHeight = fHeight; 274 desc.fHeight = fHeight;
275 desc.fConfig = fPixelConfig; 275 desc.fConfig = fPixelConfig;
276 desc.fOrigin = kTopLeft_GrSurfaceOrigin; 276 desc.fOrigin = kTopLeft_GrSurfaceOrigin;
277 desc.fSampleCnt = 0; 277 desc.fSampleCnt = 0;
278 desc.fStencilBits = 0; 278 desc.fStencilBits = 0;
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 &fSwapchain, // pSwapchains 595 &fSwapchain, // pSwapchains
596 &backbuffer->fImageIndex, // pImageIndices 596 &backbuffer->fImageIndex, // pImageIndices
597 NULL // pResults 597 NULL // pResults
598 }; 598 };
599 599
600 fQueuePresentKHR(fPresentQueue, &presentInfo); 600 fQueuePresentKHR(fPresentQueue, &presentInfo);
601 601
602 } 602 }
603 603
604 } //namespace sk_app 604 } //namespace sk_app
OLDNEW
« src/gpu/vk/GrVkBuffer.cpp ('K') | « tools/viewer/Viewer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698