diff options
author | Brian Salomon <bsalomon@google.com> | 2018-03-03 22:43:43 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-05 18:50:25 +0000 |
commit | 2a4f983c94e4f749fe24b08bc8b5ae7cc8550d1d (patch) | |
tree | e89d794eeffacf09124be0cee8bfc70001be2856 /src/effects | |
parent | 1a8d762a18d6f6494408a3a5e06a80097f8b85f7 (diff) |
Remove GrSurfaceOrigin from GrSurfaceDesc.
This field has no interpretation at the GrTexture/GrGpu as the orientation is
handled at the GrSurfaceProxy level.
This change requires GrGpu to accept a GrSurfaceOrigin when creating a texture with initial data. The origin refers to the texel data to be uploaded. Longer term the plan is to remove this and require the data to be kTopLeft. Additionally, kBottomLeft will only be allowed for wrapped texture/RTs as this evolves.
Change-Id: I7d25b0199aafd9bf3b74c39b2cae451acadcd772
Reviewed-on: https://skia-review.googlesource.com/111806
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/GrCircleBlurFragmentProcessor.cpp | 5 | ||||
-rw-r--r-- | src/effects/GrCircleBlurFragmentProcessor.fp | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/effects/GrCircleBlurFragmentProcessor.cpp b/src/effects/GrCircleBlurFragmentProcessor.cpp index 31311e2e1c..c7745402db 100644 --- a/src/effects/GrCircleBlurFragmentProcessor.cpp +++ b/src/effects/GrCircleBlurFragmentProcessor.cpp @@ -212,7 +212,6 @@ static sk_sp<GrTextureProxy> create_profile_texture(GrProxyProvider* proxyProvid if (!blurProfile) { static constexpr int kProfileTextureWidth = 512; GrSurfaceDesc texDesc; - texDesc.fOrigin = kTopLeft_GrSurfaceOrigin; texDesc.fWidth = kProfileTextureWidth; texDesc.fHeight = 1; texDesc.fConfig = kAlpha_8_GrPixelConfig; @@ -227,8 +226,8 @@ static sk_sp<GrTextureProxy> create_profile_texture(GrProxyProvider* proxyProvid create_circle_profile(sigma * scale, circleR * scale, kProfileTextureWidth)); } - blurProfile = - proxyProvider->createTextureProxy(texDesc, SkBudgeted::kYes, profile.get(), 0); + blurProfile = proxyProvider->createTextureProxy(texDesc, kTopLeft_GrSurfaceOrigin, + SkBudgeted::kYes, profile.get(), 0); if (!blurProfile) { return nullptr; } diff --git a/src/effects/GrCircleBlurFragmentProcessor.fp b/src/effects/GrCircleBlurFragmentProcessor.fp index 21c80079e5..2294e0f3ad 100644 --- a/src/effects/GrCircleBlurFragmentProcessor.fp +++ b/src/effects/GrCircleBlurFragmentProcessor.fp @@ -234,7 +234,6 @@ uniform half4 circleData; if (!blurProfile) { static constexpr int kProfileTextureWidth = 512; GrSurfaceDesc texDesc; - texDesc.fOrigin = kTopLeft_GrSurfaceOrigin; texDesc.fWidth = kProfileTextureWidth; texDesc.fHeight = 1; texDesc.fConfig = kAlpha_8_GrPixelConfig; @@ -249,8 +248,8 @@ uniform half4 circleData; kProfileTextureWidth)); } - blurProfile = proxyProvider->createTextureProxy(texDesc, SkBudgeted::kYes, - profile.get(), 0); + blurProfile = proxyProvider->createTextureProxy( + texDesc, kTopLeft_GrSurfaceOrigin, SkBudgeted::kYes, profile.get(), 0); if (!blurProfile) { return nullptr; } |