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

Side by Side Diff: tools/viewer/sk_app/VulkanWindowContext.cpp

Issue 1965533002: Set level count for wrapped backbuffer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | 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 "SkSurface.h" 10 #include "SkSurface.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 GrVkTextureInfo 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 desc.fWidth = fWidth; 265 desc.fWidth = fWidth;
265 desc.fHeight = fHeight; 266 desc.fHeight = fHeight;
266 desc.fConfig = fPixelConfig; 267 desc.fConfig = fPixelConfig;
267 desc.fOrigin = kTopLeft_GrSurfaceOrigin; 268 desc.fOrigin = kTopLeft_GrSurfaceOrigin;
268 desc.fSampleCnt = 0; 269 desc.fSampleCnt = 0;
269 desc.fStencilBits = 0; 270 desc.fStencilBits = 0;
270 desc.fRenderTargetHandle = (GrBackendObject) &info; 271 desc.fRenderTargetHandle = (GrBackendObject) &info;
271 SkSurfaceProps props(GrPixelConfigIsSRGB(fPixelConfig) 272 SkSurfaceProps props(GrPixelConfigIsSRGB(fPixelConfig)
272 ? SkSurfaceProps::kGammaCorrect_Flag : 0, 273 ? SkSurfaceProps::kGammaCorrect_Flag : 0,
273 kUnknown_SkPixelGeometry); 274 kUnknown_SkPixelGeometry);
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 &fSwapchain, // pSwapchains 581 &fSwapchain, // pSwapchains
581 &backbuffer->fImageIndex, // pImageIndices 582 &backbuffer->fImageIndex, // pImageIndices
582 NULL // pResults 583 NULL // pResults
583 }; 584 };
584 585
585 fQueuePresentKHR(fPresentQueue, &presentInfo); 586 fQueuePresentKHR(fPresentQueue, &presentInfo);
586 587
587 } 588 }
588 589
589 } //namespace sk_app 590 } //namespace sk_app
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698