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 "GrVkGpu.h" | 8 #include "GrVkGpu.h" |
9 | 9 |
10 #include "GrContextOptions.h" | 10 #include "GrContextOptions.h" |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 | 637 |
638 fCurrentCmdBuffer->bindIndexBuffer(this, ibuf); | 638 fCurrentCmdBuffer->bindIndexBuffer(this, ibuf); |
639 } | 639 } |
640 } | 640 } |
641 | 641 |
642 //////////////////////////////////////////////////////////////////////////////// | 642 //////////////////////////////////////////////////////////////////////////////// |
643 | 643 |
644 GrStencilAttachment* GrVkGpu::createStencilAttachmentForRenderTarget(const GrRen
derTarget* rt, | 644 GrStencilAttachment* GrVkGpu::createStencilAttachmentForRenderTarget(const GrRen
derTarget* rt, |
645 int width, | 645 int width, |
646 int height)
{ | 646 int height)
{ |
647 SkASSERT(rt->asTexture()); | |
648 SkASSERT(width >= rt->width()); | 647 SkASSERT(width >= rt->width()); |
649 SkASSERT(height >= rt->height()); | 648 SkASSERT(height >= rt->height()); |
650 | 649 |
651 int samples = rt->numStencilSamples(); | 650 int samples = rt->numStencilSamples(); |
652 | 651 |
653 const GrVkCaps::StencilFormat& sFmt = this->vkCaps().preferedStencilFormat()
; | 652 const GrVkCaps::StencilFormat& sFmt = this->vkCaps().preferedStencilFormat()
; |
654 | 653 |
655 GrVkStencilAttachment* stencil(GrVkStencilAttachment::Create(this, | 654 GrVkStencilAttachment* stencil(GrVkStencilAttachment::Create(this, |
656 GrGpuResource::
kCached_LifeCycle, | 655 GrGpuResource::
kCached_LifeCycle, |
657 width, | 656 width, |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1567 aglSwapBuffers(aglGetCurrentContext()); | 1566 aglSwapBuffers(aglGetCurrentContext()); |
1568 int set_a_break_pt_here = 9; | 1567 int set_a_break_pt_here = 9; |
1569 aglSwapBuffers(aglGetCurrentContext()); | 1568 aglSwapBuffers(aglGetCurrentContext()); |
1570 #elif defined(SK_BUILD_FOR_WIN32) | 1569 #elif defined(SK_BUILD_FOR_WIN32) |
1571 SwapBuf(); | 1570 SwapBuf(); |
1572 int set_a_break_pt_here = 9; | 1571 int set_a_break_pt_here = 9; |
1573 SwapBuf(); | 1572 SwapBuf(); |
1574 #endif | 1573 #endif |
1575 #endif | 1574 #endif |
1576 } | 1575 } |
OLD | NEW |