diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp index 9d8e793c13..030a926845 100644 --- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp +++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp @@ -214,7 +214,7 @@ bool GrMatrixConvolutionEffect::onIsEqual(const GrFragmentProcessor& sBase) cons fKernelSize.width() * fKernelSize.height() * sizeof(float)) && fGain == s.gain() && fBias == s.bias() && - fKernelOffset == s.kernelOffset() && + !memcmp(fKernelOffset, s.kernelOffset(), sizeof(fKernelOffset)) && fConvolveAlpha == s.convolveAlpha() && fDomain == s.domain(); } diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp index e2625a7e31..8354225ce7 100644 --- a/tests/ProcessorTest.cpp +++ b/tests/ProcessorTest.cpp @@ -554,6 +554,15 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorCloneTest, reporter, ctxInfo) { !clone->instantiate(context->resourceProvider())) { continue; } + REPORTER_ASSERT(reporter, !strcmp(fp->name(), clone->name())); + REPORTER_ASSERT(reporter, fp->compatibleWithCoverageAsAlpha() == + clone->compatibleWithCoverageAsAlpha()); + REPORTER_ASSERT(reporter, fp->isEqual(*clone)); + REPORTER_ASSERT(reporter, fp->preservesOpaqueInput() == clone->preservesOpaqueInput()); + REPORTER_ASSERT(reporter, fp->hasConstantOutputForConstantInput() == + clone->hasConstantOutputForConstantInput()); + REPORTER_ASSERT(reporter, fp->numChildProcessors() == clone->numChildProcessors()); + REPORTER_ASSERT(reporter, fp->usesLocalCoords() == clone->usesLocalCoords()); // Draw with original and read back the results. test_draw_op(rtc.get(), fp, inputTexture); memset(readData1.get(), 0x0, sizeof(GrColor) * kRenderSize * kRenderSize);