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

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

Issue 845103005: GrBatchPrototype (Closed) Base URL: https://skia.googlesource.com/skia.git@lc2
Patch Set: removing dstread 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/GrBatchTarget.cpp ('k') | src/gpu/GrDrawTarget.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 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 "GrDefaultGeoProcFactory.h" 8 #include "GrDefaultGeoProcFactory.h"
9 9
10 #include "GrInvariantOutput.h" 10 #include "GrInvariantOutput.h"
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 const char* name() const SK_OVERRIDE { return "DefaultGeometryProcessor"; } 37 const char* name() const SK_OVERRIDE { return "DefaultGeometryProcessor"; }
38 38
39 const Attribute* inPosition() const { return fInPosition; } 39 const Attribute* inPosition() const { return fInPosition; }
40 const Attribute* inColor() const { return fInColor; } 40 const Attribute* inColor() const { return fInColor; }
41 const Attribute* inLocalCoords() const { return fInLocalCoords; } 41 const Attribute* inLocalCoords() const { return fInLocalCoords; }
42 const Attribute* inCoverage() const { return fInCoverage; } 42 const Attribute* inCoverage() const { return fInCoverage; }
43 uint8_t coverage() const { return fCoverage; } 43 uint8_t coverage() const { return fCoverage; }
44 44
45 void initBatchTracker(GrBatchTracker* bt, const InitBT& init) const SK_OVERR IDE { 45 void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE {
46 BatchTracker* local = bt->cast<BatchTracker>(); 46 BatchTracker* local = bt->cast<BatchTracker>();
47 local->fInputColorType = GetColorInputType(&local->fColor, this->color() , init, 47 local->fInputColorType = GetColorInputType(&local->fColor, this->color() , init,
48 SkToBool(fInColor)); 48 SkToBool(fInColor));
49 49
50 bool hasVertexCoverage = SkToBool(fInCoverage) && !init.fCoverageIgnored ; 50 bool hasVertexCoverage = SkToBool(fInCoverage) && !init.fCoverageIgnored ;
51 bool covIsSolidWhite = !hasVertexCoverage && 0xff == this->coverage(); 51 bool covIsSolidWhite = !hasVertexCoverage && 0xff == this->coverage();
52 if (covIsSolidWhite) { 52 if (covIsSolidWhite) {
53 local->fInputCoverageType = kAllOnes_GrGPInput; 53 local->fInputCoverageType = kAllOnes_GrGPInput;
54 } else if (!hasVertexCoverage) { 54 } else if (!hasVertexCoverage) {
55 local->fInputCoverageType = kUniform_GrGPInput; 55 local->fInputCoverageType = kUniform_GrGPInput;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 const SkMatrix& local Matrix, 282 const SkMatrix& local Matrix,
283 bool opaqueVertexColo rs, 283 bool opaqueVertexColo rs,
284 uint8_t coverage) { 284 uint8_t coverage) {
285 return DefaultGeoProc::Create(gpTypeFlags, 285 return DefaultGeoProc::Create(gpTypeFlags,
286 color, 286 color,
287 viewMatrix, 287 viewMatrix,
288 localMatrix, 288 localMatrix,
289 opaqueVertexColors, 289 opaqueVertexColors,
290 coverage); 290 coverage);
291 } 291 }
OLDNEW
« no previous file with comments | « src/gpu/GrBatchTarget.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698