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

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

Issue 1227153003: Remove setFromPaint from GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 5 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.h ('k') | src/gpu/GrStencilAndCoverTextContext.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 "GrPipelineBuilder.h" 8 #include "GrPipelineBuilder.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 30 matching lines...) Expand all
41 fCoverageCache = that.fCoverageCache; 41 fCoverageCache = that.fCoverageCache;
42 if (fColorProcInfoValid) { 42 if (fColorProcInfoValid) {
43 fColorProcInfo = that.fColorProcInfo; 43 fColorProcInfo = that.fColorProcInfo;
44 } 44 }
45 if (fCoverageProcInfoValid) { 45 if (fCoverageProcInfoValid) {
46 fCoverageProcInfo = that.fCoverageProcInfo; 46 fCoverageProcInfo = that.fCoverageProcInfo;
47 } 47 }
48 return *this; 48 return *this;
49 } 49 }
50 50
51 void GrPipelineBuilder::setFromPaint(const GrPaint& paint, GrRenderTarget* rt, c onst GrClip& clip) { 51 GrPipelineBuilder::GrPipelineBuilder(const GrPaint& paint, GrRenderTarget* rt, c onst GrClip& clip) {
52 SkASSERT(0 == fBlockEffectRemovalCnt || 0 == this->numFragmentStages()); 52 SkDEBUGCODE(fBlockEffectRemovalCnt = 0;)
53 53
54 fColorStages.reset(); 54 fColorStages.reset();
55 fCoverageStages.reset(); 55 fCoverageStages.reset();
56 56
57 for (int i = 0; i < paint.numColorStages(); ++i) { 57 for (int i = 0; i < paint.numColorStages(); ++i) {
58 fColorStages.push_back(paint.getColorStage(i)); 58 fColorStages.push_back(paint.getColorStage(i));
59 } 59 }
60 60
61 for (int i = 0; i < paint.numCoverageStages(); ++i) { 61 for (int i = 0; i < paint.numCoverageStages(); ++i) {
62 fCoverageStages.push_back(paint.getCoverageStage(i)); 62 fCoverageStages.push_back(paint.getCoverageStage(i));
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { 169 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const {
170 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { 170 if (!fCoverageProcInfoValid || coverage != fCoverageCache) {
171 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; 171 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags;
172 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), 172 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(),
173 this->numCoverageFragmentStages( ), coverage, flags, 173 this->numCoverageFragmentStages( ), coverage, flags,
174 true); 174 true);
175 fCoverageProcInfoValid = true; 175 fCoverageProcInfoValid = true;
176 fCoverageCache = coverage; 176 fCoverageCache = coverage;
177 } 177 }
178 } 178 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrStencilAndCoverTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698