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

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

Issue 1830303002: Require sRGB write control for sRGB support. Add flag to GrPaint to suppress linear -> sRGB convers… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Added comment to srgbSupport() Created 4 years, 9 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/GrPipeline.h ('k') | src/gpu/GrPipelineBuilder.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 "GrPipeline.h" 8 #include "GrPipeline.h"
9 9
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 pipeline->fStencilSettings = builder.getStencil(); 74 pipeline->fStencilSettings = builder.getStencil();
75 pipeline->fDrawFace = builder.getDrawFace(); 75 pipeline->fDrawFace = builder.getDrawFace();
76 76
77 pipeline->fFlags = 0; 77 pipeline->fFlags = 0;
78 if (builder.isHWAntialias()) { 78 if (builder.isHWAntialias()) {
79 pipeline->fFlags |= kHWAA_Flag; 79 pipeline->fFlags |= kHWAA_Flag;
80 } 80 }
81 if (builder.snapVerticesToPixelCenters()) { 81 if (builder.snapVerticesToPixelCenters()) {
82 pipeline->fFlags |= kSnapVertices_Flag; 82 pipeline->fFlags |= kSnapVertices_Flag;
83 } 83 }
84 if (builder.getDisableOutputConversionToSRGB()) {
85 pipeline->fFlags |= kDisableOutputConversionToSRGB_Flag;
86 }
84 87
85 int firstColorProcessorIdx = args.fOpts.fColorPOI.firstEffectiveProcessorInd ex(); 88 int firstColorProcessorIdx = args.fOpts.fColorPOI.firstEffectiveProcessorInd ex();
86 89
87 // TODO: Once we can handle single or four channel input into coverage GrFra gmentProcessors 90 // TODO: Once we can handle single or four channel input into coverage GrFra gmentProcessors
88 // then we can use GrPipelineBuilder's coverageProcInfo (like color above) t o set this initial 91 // then we can use GrPipelineBuilder's coverageProcInfo (like color above) t o set this initial
89 // information. 92 // information.
90 int firstCoverageProcessorIdx = 0; 93 int firstCoverageProcessorIdx = 0;
91 94
92 pipeline->adjustProgramFromOptimizations(builder, optFlags, args.fOpts.fColo rPOI, 95 pipeline->adjustProgramFromOptimizations(builder, optFlags, args.fOpts.fColo rPOI,
93 args.fOpts.fCoveragePOI, &firstColo rProcessorIdx, 96 args.fOpts.fCoveragePOI, &firstColo rProcessorIdx,
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 222 }
220 223
221 for (int i = 0; i < a.numFragmentProcessors(); i++) { 224 for (int i = 0; i < a.numFragmentProcessors(); i++) {
222 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore CoordTransforms)) { 225 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore CoordTransforms)) {
223 return false; 226 return false;
224 } 227 }
225 } 228 }
226 return true; 229 return true;
227 } 230 }
228 231
OLDNEW
« no previous file with comments | « src/gpu/GrPipeline.h ('k') | src/gpu/GrPipelineBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698