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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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()); | 647 SkASSERT(rt->asTexture()); |
648 SkASSERT(width >= rt->width()); | 648 SkASSERT(width >= rt->width()); |
649 SkASSERT(height >= rt->height()); | 649 SkASSERT(height >= rt->height()); |
650 | 650 |
651 int samples = rt->numStencilSamples(); | 651 int samples = rt->numStencilSamples(); |
652 | 652 |
653 SkASSERT(this->vkCaps().stencilFormats().count()); | 653 const GrVkCaps::StencilFormat& sFmt = this->vkCaps().preferedStencilFormat()
; |
654 const GrVkCaps::StencilFormat& sFmt = this->vkCaps().stencilFormats()[0]; | |
655 | 654 |
656 GrVkStencilAttachment* stencil(GrVkStencilAttachment::Create(this, | 655 GrVkStencilAttachment* stencil(GrVkStencilAttachment::Create(this, |
657 GrGpuResource::
kCached_LifeCycle, | 656 GrGpuResource::
kCached_LifeCycle, |
658 width, | 657 width, |
659 height, | 658 height, |
660 samples, | 659 samples, |
661 sFmt)); | 660 sFmt)); |
662 fStats.incStencilAttachmentCreates(); | 661 fStats.incStencilAttachmentCreates(); |
663 return stencil; | 662 return stencil; |
664 } | 663 } |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1434 aglSwapBuffers(aglGetCurrentContext()); | 1433 aglSwapBuffers(aglGetCurrentContext()); |
1435 int set_a_break_pt_here = 9; | 1434 int set_a_break_pt_here = 9; |
1436 aglSwapBuffers(aglGetCurrentContext()); | 1435 aglSwapBuffers(aglGetCurrentContext()); |
1437 #elif defined(SK_BUILD_FOR_WIN32) | 1436 #elif defined(SK_BUILD_FOR_WIN32) |
1438 SwapBuf(); | 1437 SwapBuf(); |
1439 int set_a_break_pt_here = 9; | 1438 int set_a_break_pt_here = 9; |
1440 SwapBuf(); | 1439 SwapBuf(); |
1441 #endif | 1440 #endif |
1442 #endif | 1441 #endif |
1443 } | 1442 } |
OLD | NEW |