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

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

Issue 1117443002: create GrTestUtils.h, move some common functions into it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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/GrDashingEffect.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 "GrInvariantOutput.h" 10 #include "GrInvariantOutput.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 bool swapRB; 135 bool swapRB;
136 if (kNone_PMConversion == pmConv) { 136 if (kNone_PMConversion == pmConv) {
137 swapRB = true; 137 swapRB = true;
138 } else { 138 } else {
139 swapRB = random->nextBool(); 139 swapRB = random->nextBool();
140 } 140 }
141 return SkNEW_ARGS(GrConfigConversionEffect, 141 return SkNEW_ARGS(GrConfigConversionEffect,
142 (textures[GrProcessorUnitTest::kSkiaPMText ureIdx], 142 (textures[GrProcessorUnitTest::kSkiaPMText ureIdx],
143 swapRB, 143 swapRB,
144 pmConv, 144 pmConv,
145 GrProcessorUnitTest::TestMatrix(random))) ; 145 GrTest::TestMatrix(random)));
146 } 146 }
147 147
148 /////////////////////////////////////////////////////////////////////////////// 148 ///////////////////////////////////////////////////////////////////////////////
149 149
150 void GrConfigConversionEffect::getGLProcessorKey(const GrGLCaps& caps, 150 void GrConfigConversionEffect::getGLProcessorKey(const GrGLCaps& caps,
151 GrProcessorKeyBuilder* b) const { 151 GrProcessorKeyBuilder* b) const {
152 GrGLConfigConversionEffect::GenKey(*this, caps, b); 152 GrGLConfigConversionEffect::GenKey(*this, caps, b);
153 } 153 }
154 154
155 GrGLFragmentProcessor* GrConfigConversionEffect::createGLInstance() const { 155 GrGLFragmentProcessor* GrConfigConversionEffect::createGLInstance() const {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 kNone_PMConversion != pmConversion) { 289 kNone_PMConversion != pmConversion) {
290 // The PM conversions assume colors are 0..255 290 // The PM conversions assume colors are 0..255
291 return NULL; 291 return NULL;
292 } 292 }
293 return SkNEW_ARGS(GrConfigConversionEffect, (texture, 293 return SkNEW_ARGS(GrConfigConversionEffect, (texture,
294 swapRedAndBlue, 294 swapRedAndBlue,
295 pmConversion, 295 pmConversion,
296 matrix)); 296 matrix));
297 } 297 }
298 } 298 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBitmapTextGeoProc.cpp ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698