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

Side by Side Diff: src/gpu/GrPipelineBuilder.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/GrPipelineBuilder.h ('k') | src/gpu/GrYUVProvider.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 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 "GrBlend.h" 10 #include "GrBlend.h"
(...skipping 26 matching lines...) Expand all
37 37
38 // These have no equivalent in GrPaint, set them to defaults 38 // These have no equivalent in GrPaint, set them to defaults
39 fDrawFace = kBoth_DrawFace; 39 fDrawFace = kBoth_DrawFace;
40 fStencilSettings.setDisabled(); 40 fStencilSettings.setDisabled();
41 fFlags = 0; 41 fFlags = 0;
42 42
43 fClip = clip; 43 fClip = clip;
44 44
45 this->setState(GrPipelineBuilder::kHWAntialias_Flag, 45 this->setState(GrPipelineBuilder::kHWAntialias_Flag,
46 rt->isUnifiedMultisampled() && paint.isAntiAlias()); 46 rt->isUnifiedMultisampled() && paint.isAntiAlias());
47 this->setState(GrPipelineBuilder::kDisableOutputConversionToSRGB_Flag,
48 paint.getDisableOutputConversionToSRGB());
47 } 49 }
48 50
49 //////////////////////////////////////////////////////////////////////////////s 51 //////////////////////////////////////////////////////////////////////////////s
50 52
51 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps, 53 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps,
52 const GrPipelineOptimizations& opti mizations) const { 54 const GrPipelineOptimizations& opti mizations) const {
53 if (this->getXPFactory()) { 55 if (this->getXPFactory()) {
54 return this->getXPFactory()->willNeedDstTexture(caps, optimizations, 56 return this->getXPFactory()->willNeedDstTexture(caps, optimizations,
55 this->hasMixedSamples()) ; 57 this->hasMixedSamples()) ;
56 } 58 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 90
89 GrPipelineBuilder::~GrPipelineBuilder() { 91 GrPipelineBuilder::~GrPipelineBuilder() {
90 SkASSERT(0 == fBlockEffectRemovalCnt); 92 SkASSERT(0 == fBlockEffectRemovalCnt);
91 for (int i = 0; i < fColorFragmentProcessors.count(); ++i) { 93 for (int i = 0; i < fColorFragmentProcessors.count(); ++i) {
92 fColorFragmentProcessors[i]->unref(); 94 fColorFragmentProcessors[i]->unref();
93 } 95 }
94 for (int i = 0; i < fCoverageFragmentProcessors.count(); ++i) { 96 for (int i = 0; i < fCoverageFragmentProcessors.count(); ++i) {
95 fCoverageFragmentProcessors[i]->unref(); 97 fCoverageFragmentProcessors[i]->unref();
96 } 98 }
97 } 99 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrYUVProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698