| 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 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1563 const SkIPoint& dstPoint) { | 1563 const SkIPoint& dstPoint) { |
| 1564 SkASSERT(false); | 1564 SkASSERT(false); |
| 1565 } | 1565 } |
| 1566 | 1566 |
| 1567 bool GrVkGpu::onCopySurface(GrSurface* dst, | 1567 bool GrVkGpu::onCopySurface(GrSurface* dst, |
| 1568 GrSurface* src, | 1568 GrSurface* src, |
| 1569 const SkIRect& srcRect, | 1569 const SkIRect& srcRect, |
| 1570 const SkIPoint& dstPoint) { | 1570 const SkIPoint& dstPoint) { |
| 1571 if (can_copy_as_resolve(dst, src, this)) { | 1571 if (can_copy_as_resolve(dst, src, this)) { |
| 1572 this->copySurfaceAsResolve(dst, src, srcRect, dstPoint); | 1572 this->copySurfaceAsResolve(dst, src, srcRect, dstPoint); |
| 1573 return true; |
| 1573 } | 1574 } |
| 1574 | 1575 |
| 1575 GrVkImage* dstImage; | 1576 GrVkImage* dstImage; |
| 1576 GrVkImage* srcImage; | 1577 GrVkImage* srcImage; |
| 1577 GrRenderTarget* dstRT = dst->asRenderTarget(); | 1578 GrRenderTarget* dstRT = dst->asRenderTarget(); |
| 1578 if (dstRT) { | 1579 if (dstRT) { |
| 1579 GrVkRenderTarget* vkRT = static_cast<GrVkRenderTarget*>(dstRT); | 1580 GrVkRenderTarget* vkRT = static_cast<GrVkRenderTarget*>(dstRT); |
| 1580 dstImage = vkRT->numColorSamples() > 1 ? vkRT->msaaImage() : vkRT; | 1581 dstImage = vkRT->numColorSamples() > 1 ? vkRT->msaaImage() : vkRT; |
| 1581 } else { | 1582 } else { |
| 1582 SkASSERT(dst->asTexture()); | 1583 SkASSERT(dst->asTexture()); |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1830 // Currently it is fine for us to always pass in 1 for the clear count even
if no attachment | 1831 // Currently it is fine for us to always pass in 1 for the clear count even
if no attachment |
| 1831 // uses it. In the current state, we also only use the LOAD_OP_CLEAR for the
color attachment | 1832 // uses it. In the current state, we also only use the LOAD_OP_CLEAR for the
color attachment |
| 1832 // which is always at the first attachment. | 1833 // which is always at the first attachment. |
| 1833 fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target,
*pBounds, true); | 1834 fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target,
*pBounds, true); |
| 1834 fCurrentCmdBuffer->executeCommands(this, buffer); | 1835 fCurrentCmdBuffer->executeCommands(this, buffer); |
| 1835 fCurrentCmdBuffer->endRenderPass(this); | 1836 fCurrentCmdBuffer->endRenderPass(this); |
| 1836 | 1837 |
| 1837 this->didWriteToSurface(target, &bounds); | 1838 this->didWriteToSurface(target, &bounds); |
| 1838 } | 1839 } |
| 1839 | 1840 |
| OLD | NEW |