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

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

Issue 1443743002: Rename some processor functions from GL to GLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@primProcs
Patch Set: nits Created 5 years, 1 month 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/GrConfigConversionEffect.h ('k') | src/gpu/effects/GrConstColorProcessor.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 2012 Google Inc. 2 * Copyright 2012 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 "GrConfigConversionEffect.h" 8 #include "GrConfigConversionEffect.h"
9 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrDrawContext.h" 10 #include "GrDrawContext.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 swapRB = true; 135 swapRB = true;
136 } else { 136 } else {
137 swapRB = d->fRandom->nextBool(); 137 swapRB = d->fRandom->nextBool();
138 } 138 }
139 return new GrConfigConversionEffect(d->fTextures[GrProcessorUnitTest::kSkiaP MTextureIdx], 139 return new GrConfigConversionEffect(d->fTextures[GrProcessorUnitTest::kSkiaP MTextureIdx],
140 swapRB, pmConv, GrTest::TestMatrix(d->fR andom)); 140 swapRB, pmConv, GrTest::TestMatrix(d->fR andom));
141 } 141 }
142 142
143 /////////////////////////////////////////////////////////////////////////////// 143 ///////////////////////////////////////////////////////////////////////////////
144 144
145 void GrConfigConversionEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, 145 void GrConfigConversionEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
146 GrProcessorKeyBuilder* b) con st { 146 GrProcessorKeyBuilder* b) c onst {
147 GrGLConfigConversionEffect::GenKey(*this, caps, b); 147 GrGLConfigConversionEffect::GenKey(*this, caps, b);
148 } 148 }
149 149
150 GrGLSLFragmentProcessor* GrConfigConversionEffect::onCreateGLInstance() const { 150 GrGLSLFragmentProcessor* GrConfigConversionEffect::onCreateGLSLInstance() const {
151 return new GrGLConfigConversionEffect(*this); 151 return new GrGLConfigConversionEffect(*this);
152 } 152 }
153 153
154 154
155 155
156 void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context , 156 void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context ,
157 PMConversion* pmTo UPMRule, 157 PMConversion* pmTo UPMRule,
158 PMConversion* upmT oPMRule) { 158 PMConversion* upmT oPMRule) {
159 *pmToUPMRule = kNone_PMConversion; 159 *pmToUPMRule = kNone_PMConversion;
160 *upmToPMRule = kNone_PMConversion; 160 *upmToPMRule = kNone_PMConversion;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 } else { 298 } else {
299 if (kRGBA_8888_GrPixelConfig != texture->config() && 299 if (kRGBA_8888_GrPixelConfig != texture->config() &&
300 kBGRA_8888_GrPixelConfig != texture->config() && 300 kBGRA_8888_GrPixelConfig != texture->config() &&
301 kNone_PMConversion != pmConversion) { 301 kNone_PMConversion != pmConversion) {
302 // The PM conversions assume colors are 0..255 302 // The PM conversions assume colors are 0..255
303 return nullptr; 303 return nullptr;
304 } 304 }
305 return new GrConfigConversionEffect(texture, swapRedAndBlue, pmConversio n, matrix); 305 return new GrConfigConversionEffect(texture, swapRedAndBlue, pmConversio n, matrix);
306 } 306 }
307 } 307 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.h ('k') | src/gpu/effects/GrConstColorProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698