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

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

Issue 12469002: Removed unused parameters (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
« no previous file with comments | « src/effects/SkBlurDrawLooper.cpp ('k') | src/effects/SkTestImageFilters.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 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 "SkMorphologyImageFilter.h" 8 #include "SkMorphologyImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // This is valid because the color components of the result of the kernel al l come 413 // This is valid because the color components of the result of the kernel al l come
414 // exactly from existing values in the source texture. 414 // exactly from existing values in the source texture.
415 this->updateConstantColorComponentsForModulation(color, validFlags); 415 this->updateConstantColorComponentsForModulation(color, validFlags);
416 } 416 }
417 417
418 /////////////////////////////////////////////////////////////////////////////// 418 ///////////////////////////////////////////////////////////////////////////////
419 419
420 GR_DEFINE_EFFECT_TEST(GrMorphologyEffect); 420 GR_DEFINE_EFFECT_TEST(GrMorphologyEffect);
421 421
422 GrEffectRef* GrMorphologyEffect::TestCreate(SkMWCRandom* random, 422 GrEffectRef* GrMorphologyEffect::TestCreate(SkMWCRandom* random,
423 GrContext* context, 423 GrContext*,
424 GrTexture* textures[]) { 424 GrTexture* textures[]) {
425 int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx : 425 int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
426 GrEffectUnitTest::kAlphaTextureIdx; 426 GrEffectUnitTest::kAlphaTextureIdx;
427 Direction dir = random->nextBool() ? kX_Direction : kY_Direction; 427 Direction dir = random->nextBool() ? kX_Direction : kY_Direction;
428 static const int kMaxRadius = 10; 428 static const int kMaxRadius = 10;
429 int radius = random->nextRangeU(1, kMaxRadius); 429 int radius = random->nextRangeU(1, kMaxRadius);
430 MorphologyType type = random->nextBool() ? GrMorphologyEffect::kErode_Morpho logyType : 430 MorphologyType type = random->nextBool() ? GrMorphologyEffect::kErode_Morpho logyType :
431 GrMorphologyEffect::kDilate_Morph ologyType; 431 GrMorphologyEffect::kDilate_Morph ologyType;
432 432
433 return GrMorphologyEffect::Create(textures[texIdx], dir, radius, type); 433 return GrMorphologyEffect::Create(textures[texIdx], dir, radius, type);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 512 }
513 GrTexture* input = (GrTexture*) inputBM.getTexture(); 513 GrTexture* input = (GrTexture*) inputBM.getTexture();
514 SkIRect bounds; 514 SkIRect bounds;
515 src.getBounds(&bounds); 515 src.getBounds(&bounds);
516 SkAutoTUnref<GrTexture> resultTex(apply_morphology(input, bounds, 516 SkAutoTUnref<GrTexture> resultTex(apply_morphology(input, bounds,
517 GrMorphologyEffect::kErode_MorphologyType, radius())); 517 GrMorphologyEffect::kErode_MorphologyType, radius()));
518 return SkImageFilterUtils::WrapTexture(resultTex, src.width(), src.height(), result); 518 return SkImageFilterUtils::WrapTexture(resultTex, src.width(), src.height(), result);
519 } 519 }
520 520
521 #endif 521 #endif
OLDNEW
« no previous file with comments | « src/effects/SkBlurDrawLooper.cpp ('k') | src/effects/SkTestImageFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698