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 "GrVkCommandBuffer.h" | 8 #include "GrVkCommandBuffer.h" |
9 | 9 |
10 #include "GrVkFramebuffer.h" | 10 #include "GrVkFramebuffer.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 for (int i = 0; i < fTrackedResources.count(); ++i) { | 66 for (int i = 0; i < fTrackedResources.count(); ++i) { |
67 fTrackedResources[i]->unref(gpu); | 67 fTrackedResources[i]->unref(gpu); |
68 } | 68 } |
69 fTrackedResources.reset(); | 69 fTrackedResources.reset(); |
70 | 70 |
71 for (int i = 0; i < fTrackedRecycledResources.count(); ++i) { | 71 for (int i = 0; i < fTrackedRecycledResources.count(); ++i) { |
72 fTrackedRecycledResources[i]->recycle(const_cast<GrVkGpu*>(gpu)); | 72 fTrackedRecycledResources[i]->recycle(const_cast<GrVkGpu*>(gpu)); |
73 } | 73 } |
74 fTrackedRecycledResources.reset(); | 74 fTrackedRecycledResources.reset(); |
75 | 75 |
76 | |
77 this->invalidateState(); | 76 this->invalidateState(); |
78 | 77 |
79 // we will retain resources for later use | 78 // we will retain resources for later use |
80 VkCommandBufferResetFlags flags = 0; | 79 VkCommandBufferResetFlags flags = 0; |
81 GR_VK_CALL(gpu->vkInterface(), ResetCommandBuffer(fCmdBuffer, flags)); | 80 GR_VK_CALL(gpu->vkInterface(), ResetCommandBuffer(fCmdBuffer, flags)); |
82 | 81 |
83 this->onReset(gpu); | 82 this->onReset(gpu); |
84 } | 83 } |
85 | 84 |
86 //////////////////////////////////////////////////////////////////////////////// | 85 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 fIsActive = true; | 631 fIsActive = true; |
633 } | 632 } |
634 | 633 |
635 void GrVkSecondaryCommandBuffer::end(const GrVkGpu* gpu) { | 634 void GrVkSecondaryCommandBuffer::end(const GrVkGpu* gpu) { |
636 SkASSERT(fIsActive); | 635 SkASSERT(fIsActive); |
637 GR_VK_CALL_ERRCHECK(gpu->vkInterface(), EndCommandBuffer(fCmdBuffer)); | 636 GR_VK_CALL_ERRCHECK(gpu->vkInterface(), EndCommandBuffer(fCmdBuffer)); |
638 this->invalidateState(); | 637 this->invalidateState(); |
639 fIsActive = false; | 638 fIsActive = false; |
640 } | 639 } |
641 | 640 |
OLD | NEW |