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

Side by Side Diff: src/effects/SkMorphologyImageFilter.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/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkPerlinNoiseShader.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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 void GrMorphologyEffect::onComputeInvariantOutput(GrInvariantOutput* inout) cons t { 438 void GrMorphologyEffect::onComputeInvariantOutput(GrInvariantOutput* inout) cons t {
439 // This is valid because the color components of the result of the kernel al l come 439 // This is valid because the color components of the result of the kernel al l come
440 // exactly from existing values in the source texture. 440 // exactly from existing values in the source texture.
441 this->updateInvariantOutputForModulation(inout); 441 this->updateInvariantOutputForModulation(inout);
442 } 442 }
443 443
444 /////////////////////////////////////////////////////////////////////////////// 444 ///////////////////////////////////////////////////////////////////////////////
445 445
446 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMorphologyEffect); 446 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMorphologyEffect);
447 447
448 GrFragmentProcessor* GrMorphologyEffect::TestCreate(GrProcessorTestData* d) { 448 const GrFragmentProcessor* GrMorphologyEffect::TestCreate(GrProcessorTestData* d ) {
449 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : 449 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx :
450 GrProcessorUnitTest::kAlphaTextureIdx; 450 GrProcessorUnitTest::kAlphaTextureIdx;
451 Direction dir = d->fRandom->nextBool() ? kX_Direction : kY_Direction; 451 Direction dir = d->fRandom->nextBool() ? kX_Direction : kY_Direction;
452 static const int kMaxRadius = 10; 452 static const int kMaxRadius = 10;
453 int radius = d->fRandom->nextRangeU(1, kMaxRadius); 453 int radius = d->fRandom->nextRangeU(1, kMaxRadius);
454 MorphologyType type = d->fRandom->nextBool() ? GrMorphologyEffect::kErode_Mo rphologyType : 454 MorphologyType type = d->fRandom->nextBool() ? GrMorphologyEffect::kErode_Mo rphologyType :
455 GrMorphologyEffect::kDilate_Morph ologyType; 455 GrMorphologyEffect::kDilate_Morph ologyType;
456 456
457 return GrMorphologyEffect::Create(d->fProcDataManager, d->fTextures[texIdx], dir, radius, type); 457 return GrMorphologyEffect::Create(d->fProcDataManager, d->fTextures[texIdx], dir, radius, type);
458 } 458 }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 SkBitmap* result, SkIPoint* offset) con st { 662 SkBitmap* result, SkIPoint* offset) con st {
663 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); 663 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset);
664 } 664 }
665 665
666 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx, 666 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx,
667 SkBitmap* result, SkIPoint* offset) cons t { 667 SkBitmap* result, SkIPoint* offset) cons t {
668 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); 668 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset);
669 } 669 }
670 670
671 #endif 671 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698