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

Side by Side Diff: src/effects/SkTableColorFilter.cpp

Issue 23576015: Change old PRG to be SkLCGRandom; change new one to SkRandom (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix some spurious SkMWCRandoms Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | src/effects/gradients/SkGradientShader.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 #include "SkBitmap.h" 2 #include "SkBitmap.h"
3 #include "SkTableColorFilter.h" 3 #include "SkTableColorFilter.h"
4 #include "SkColorPriv.h" 4 #include "SkColorPriv.h"
5 #include "SkFlattenableBuffers.h" 5 #include "SkFlattenableBuffers.h"
6 #include "SkUnPreMultiply.h" 6 #include "SkUnPreMultiply.h"
7 #include "SkString.h" 7 #include "SkString.h"
8 8
9 class SkTable_ColorFilter : public SkColorFilter { 9 class SkTable_ColorFilter : public SkColorFilter {
10 public: 10 public:
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 if (fFlags & SkTable_ColorFilter::kA_Flag) { 368 if (fFlags & SkTable_ColorFilter::kA_Flag) {
369 *validFlags &= ~kA_GrColorComponentFlag; 369 *validFlags &= ~kA_GrColorComponentFlag;
370 } 370 }
371 } 371 }
372 372
373 373
374 /////////////////////////////////////////////////////////////////////////////// 374 ///////////////////////////////////////////////////////////////////////////////
375 375
376 GR_DEFINE_EFFECT_TEST(ColorTableEffect); 376 GR_DEFINE_EFFECT_TEST(ColorTableEffect);
377 377
378 GrEffectRef* ColorTableEffect::TestCreate(SkMWCRandom* random, 378 GrEffectRef* ColorTableEffect::TestCreate(SkRandom* random,
379 GrContext* context, 379 GrContext* context,
380 const GrDrawTargetCaps&, 380 const GrDrawTargetCaps&,
381 GrTexture* textures[]) { 381 GrTexture* textures[]) {
382 static unsigned kAllFlags = SkTable_ColorFilter::kR_Flag | SkTable_ColorFilt er::kG_Flag | 382 static unsigned kAllFlags = SkTable_ColorFilter::kR_Flag | SkTable_ColorFilt er::kG_Flag |
383 SkTable_ColorFilter::kB_Flag | SkTable_ColorFilt er::kA_Flag; 383 SkTable_ColorFilter::kB_Flag | SkTable_ColorFilt er::kA_Flag;
384 return ColorTableEffect::Create(textures[GrEffectUnitTest::kAlphaTextureIdx] , kAllFlags); 384 return ColorTableEffect::Create(textures[GrEffectUnitTest::kAlphaTextureIdx] , kAllFlags);
385 } 385 }
386 386
387 GrEffectRef* SkTable_ColorFilter::asNewEffect(GrContext* context) const { 387 GrEffectRef* SkTable_ColorFilter::asNewEffect(GrContext* context) const {
388 SkBitmap bitmap; 388 SkBitmap bitmap;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 SkColorFilter* SkTableColorFilter::CreateARGB(const uint8_t tableA[256], 422 SkColorFilter* SkTableColorFilter::CreateARGB(const uint8_t tableA[256],
423 const uint8_t tableR[256], 423 const uint8_t tableR[256],
424 const uint8_t tableG[256], 424 const uint8_t tableG[256],
425 const uint8_t tableB[256]) { 425 const uint8_t tableB[256]) {
426 return SkNEW_ARGS(SkTable_ColorFilter, (tableA, tableR, tableG, tableB)); 426 return SkNEW_ARGS(SkTable_ColorFilter, (tableA, tableR, tableG, tableB));
427 } 427 }
428 428
429 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkTableColorFilter) 429 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkTableColorFilter)
430 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTable_ColorFilter) 430 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTable_ColorFilter)
431 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 431 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698