aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-07-25 16:45:15 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-26 20:47:41 +0000
commit480c90afc4382d03fa7cda534a702459ace72953 (patch)
tree1b01ebfc8869726170cec267f2b37500b0c74985 /src
parent1e0968684065b39dfe3ea8b7fac05e37b712ef61 (diff)
moved changes out of autogenerated .cpp file and into source .fp file
Bug: skia: Change-Id: Ia849b8745d10fe252eee04ae9444b98befac6e76 Reviewed-on: https://skia-review.googlesource.com/26700 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/effects/GrCircleBlurFragmentProcessor.cpp4
-rw-r--r--src/effects/GrCircleBlurFragmentProcessor.fp5
-rw-r--r--src/gpu/effects/GrSimpleTextureEffect.cpp10
3 files changed, 10 insertions, 9 deletions
diff --git a/src/effects/GrCircleBlurFragmentProcessor.cpp b/src/effects/GrCircleBlurFragmentProcessor.cpp
index a30bc4be35..2defcf26ca 100644
--- a/src/effects/GrCircleBlurFragmentProcessor.cpp
+++ b/src/effects/GrCircleBlurFragmentProcessor.cpp
@@ -174,8 +174,8 @@ static sk_sp<GrTextureProxy> create_profile_texture(GrResourceProvider* resource
builder[0] = sigmaToCircleRRatioFixed;
builder.finish();
- sk_sp<GrTextureProxy> blurProfile = resourceProvider->findProxyByUniqueKey(
- key, kTopLeft_GrSurfaceOrigin);
+ sk_sp<GrTextureProxy> blurProfile =
+ resourceProvider->findProxyByUniqueKey(key, kTopLeft_GrSurfaceOrigin);
if (!blurProfile) {
static constexpr int kProfileTextureWidth = 512;
GrSurfaceDesc texDesc;
diff --git a/src/effects/GrCircleBlurFragmentProcessor.fp b/src/effects/GrCircleBlurFragmentProcessor.fp
index dec22e6c27..e87f365cd8 100644
--- a/src/effects/GrCircleBlurFragmentProcessor.fp
+++ b/src/effects/GrCircleBlurFragmentProcessor.fp
@@ -223,10 +223,12 @@ uniform vec4 circleData;
builder[0] = sigmaToCircleRRatioFixed;
builder.finish();
- sk_sp<GrTextureProxy> blurProfile = resourceProvider->findProxyByUniqueKey(key);
+ sk_sp<GrTextureProxy> blurProfile =
+ resourceProvider->findProxyByUniqueKey(key, kTopLeft_GrSurfaceOrigin);
if (!blurProfile) {
static constexpr int kProfileTextureWidth = 512;
GrSurfaceDesc texDesc;
+ texDesc.fOrigin = kTopLeft_GrSurfaceOrigin;
texDesc.fWidth = kProfileTextureWidth;
texDesc.fHeight = 1;
texDesc.fConfig = kAlpha_8_GrPixelConfig;
@@ -247,6 +249,7 @@ uniform vec4 circleData;
return nullptr;
}
+ SkASSERT(blurProfile->origin() == kTopLeft_GrSurfaceOrigin);
resourceProvider->assignUniqueKeyToProxy(key, blurProfile.get());
}
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index 760af5946f..a7ef7801d9 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -76,17 +76,15 @@ sk_sp<GrFragmentProcessor> GrSimpleTextureEffect::TestCreate(GrProcessorTestData
int texIdx = testData->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx
: GrProcessorUnitTest::kAlphaTextureIdx;
static const SkShader::TileMode kTileModes[] = {
- SkShader::kClamp_TileMode,
- SkShader::kRepeat_TileMode,
- SkShader::kMirror_TileMode,
+ SkShader::kClamp_TileMode, SkShader::kRepeat_TileMode, SkShader::kMirror_TileMode,
};
SkShader::TileMode tileModes[] = {
kTileModes[testData->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
kTileModes[testData->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
};
- GrSamplerParams params(tileModes, testData->fRandom->nextBool()
- ? GrSamplerParams::kBilerp_FilterMode
- : GrSamplerParams::kNone_FilterMode);
+ GrSamplerParams params(tileModes,
+ testData->fRandom->nextBool() ? GrSamplerParams::kBilerp_FilterMode
+ : GrSamplerParams::kNone_FilterMode);
const SkMatrix& matrix = GrTest::TestMatrix(testData->fRandom);
sk_sp<GrColorSpaceXform> colorSpaceXform = GrTest::TestColorXform(testData->fRandom);