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

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

Issue 1316513002: Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: Address comments, fix roll(?) Created 5 years, 3 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/GrBitmapTextGeoProc.cpp ('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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 void GrConfigConversionEffect::onComputeInvariantOutput(GrInvariantOutput* inout ) const { 123 void GrConfigConversionEffect::onComputeInvariantOutput(GrInvariantOutput* inout ) const {
124 this->updateInvariantOutputForModulation(inout); 124 this->updateInvariantOutputForModulation(inout);
125 } 125 }
126 126
127 /////////////////////////////////////////////////////////////////////////////// 127 ///////////////////////////////////////////////////////////////////////////////
128 128
129 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConfigConversionEffect); 129 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConfigConversionEffect);
130 130
131 GrFragmentProcessor* GrConfigConversionEffect::TestCreate(GrProcessorTestData* d ) { 131 const GrFragmentProcessor* GrConfigConversionEffect::TestCreate(GrProcessorTestD ata* d) {
132 PMConversion pmConv = static_cast<PMConversion>(d->fRandom->nextULessThan(kP MConversionCnt)); 132 PMConversion pmConv = static_cast<PMConversion>(d->fRandom->nextULessThan(kP MConversionCnt));
133 bool swapRB; 133 bool swapRB;
134 if (kNone_PMConversion == pmConv) { 134 if (kNone_PMConversion == pmConv) {
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->fProcDataManager, 139 return new GrConfigConversionEffect(d->fProcDataManager,
140 d->fTextures[GrProcessorUnitTest::kSkiaP MTextureIdx], 140 d->fTextures[GrProcessorUnitTest::kSkiaP MTextureIdx],
141 swapRB, pmConv, GrTest::TestMatrix(d->fR andom)); 141 swapRB, pmConv, GrTest::TestMatrix(d->fR andom));
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 if (kRGBA_8888_GrPixelConfig != texture->config() && 302 if (kRGBA_8888_GrPixelConfig != texture->config() &&
303 kBGRA_8888_GrPixelConfig != texture->config() && 303 kBGRA_8888_GrPixelConfig != texture->config() &&
304 kNone_PMConversion != pmConversion) { 304 kNone_PMConversion != pmConversion) {
305 // The PM conversions assume colors are 0..255 305 // The PM conversions assume colors are 0..255
306 return nullptr; 306 return nullptr;
307 } 307 }
308 return new GrConfigConversionEffect(procDataManager, texture, swapRedAnd Blue, pmConversion, 308 return new GrConfigConversionEffect(procDataManager, texture, swapRedAnd Blue, pmConversion,
309 matrix); 309 matrix);
310 } 310 }
311 } 311 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBitmapTextGeoProc.cpp ('k') | src/gpu/effects/GrConstColorProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698