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

Unified Diff: src/effects/SkColorMatrixFilter.cpp

Issue 699943003: Move GrInvariantOutput out of GrProcessor and into its own class. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Cleanup Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkColorFilters.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorMatrixFilter.cpp
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp
index 844a37638cb39626a3c6174e03a77f2a9d5ec0eb..f8b9101ae1ff32328ea470b768d9c4e400fe5bec 100644
--- a/src/effects/SkColorMatrixFilter.cpp
+++ b/src/effects/SkColorMatrixFilter.cpp
@@ -333,6 +333,7 @@ bool SkColorMatrixFilter::asColorMatrix(SkScalar matrix[20]) const {
#if SK_SUPPORT_GPU
#include "GrFragmentProcessor.h"
+#include "GrInvariantOutput.h"
#include "GrTBackendProcessorFactory.h"
#include "gl/GrGLProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
@@ -426,7 +427,7 @@ private:
return cme.fMatrix == fMatrix;
}
- virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE {
+ virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE {
// We only bother to check whether the alpha channel will be constant. If SkColorMatrix had
// type flags it might be worth checking the other components.
@@ -453,7 +454,7 @@ private:
// then we can't know the final result.
if (0 != fMatrix.fMat[kAlphaRowStartIdx + i]) {
if (!(inout->validFlags() & kRGBAFlags[i])) {
- inout->setToUnknown(InvariantOutput::kWill_ReadInput);
+ inout->setToUnknown(GrInvariantOutput::kWill_ReadInput);
return;
} else {
uint32_t component = (inout->color() >> kShifts[i]) & 0xFF;
@@ -468,7 +469,7 @@ private:
// result if the matrix could over/underflow for any component?
inout->setToOther(kA_GrColorComponentFlag,
static_cast<uint8_t>(SkScalarPin(outputA, 0, 255)) << GrColor_SHIFT_A,
- InvariantOutput::kWill_ReadInput);
+ GrInvariantOutput::kWill_ReadInput);
}
SkColorMatrix fMatrix;
« no previous file with comments | « src/effects/SkColorFilters.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698