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

Side by Side Diff: src/gpu/effects/GrBitmapTextGeoProc.cpp

Issue 1110033004: Make XPFragmentBuilder only Builder with access to DstCopy. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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/effects/GrBicubicEffect.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.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 2013 Google Inc. 2 * Copyright 2013 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 "GrBitmapTextGeoProc.h" 8 #include "GrBitmapTextGeoProc.h"
9 #include "GrFontAtlasSizes.h" 9 #include "GrFontAtlasSizes.h"
10 #include "GrInvariantOutput.h" 10 #include "GrInvariantOutput.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 this->setupColorPassThrough(pb, local.fInputColorType, args.fOutputColor , cte.inColor(), 53 this->setupColorPassThrough(pb, local.fInputColorType, args.fOutputColor , cte.inColor(),
54 &fColorUniform); 54 &fColorUniform);
55 55
56 // Setup position 56 // Setup position
57 this->setupPosition(pb, gpArgs, cte.inPosition()->fName, cte.viewMatrix( )); 57 this->setupPosition(pb, gpArgs, cte.inPosition()->fName, cte.viewMatrix( ));
58 58
59 // emit transforms 59 // emit transforms
60 this->emitTransforms(args.fPB, gpArgs->fPositionVar, cte.inPosition()->f Name, 60 this->emitTransforms(args.fPB, gpArgs->fPositionVar, cte.inPosition()->f Name,
61 cte.localMatrix(), args.fTransformsIn, args.fTransf ormsOut); 61 cte.localMatrix(), args.fTransformsIn, args.fTransf ormsOut);
62 62
63 GrGLGPFragmentBuilder* fsBuilder = pb->getFragmentShaderBuilder(); 63 GrGLFragmentBuilder* fsBuilder = pb->getFragmentShaderBuilder();
64 if (cte.maskFormat() == kARGB_GrMaskFormat) { 64 if (cte.maskFormat() == kARGB_GrMaskFormat) {
65 fsBuilder->codeAppendf("%s = ", args.fOutputColor); 65 fsBuilder->codeAppendf("%s = ", args.fOutputColor);
66 fsBuilder->appendTextureLookupAndModulate(args.fOutputColor, 66 fsBuilder->appendTextureLookupAndModulate(args.fOutputColor,
67 args.fSamplers[0], 67 args.fSamplers[0],
68 v.fsIn(), 68 v.fsIn(),
69 kVec2f_GrSLType); 69 kVec2f_GrSLType);
70 fsBuilder->codeAppend(";"); 70 fsBuilder->codeAppend(";");
71 fsBuilder->codeAppendf("%s = vec4(1);", args.fOutputCoverage); 71 fsBuilder->codeAppendf("%s = vec4(1);", args.fOutputCoverage);
72 } else { 72 } else {
73 fsBuilder->codeAppendf("%s = ", args.fOutputCoverage); 73 fsBuilder->codeAppendf("%s = ", args.fOutputCoverage);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 break; 227 break;
228 case 2: 228 case 2:
229 format = kARGB_GrMaskFormat; 229 format = kARGB_GrMaskFormat;
230 break; 230 break;
231 } 231 }
232 232
233 return GrBitmapTextGeoProc::Create(GrRandomColor(random), textures[texIdx], params, 233 return GrBitmapTextGeoProc::Create(GrRandomColor(random), textures[texIdx], params,
234 format, random->nextBool(), 234 format, random->nextBool(),
235 GrTest::TestMatrix(random)); 235 GrTest::TestMatrix(random));
236 } 236 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBicubicEffect.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698