diff options
author | Robert Phillips <robertphillips@google.com> | 2018-03-23 11:44:25 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-23 11:44:31 +0000 |
commit | a98183a820bc859600541cb12fb575cde5850dff (patch) | |
tree | 29617bd7ace95a9cdab4d7f58d212391fd8aef6d | |
parent | b2ec726e3776d4f441d11c1c1c5443f32f36f32c (diff) |
Revert "Remove std::move from GrSimpleTextureEffect"
This reverts commit 0a4b13cdea208946a59c612e0743f28533124166.
Reason for revert: incorrect change
Original change's description:
> Remove std::move from GrSimpleTextureEffect
>
> Bug:822680
> Change-Id: I4780ce12a6ce244a2165bfb7b293adb06ae577c5
> Reviewed-on: https://skia-review.googlesource.com/115900
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,ethannicholas@google.com
Change-Id: Ib4123d50b02eeac3f5112bf2702b12fc080f0d1c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 822680
Reviewed-on: https://skia-review.googlesource.com/116140
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
-rw-r--r-- | src/gpu/effects/GrSimpleTextureEffect.fp | 22 | ||||
-rw-r--r-- | src/gpu/effects/GrSimpleTextureEffect.h | 2 | ||||
-rw-r--r-- | src/sksl/SkSLHCodeGenerator.cpp | 2 |
3 files changed, 10 insertions, 16 deletions
diff --git a/src/gpu/effects/GrSimpleTextureEffect.fp b/src/gpu/effects/GrSimpleTextureEffect.fp index 9312ddf048..18ce3a9387 100644 --- a/src/gpu/effects/GrSimpleTextureEffect.fp +++ b/src/gpu/effects/GrSimpleTextureEffect.fp @@ -8,6 +8,10 @@ in uniform sampler2D image; in half4x4 matrix; +@constructorParams { + GrSamplerState samplerParams +} + @coordTransform(image) { matrix } @@ -41,20 +45,10 @@ in half4x4 matrix; } } -@constructor { - GrSimpleTextureEffect(sk_sp<GrTextureProxy> image, SkMatrix44 matrix, - GrSamplerState samplerParams) - : INHERITED(kGrSimpleTextureEffect_ClassID, - (OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag | - (GrPixelConfigIsOpaque(image->config()) - ? kPreservesOpaqueInput_OptimizationFlag - : kNone_OptimizationFlags)) - , fImage(image, samplerParams) // std::move(image) removed for crbug.com/822680 - , fMatrix(matrix) - , fImageCoordTransform(matrix, fImage.proxy()) { - this->addTextureSampler(&fImage); - this->addCoordTransform(&fImageCoordTransform); - } +@optimizationFlags { + kCompatibleWithCoverageAsAlpha_OptimizationFlag | + (GrPixelConfigIsOpaque(image->config()) ? kPreservesOpaqueInput_OptimizationFlag : + kNone_OptimizationFlags) } void main() { diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h index b19ea57a20..119f11e305 100644 --- a/src/gpu/effects/GrSimpleTextureEffect.h +++ b/src/gpu/effects/GrSimpleTextureEffect.h @@ -53,7 +53,7 @@ private: (GrPixelConfigIsOpaque(image->config()) ? kPreservesOpaqueInput_OptimizationFlag : kNone_OptimizationFlags)) - , fImage(image, samplerParams) // std::move(image) removed for crbug.com/822680 + , fImage(std::move(image), samplerParams) , fMatrix(matrix) , fImageCoordTransform(matrix, fImage.proxy()) { this->addTextureSampler(&fImage); diff --git a/src/sksl/SkSLHCodeGenerator.cpp b/src/sksl/SkSLHCodeGenerator.cpp index ad97722077..9750aabb87 100644 --- a/src/sksl/SkSLHCodeGenerator.cpp +++ b/src/sksl/SkSLHCodeGenerator.cpp @@ -176,9 +176,9 @@ void HCodeGenerator::writeConstructor() { const char* msg = "may not be present when constructor is overridden"; this->failOnSection(CONSTRUCTOR_CODE_SECTION, msg); this->failOnSection(CONSTRUCTOR_PARAMS_SECTION, msg); + this->failOnSection(COORD_TRANSFORM_SECTION, msg); this->failOnSection(INITIALIZERS_SECTION, msg); this->failOnSection(OPTIMIZATION_FLAGS_SECTION, msg); - return; } this->writef(" %s(", fFullName.c_str()); const char* separator = ""; |