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

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

Issue 683133006: Remove coverage from grpaint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 6 years, 1 month 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 | « include/gpu/GrPaint.h ('k') | src/gpu/GrPaint.cpp » ('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 2012 Google Inc. 2 * Copyright 2012 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 "GrDrawState.h" 8 #include "GrDrawState.h"
9 9
10 #include "GrOptDrawState.h" 10 #include "GrOptDrawState.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 fHints = 0; 229 fHints = 0;
230 230
231 // Enable the clip bit 231 // Enable the clip bit
232 this->enableState(GrDrawState::kClip_StateBit); 232 this->enableState(GrDrawState::kClip_StateBit);
233 233
234 this->setColor(paint.getColor()); 234 this->setColor(paint.getColor());
235 this->setState(GrDrawState::kDither_StateBit, paint.isDither()); 235 this->setState(GrDrawState::kDither_StateBit, paint.isDither());
236 this->setState(GrDrawState::kHWAntialias_StateBit, paint.isAntiAlias()); 236 this->setState(GrDrawState::kHWAntialias_StateBit, paint.isAntiAlias());
237 237
238 this->setBlendFunc(paint.getSrcBlendCoeff(), paint.getDstBlendCoeff()); 238 this->setBlendFunc(paint.getSrcBlendCoeff(), paint.getDstBlendCoeff());
239 this->setCoverage(paint.getCoverage()); 239 this->setCoverage(0xFF);
240 } 240 }
241 241
242 //////////////////////////////////////////////////////////////////////////////// 242 ////////////////////////////////////////////////////////////////////////////////
243 243
244 bool GrDrawState::validateVertexAttribs() const { 244 bool GrDrawState::validateVertexAttribs() const {
245 // check consistency of effects and attributes 245 // check consistency of effects and attributes
246 GrSLType slTypes[kMaxVertexAttribCnt]; 246 GrSLType slTypes[kMaxVertexAttribCnt];
247 for (int i = 0; i < kMaxVertexAttribCnt; ++i) { 247 for (int i = 0; i < kMaxVertexAttribCnt; ++i) {
248 slTypes[i] = static_cast<GrSLType>(-1); 248 slTypes[i] = static_cast<GrSLType>(-1);
249 } 249 }
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 } 735 }
736 736
737 // Since the shader will multiply coverage and color, the only way the f inal A==1 is if 737 // Since the shader will multiply coverage and color, the only way the f inal A==1 is if
738 // coverage and color both have A==1. 738 // coverage and color both have A==1.
739 return (inoutColor.isOpaque() && inoutCoverage.isOpaque()); 739 return (inoutColor.isOpaque() && inoutCoverage.isOpaque());
740 } 740 }
741 741
742 return inoutColor.isOpaque(); 742 return inoutColor.isOpaque();
743 } 743 }
744 744
OLDNEW
« no previous file with comments | « include/gpu/GrPaint.h ('k') | src/gpu/GrPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698