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

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

Issue 425153003: Remove kDisableBlend_BlendOptFlag as it is no longer needed (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Nit Created 6 years, 4 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/GrDrawState.cpp ('k') | 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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 this->fActiveTraceMarkers.remove(*marker); 608 this->fActiveTraceMarkers.remove(*marker);
609 this->didRemoveGpuTraceMarker(); 609 this->didRemoveGpuTraceMarker();
610 --fGpuTraceMarkerCount; 610 --fGpuTraceMarkerCount;
611 } 611 }
612 } 612 }
613 613
614 //////////////////////////////////////////////////////////////////////////////// 614 ////////////////////////////////////////////////////////////////////////////////
615 615
616 bool GrDrawTarget::canApplyCoverage() const { 616 bool GrDrawTarget::canApplyCoverage() const {
617 // we can correctly apply coverage if a) we have dual source blending 617 // we can correctly apply coverage if a) we have dual source blending
618 // or b) one of our blend optimizations applies. 618 // or b) one of our blend optimizations applies
619 // or c) the src, dst blend coeffs are 1,0 and we will read Dst Color
620 GrBlendCoeff srcCoeff;
621 GrBlendCoeff dstCoeff;
622 GrDrawState::BlendOptFlags flag = this->getDrawState().getBlendOpts(true, &s rcCoeff, &dstCoeff);
619 return this->caps()->dualSourceBlendingSupport() || 623 return this->caps()->dualSourceBlendingSupport() ||
620 GrDrawState::kNone_BlendOpt != this->getDrawState().getBlendOpts(true ); 624 GrDrawState::kNone_BlendOpt != flag ||
625 (this->getDrawState().willEffectReadDstColor() &&
626 kOne_GrBlendCoeff == srcCoeff && kZero_GrBlendCoeff == dstCoeff);
621 } 627 }
622 628
623 //////////////////////////////////////////////////////////////////////////////// 629 ////////////////////////////////////////////////////////////////////////////////
624 630
625 void GrDrawTarget::drawIndexedInstances(GrPrimitiveType type, 631 void GrDrawTarget::drawIndexedInstances(GrPrimitiveType type,
626 int instanceCount, 632 int instanceCount,
627 int verticesPerInstance, 633 int verticesPerInstance,
628 int indicesPerInstance, 634 int indicesPerInstance,
629 const SkRect* devBounds) { 635 const SkRect* devBounds) {
630 if (!verticesPerInstance || !indicesPerInstance) { 636 if (!verticesPerInstance || !indicesPerInstance) {
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 1152 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
1147 1153
1148 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 1154 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
1149 r.appendf("%s is uploadable to a texture: %s\n", 1155 r.appendf("%s is uploadable to a texture: %s\n",
1150 kConfigNames[i], 1156 kConfigNames[i],
1151 gNY[fConfigTextureSupport[i]]); 1157 gNY[fConfigTextureSupport[i]]);
1152 } 1158 }
1153 1159
1154 return r; 1160 return r;
1155 } 1161 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698