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

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

Issue 654313002: Auto-compare GrProcessors' texture accesses in isEqual(). (Closed) Base URL: https://skia.googlesource.com/skia.git@xformcomp
Patch Set: update Created 6 years, 2 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 GrMorphologyEffect::~GrMorphologyEffect() { 444 GrMorphologyEffect::~GrMorphologyEffect() {
445 } 445 }
446 446
447 const GrBackendFragmentProcessorFactory& GrMorphologyEffect::getFactory() const { 447 const GrBackendFragmentProcessorFactory& GrMorphologyEffect::getFactory() const {
448 return GrTBackendFragmentProcessorFactory<GrMorphologyEffect>::getInstance() ; 448 return GrTBackendFragmentProcessorFactory<GrMorphologyEffect>::getInstance() ;
449 } 449 }
450 450
451 bool GrMorphologyEffect::onIsEqual(const GrFragmentProcessor& sBase) const { 451 bool GrMorphologyEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
452 const GrMorphologyEffect& s = sBase.cast<GrMorphologyEffect>(); 452 const GrMorphologyEffect& s = sBase.cast<GrMorphologyEffect>();
453 return (this->texture(0) == s.texture(0) && 453 return (this->radius() == s.radius() &&
454 this->radius() == s.radius() &&
455 this->direction() == s.direction() && 454 this->direction() == s.direction() &&
456 this->type() == s.type()); 455 this->type() == s.type());
457 } 456 }
458 457
459 void GrMorphologyEffect::onComputeInvariantOutput(InvariantOutput* inout) const { 458 void GrMorphologyEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
460 // This is valid because the color components of the result of the kernel al l come 459 // 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. 460 // exactly from existing values in the source texture.
462 this->updateInvariantOutputForModulation(inout); 461 this->updateInvariantOutputForModulation(inout);
463 } 462 }
464 463
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 SkBitmap* result, SkIPoint* offset) con st { 600 SkBitmap* result, SkIPoint* offset) con st {
602 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); 601 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset);
603 } 602 }
604 603
605 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx, 604 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx,
606 SkBitmap* result, SkIPoint* offset) cons t { 605 SkBitmap* result, SkIPoint* offset) cons t {
607 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); 606 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset);
608 } 607 }
609 608
610 #endif 609 #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