| 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 "GrXferProcessor.h" | 8 #include "GrXferProcessor.h" |
| 9 #include "gl/GrGLCaps.h" | 9 #include "gl/GrGLCaps.h" |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 | 34 |
| 35 /////////////////////////////////////////////////////////////////////////////// | 35 /////////////////////////////////////////////////////////////////////////////// |
| 36 | 36 |
| 37 GrXferProcessor* GrXPFactory::createXferProcessor(const GrProcOptInfo& colorPOI, | 37 GrXferProcessor* GrXPFactory::createXferProcessor(const GrProcOptInfo& colorPOI, |
| 38 const GrProcOptInfo& coverageP
OI, | 38 const GrProcOptInfo& coverageP
OI, |
| 39 const GrDeviceCoordTexture* ds
tCopy, | 39 const GrDeviceCoordTexture* ds
tCopy, |
| 40 const GrDrawTargetCaps& caps)
const { | 40 const GrDrawTargetCaps& caps)
const { |
| 41 #ifdef SK_DEBUG | 41 #ifdef SK_DEBUG |
| 42 if (this->willReadDstColor(caps, colorPOI, coveragePOI)) { | 42 if (this->willReadDstColor(caps, colorPOI, coveragePOI)) { |
| 43 if (!caps.dstReadInShaderSupport()) { | 43 if (!caps.shaderCaps()->dstReadInShaderSupport()) { |
| 44 SkASSERT(dstCopy && dstCopy->texture()); | 44 SkASSERT(dstCopy && dstCopy->texture()); |
| 45 } else { | 45 } else { |
| 46 SkASSERT(!dstCopy || !dstCopy->texture()); | 46 SkASSERT(!dstCopy || !dstCopy->texture()); |
| 47 } | 47 } |
| 48 } else { | 48 } else { |
| 49 SkASSERT(!dstCopy || !dstCopy->texture()); | 49 SkASSERT(!dstCopy || !dstCopy->texture()); |
| 50 } | 50 } |
| 51 #endif | 51 #endif |
| 52 return this->onCreateXferProcessor(caps, colorPOI, coveragePOI, dstCopy); | 52 return this->onCreateXferProcessor(caps, colorPOI, coveragePOI, dstCopy); |
| 53 } | 53 } |
| 54 | 54 |
| 55 bool GrXPFactory::willNeedDstCopy(const GrDrawTargetCaps& caps, const GrProcOptI
nfo& colorPOI, | 55 bool GrXPFactory::willNeedDstCopy(const GrDrawTargetCaps& caps, const GrProcOptI
nfo& colorPOI, |
| 56 const GrProcOptInfo& coveragePOI) const { | 56 const GrProcOptInfo& coveragePOI) const { |
| 57 return (this->willReadDstColor(caps, colorPOI, coveragePOI) && !caps.dstRead
InShaderSupport()); | 57 return (this->willReadDstColor(caps, colorPOI, coveragePOI) |
| 58 && !caps.shaderCaps()->dstReadInShaderSupport()); |
| 58 } | 59 } |
| 59 | 60 |
| OLD | NEW |