OLD | NEW |
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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 return (this->texture(0) == s.texture(0) && | 453 return (this->texture(0) == s.texture(0) && |
454 this->radius() == s.radius() && | 454 this->radius() == s.radius() && |
455 this->direction() == s.direction() && | 455 this->direction() == s.direction() && |
456 this->type() == s.type()); | 456 this->type() == s.type()); |
457 } | 457 } |
458 | 458 |
459 void GrMorphologyEffect::onComputeInvariantOutput(InvariantOutput* inout) const
{ | 459 void GrMorphologyEffect::onComputeInvariantOutput(InvariantOutput* inout) const
{ |
460 // This is valid because the color components of the result of the kernel al
l come | 460 // This is valid because the color components of the result of the kernel al
l come |
461 // exactly from existing values in the source texture. | 461 // exactly from existing values in the source texture. |
462 this->updateInvariantOutputForModulation(inout); | 462 this->updateInvariantOutputForModulation(inout); |
463 inout->fIsSingleComponent = false; | |
464 } | 463 } |
465 | 464 |
466 /////////////////////////////////////////////////////////////////////////////// | 465 /////////////////////////////////////////////////////////////////////////////// |
467 | 466 |
468 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMorphologyEffect); | 467 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMorphologyEffect); |
469 | 468 |
470 GrFragmentProcessor* GrMorphologyEffect::TestCreate(SkRandom* random, | 469 GrFragmentProcessor* GrMorphologyEffect::TestCreate(SkRandom* random, |
471 GrContext*, | 470 GrContext*, |
472 const GrDrawTargetCaps&, | 471 const GrDrawTargetCaps&, |
473 GrTexture* textures[]) { | 472 GrTexture* textures[]) { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 SkBitmap* result, SkIPoint* offset) con
st { | 603 SkBitmap* result, SkIPoint* offset) con
st { |
605 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); | 604 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); |
606 } | 605 } |
607 | 606 |
608 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const
Context& ctx, | 607 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const
Context& ctx, |
609 SkBitmap* result, SkIPoint* offset) cons
t { | 608 SkBitmap* result, SkIPoint* offset) cons
t { |
610 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); | 609 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); |
611 } | 610 } |
612 | 611 |
613 #endif | 612 #endif |
OLD | NEW |