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

Side by Side Diff: include/gpu/GrPaint.h

Issue 2154753003: Introduce GrColorSpaceXform, for gamut conversion on textures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef GrPaint_DEFINED 10 #ifndef GrPaint_DEFINED
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 */ 108 */
109 void addCoverageFragmentProcessor(sk_sp<GrFragmentProcessor> fp) { 109 void addCoverageFragmentProcessor(sk_sp<GrFragmentProcessor> fp) {
110 SkASSERT(fp); 110 SkASSERT(fp);
111 fCoverageFragmentProcessors.push_back(std::move(fp)); 111 fCoverageFragmentProcessors.push_back(std::move(fp));
112 } 112 }
113 113
114 /** 114 /**
115 * Helpers for adding color or coverage effects that sample a texture. The m atrix is applied 115 * Helpers for adding color or coverage effects that sample a texture. The m atrix is applied
116 * to the src space position to compute texture coordinates. 116 * to the src space position to compute texture coordinates.
117 */ 117 */
118 void addColorTextureProcessor(GrTexture*, const SkMatrix&); 118 void addColorTextureProcessor(GrTexture*, sk_sp<GrColorSpaceXform>, const Sk Matrix&);
119 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&); 119 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&);
120 void addColorTextureProcessor(GrTexture*, const SkMatrix&, const GrTexturePa rams&); 120 void addColorTextureProcessor(GrTexture*, sk_sp<GrColorSpaceXform>, const Sk Matrix&,
121 const GrTextureParams&);
121 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&, const GrTextur eParams&); 122 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&, const GrTextur eParams&);
122 123
123 int numColorFragmentProcessors() const { return fColorFragmentProcessors.cou nt(); } 124 int numColorFragmentProcessors() const { return fColorFragmentProcessors.cou nt(); }
124 int numCoverageFragmentProcessors() const { return fCoverageFragmentProcesso rs.count(); } 125 int numCoverageFragmentProcessors() const { return fCoverageFragmentProcesso rs.count(); }
125 int numTotalFragmentProcessors() const { return this->numColorFragmentProces sors() + 126 int numTotalFragmentProcessors() const { return this->numColorFragmentProces sors() +
126 this->numCoverageFragmentProcessor s(); } 127 this->numCoverageFragmentProcessor s(); }
127 128
128 GrXPFactory* getXPFactory() const { 129 GrXPFactory* getXPFactory() const {
129 return fXPFactory.get(); 130 return fXPFactory.get();
130 } 131 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 SkSTArray<2, sk_sp<GrFragmentProcessor>> fCoverageFragmentProcessors; 165 SkSTArray<2, sk_sp<GrFragmentProcessor>> fCoverageFragmentProcessors;
165 166
166 bool fAntiAlias; 167 bool fAntiAlias;
167 bool fDisableOutputConversionToSRGB; 168 bool fDisableOutputConversionToSRGB;
168 bool fAllowSRGBInputs; 169 bool fAllowSRGBInputs;
169 170
170 GrColor4f fColor; 171 GrColor4f fColor;
171 }; 172 };
172 173
173 #endif 174 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698