Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: src/gpu/GrXferProcessor.cpp

Issue 912413002: Pass in ProcOptInfos into willNeedDstCopy on XPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Review cleanup Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/effects/GrCoverageSetOpXP.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 20 matching lines...) Expand all
31 this->onGetGLProcessorKey(caps, b); 31 this->onGetGLProcessorKey(caps, b);
32 } 32 }
33 33
34 /////////////////////////////////////////////////////////////////////////////// 34 ///////////////////////////////////////////////////////////////////////////////
35 35
36 GrXferProcessor* GrXPFactory::createXferProcessor(const GrProcOptInfo& colorPOI, 36 GrXferProcessor* GrXPFactory::createXferProcessor(const GrProcOptInfo& colorPOI,
37 const GrProcOptInfo& coverageP OI, 37 const GrProcOptInfo& coverageP OI,
38 const GrDeviceCoordTexture* ds tCopy, 38 const GrDeviceCoordTexture* ds tCopy,
39 const GrDrawTargetCaps& caps) const { 39 const GrDrawTargetCaps& caps) const {
40 #ifdef SK_DEBUG 40 #ifdef SK_DEBUG
41 if (this->willReadDstColor()) { 41 if (this->willReadDstColor(colorPOI, coveragePOI)) {
42 if (!caps.dstReadInShaderSupport()) { 42 if (!caps.dstReadInShaderSupport()) {
43 SkASSERT(dstCopy && dstCopy->texture()); 43 SkASSERT(dstCopy && dstCopy->texture());
44 } else { 44 } else {
45 SkASSERT(!dstCopy || !dstCopy->texture()); 45 SkASSERT(!dstCopy || !dstCopy->texture());
46 } 46 }
47 } else { 47 } else {
48 SkASSERT(!dstCopy || !dstCopy->texture()); 48 SkASSERT(!dstCopy || !dstCopy->texture());
49 49
50 } 50 }
51 #endif 51 #endif
52 return this->onCreateXferProcessor(colorPOI, coveragePOI, dstCopy); 52 return this->onCreateXferProcessor(colorPOI, coveragePOI, dstCopy);
53 } 53 }
54 54
55 bool GrXPFactory::willNeedDstCopy(const GrDrawTargetCaps& caps) const { 55 bool GrXPFactory::willNeedDstCopy(const GrDrawTargetCaps& caps, const GrProcOptI nfo& colorPOI,
56 return (this->willReadDstColor() && !caps.dstReadInShaderSupport()); 56 const GrProcOptInfo& coveragePOI) const {
57 return (this->willReadDstColor(colorPOI, coveragePOI) && !caps.dstReadInShad erSupport());
57 } 58 }
58 59
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/effects/GrCoverageSetOpXP.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698