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

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

Issue 2370953002: Revert of Fix bufferIndex check in VulkanWindowContext (Closed)
Patch Set: Created 4 years, 2 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 "GrRenderTarget.h" 10 #include "GrRenderTarget.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 405
406 fContext->unref(); 406 fContext->unref();
407 407
408 fBackendContext.reset(nullptr); 408 fBackendContext.reset(nullptr);
409 } 409 }
410 410
411 VulkanWindowContext::BackbufferInfo* VulkanWindowContext::getAvailableBackbuffer () { 411 VulkanWindowContext::BackbufferInfo* VulkanWindowContext::getAvailableBackbuffer () {
412 SkASSERT(fBackbuffers); 412 SkASSERT(fBackbuffers);
413 413
414 ++fCurrentBackbufferIndex; 414 ++fCurrentBackbufferIndex;
415 if (fCurrentBackbufferIndex >= fImageCount) { 415 if (fCurrentBackbufferIndex > fImageCount) {
416 fCurrentBackbufferIndex = 0; 416 fCurrentBackbufferIndex = 0;
417 } 417 }
418 418
419 BackbufferInfo* backbuffer = fBackbuffers + fCurrentBackbufferIndex; 419 BackbufferInfo* backbuffer = fBackbuffers + fCurrentBackbufferIndex;
420 420
421 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, 421 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface,
422 WaitForFences(fBackendContext->fDevice, 2, backbuffer->f UsageFences, 422 WaitForFences(fBackendContext->fDevice, 2, backbuffer->f UsageFences,
423 true, UINT64_MAX)); 423 true, UINT64_MAX));
424 return backbuffer; 424 return backbuffer;
425 } 425 }
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 1, // swapchainCount 597 1, // swapchainCount
598 &fSwapchain, // pSwapchains 598 &fSwapchain, // pSwapchains
599 &backbuffer->fImageIndex, // pImageIndices 599 &backbuffer->fImageIndex, // pImageIndices
600 NULL // pResults 600 NULL // pResults
601 }; 601 };
602 602
603 fQueuePresentKHR(fPresentQueue, &presentInfo); 603 fQueuePresentKHR(fPresentQueue, &presentInfo);
604 } 604 }
605 605
606 } //namespace sk_app 606 } //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