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

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

Issue 545273002: Small fix for RODrawState (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | 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 2014 Google Inc. 2 * Copyright 2014 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 "GrRODrawState.h" 8 #include "GrRODrawState.h"
9 #include "GrDrawTargetCaps.h" 9 #include "GrDrawTargetCaps.h"
10 10
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 bool usingVertexCoverage = this->hasCoverageVertexAttribute(); 35 bool usingVertexCoverage = this->hasCoverageVertexAttribute();
36 if (!usingVertexCoverage && this->fCoverage != that.fCoverage) { 36 if (!usingVertexCoverage && this->fCoverage != that.fCoverage) {
37 return false; 37 return false;
38 } 38 }
39 39
40 bool explicitLocalCoords = this->hasLocalCoordAttribute(); 40 bool explicitLocalCoords = this->hasLocalCoordAttribute();
41 if (this->hasGeometryProcessor()) { 41 if (this->hasGeometryProcessor()) {
42 if (!that.hasGeometryProcessor()) { 42 if (!that.hasGeometryProcessor()) {
43 return kIncompatible_CombinedState; 43 return false;
44 } else if (!GrEffectStage::AreCompatible(*this->getGeometryProcessor(), 44 } else if (!GrEffectStage::AreCompatible(*this->getGeometryProcessor(),
45 *that.getGeometryProcessor(), 45 *that.getGeometryProcessor(),
46 explicitLocalCoords)) { 46 explicitLocalCoords)) {
47 return kIncompatible_CombinedState; 47 return false;
48 } 48 }
49 } else if (that.hasGeometryProcessor()) { 49 } else if (that.hasGeometryProcessor()) {
50 return kIncompatible_CombinedState; 50 return false;
51 } 51 }
52 52
53 for (int i = 0; i < this->numColorStages(); i++) { 53 for (int i = 0; i < this->numColorStages(); i++) {
54 if (!GrEffectStage::AreCompatible(this->getColorStage(i), that.getColorS tage(i), 54 if (!GrEffectStage::AreCompatible(this->getColorStage(i), that.getColorS tage(i),
55 explicitLocalCoords)) { 55 explicitLocalCoords)) {
56 return false; 56 return false;
57 } 57 }
58 } 58 }
59 for (int i = 0; i < this->numCoverageStages(); i++) { 59 for (int i = 0; i < this->numCoverageStages(); i++) {
60 if (!GrEffectStage::AreCompatible(this->getCoverageStage(i), that.getCov erageStage(i), 60 if (!GrEffectStage::AreCompatible(this->getCoverageStage(i), that.getCov erageStage(i),
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 find that only 1, ISA, and ISC produce the correct destination when applied to S' and D. 177 find that only 1, ISA, and ISC produce the correct destination when applied to S' and D.
178 Also, if we're directly rendering coverage (isCoverageDrawing) then coverag e is treated as 178 Also, if we're directly rendering coverage (isCoverageDrawing) then coverag e is treated as
179 color by definition. 179 color by definition.
180 */ 180 */
181 return kOne_GrBlendCoeff == fDstBlend || 181 return kOne_GrBlendCoeff == fDstBlend ||
182 kISA_GrBlendCoeff == fDstBlend || 182 kISA_GrBlendCoeff == fDstBlend ||
183 kISC_GrBlendCoeff == fDstBlend || 183 kISC_GrBlendCoeff == fDstBlend ||
184 this->isCoverageDrawing(); 184 this->isCoverageDrawing();
185 } 185 }
186 186
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698