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

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

Issue 12965018: Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | Annotate | Revision Log
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 "GrTBackendEffectFactory.h" 10 #include "GrTBackendEffectFactory.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 uint32_t* validFlags) const { 128 uint32_t* validFlags) const {
129 this->updateConstantColorComponentsForModulation(color, validFlags); 129 this->updateConstantColorComponentsForModulation(color, validFlags);
130 } 130 }
131 131
132 /////////////////////////////////////////////////////////////////////////////// 132 ///////////////////////////////////////////////////////////////////////////////
133 133
134 GR_DEFINE_EFFECT_TEST(GrConfigConversionEffect); 134 GR_DEFINE_EFFECT_TEST(GrConfigConversionEffect);
135 135
136 GrEffectRef* GrConfigConversionEffect::TestCreate(SkMWCRandom* random, 136 GrEffectRef* GrConfigConversionEffect::TestCreate(SkMWCRandom* random,
137 GrContext*, 137 GrContext*,
138 const GrDrawTargetCaps&,
138 GrTexture* textures[]) { 139 GrTexture* textures[]) {
139 PMConversion pmConv = static_cast<PMConversion>(random->nextULessThan(kPMCon versionCnt)); 140 PMConversion pmConv = static_cast<PMConversion>(random->nextULessThan(kPMCon versionCnt));
140 bool swapRB; 141 bool swapRB;
141 if (kNone_PMConversion == pmConv) { 142 if (kNone_PMConversion == pmConv) {
142 swapRB = true; 143 swapRB = true;
143 } else { 144 } else {
144 swapRB = random->nextBool(); 145 swapRB = random->nextBool();
145 } 146 }
146 AutoEffectUnref effect(SkNEW_ARGS(GrConfigConversionEffect, 147 AutoEffectUnref effect(SkNEW_ARGS(GrConfigConversionEffect,
147 (textures[GrEffectUnitTest::kSkiaPMTexture Idx], 148 (textures[GrEffectUnitTest::kSkiaPMTexture Idx],
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 // The PM conversions assume colors are 0..255 280 // The PM conversions assume colors are 0..255
280 return NULL; 281 return NULL;
281 } 282 }
282 AutoEffectUnref effect(SkNEW_ARGS(GrConfigConversionEffect, (texture, 283 AutoEffectUnref effect(SkNEW_ARGS(GrConfigConversionEffect, (texture,
283 swapRedAndB lue, 284 swapRedAndB lue,
284 pmConversio n, 285 pmConversio n,
285 matrix))); 286 matrix)));
286 return CreateEffectRef(effect); 287 return CreateEffectRef(effect);
287 } 288 }
288 } 289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698