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

Issue 1057443003: Revert of Implement approx-match support in image filter saveLayer() offscreen. (Closed)

Created:
5 years, 8 months ago by rmistry
Modified:
5 years, 8 months ago
CC:
reviews_skia.org, joshualitt, reed1
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Revert of Implement approx-match support in image filter saveLayer() offscreen. (patchset #27 id:510001 of https://codereview.chromium.org/1034733002/) Reason for revert: Looks like this change is causing layout test failures which is blocking Skia's DEPS roll into Chromium: https://codereview.chromium.org/1050563002/ https://codereview.chromium.org/1043133005/ https://codereview.chromium.org/1048273002/ Reverting to see if this fixes the DEPS roll. Original issue's description: > Implement approx-match support in image filter saveLayer() offscreen. > > Currently, the GPU-side image filter implementation creates > exact-match textures for the offscreen backing stores for > saveLayer(). This is because several filters have GPU > implementations which depend on the texture coordinates > being 0..1. > > The fix is three-fold: > > 1) Store the actual requested size in the SkGpuDevice, so > that when wrapping it in an SkBitmap for passing to > filterImage(), we can give it the original size. > 2) Fix the filters (SkMagnifierImageFilter, > SkLightingImageFilter) whose GPU implementation depends on > 0..1 texture coordinates. > 3) Remove the exception for GPU-side image filters in > SkCanvas::internalSaveLayer(). > > For the lighting filters, there were two bugs which were > cancelling each other out: the sobel filter matrix was > being computed upside down, but then we'd negate the > resulting normal. This worked fine in the exact-match case, > but in the approx-match case we'd sample garbage along > the edge pixels. Also, we never implemented the edge pixels > according to spec in the GPU case. It requires a > different fragment shader for each edge of the nine-patch, > which meant we couldn't use asFragmentProcessor(), and had > to implement the drawing via a filterImageGPU() override. > In order to avoid polluting the public API, I inserted a > new base class, SkLightingImageFilterInternal above > Sk[Diffuse|Specular]LightingImageFilter to handle the > implementation. > > N.B.: this change will cause some minor pixel diffs in the > GPU results of the following GMs (and possibly more): > matriximagefilter, matrixconvolution, imagefiltersscaled, > lighting, imagemagnifier, filterfastbounds, > complexclip_aa_Layer_invert, complexclip_aa_layer, > complexclip_bw_layer_invert, complexclip_bw_layer. > > BUG=skia:3532 > > Committed: https://skia.googlesource.com/skia/+/b97dafefe63ea0a1bbce8e8b209f4920983fb8b9 > > Committed: https://skia.googlesource.com/skia/+/f5f8518fe0bbd2703e4ffc1b11ad7b4312ff7641 TBR=bsalomon@google.com,reed@chromium.org,senorblanco@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:3532 Committed: https://skia.googlesource.com/skia/+/7c0273f107d571a2147e4b2ad3f36c917bb12b22

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -483 lines) Patch
M gm/lighting.cpp View 2 chunks +9 lines, -52 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 chunk +8 lines, -0 lines 0 comments Download
M src/effects/SkLightingImageFilter.cpp View 35 chunks +85 lines, -359 lines 0 comments Download
M src/effects/SkMagnifierImageFilter.cpp View 12 chunks +11 lines, -40 lines 0 comments Download
M src/gpu/SkGpuDevice.h View 4 chunks +3 lines, -10 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 11 chunks +12 lines, -22 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
rmistry
Created Revert of Implement approx-match support in image filter saveLayer() offscreen.
5 years, 8 months ago (2015-04-01 11:19:23 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1057443003/1
5 years, 8 months ago (2015-04-01 11:19:36 UTC) #2
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://skia.googlesource.com/skia/+/7c0273f107d571a2147e4b2ad3f36c917bb12b22
5 years, 8 months ago (2015-04-01 11:19:50 UTC) #3
reed2
If this revert is correct, then we should consider adding more gms/tests to try to ...
5 years, 8 months ago (2015-04-01 12:33:07 UTC) #4
rmistry
On 2015/04/01 12:33:07, reed2 wrote: > If this revert is correct, then we should consider ...
5 years, 8 months ago (2015-04-01 12:59:20 UTC) #5
Stephen White
5 years, 8 months ago (2015-04-01 14:22:27 UTC) #6
Message was sent while issue was closed.
Looks like they're minor pixel diffs; I will suppress.

Powered by Google App Engine
This is Rietveld 408576698