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

Issue 16818013: Enabling Perlin Noise on Android (Closed)

Created:
7 years, 6 months ago by sugoi1
Modified:
7 years, 6 months ago
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

*** Perlin noise GM needs to be rebaselined *** Enabling Perlin Noise on Android I enabled the Perlin Noise shader on Android after doing some minor modifications to the shader, specifically for Android (and #ifdefed for Android, to make sure none of this affects other platforms). For Tegra devices (Nexus 7, Xoom), a precision issue related to the color values read from textures caused the noise to read the wrong indices and produce bad noise. I fixed this by adding a founding of the values read by simply doing the equivalent of "colorValue = floor(colorValue * 255.0) / 255.0" to make sure we retrieve the colors that were written in the texture originally. For non-Tegra devices (Nexus 10), dealing with values in the order of 4096.0 was problematic without using the "highp" precision setting. To solve this, a few variables were given the high precision setting. Since both fixes don't seem to do considerable harm to the platforms that are not being targetted, I left both fixes on all android devices for now. I also reduced the Perlin noise gm so that it takes less time to test it on the Xoom (Original time was about 20 seconds, this shold take less than 10, hopefully) BUG= Committed: http://code.google.com/p/skia/source/detail?r=9637

Patch Set 1 #

Total comments: 7

Patch Set 2 : Unconditionnally setting the precision #

Patch Set 3 : Added comment about rounding for Tegra #

Patch Set 4 : Update #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -66 lines) Patch
M gm/perlinnoise.cpp View 2 chunks +1 line, -25 lines 0 comments Download
M src/effects/SkPerlinNoiseShader.cpp View 1 2 10 chunks +35 lines, -20 lines 0 comments Download
M src/gpu/gl/GrGLShaderVar.h View 3 chunks +22 lines, -21 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
sugoi
https://codereview.chromium.org/16818013/diff/1/src/effects/SkPerlinNoiseShader.cpp File src/effects/SkPerlinNoiseShader.cpp (right): https://codereview.chromium.org/16818013/diff/1/src/effects/SkPerlinNoiseShader.cpp#newcode1079 src/effects/SkPerlinNoiseShader.cpp:1079: noiseCode.appendf("\n\t%s = floor(%s * vec2(255.0) + vec2(0.5)) * vec2(0.003921569);", ...
7 years, 6 months ago (2013-06-13 15:34:15 UTC) #1
Stephen White
Shader LGTM with comment fix; will leave for Brian for the GrGLShaderVar change. https://codereview.chromium.org/16818013/diff/1/src/effects/SkPerlinNoiseShader.cpp File ...
7 years, 6 months ago (2013-06-13 16:05:15 UTC) #2
bsalomon
https://codereview.chromium.org/16818013/diff/1/src/effects/SkPerlinNoiseShader.cpp File src/effects/SkPerlinNoiseShader.cpp (right): https://codereview.chromium.org/16818013/diff/1/src/effects/SkPerlinNoiseShader.cpp#newcode1012 src/effects/SkPerlinNoiseShader.cpp:1012: #if defined(SK_BUILD_FOR_ANDROID) Do we really need this to be ...
7 years, 6 months ago (2013-06-13 16:11:30 UTC) #3
sugoi
https://codereview.chromium.org/16818013/diff/1/src/effects/SkPerlinNoiseShader.cpp File src/effects/SkPerlinNoiseShader.cpp (right): https://codereview.chromium.org/16818013/diff/1/src/effects/SkPerlinNoiseShader.cpp#newcode1012 src/effects/SkPerlinNoiseShader.cpp:1012: #if defined(SK_BUILD_FOR_ANDROID) On 2013/06/13 16:11:31, bsalomon wrote: > Do ...
7 years, 6 months ago (2013-06-13 16:57:13 UTC) #4
bsalomon
On 2013/06/13 16:57:13, sugoi wrote: > https://codereview.chromium.org/16818013/diff/1/src/effects/SkPerlinNoiseShader.cpp > File src/effects/SkPerlinNoiseShader.cpp (right): > > https://codereview.chromium.org/16818013/diff/1/src/effects/SkPerlinNoiseShader.cpp#newcode1012 > ...
7 years, 6 months ago (2013-06-13 17:46:13 UTC) #5
sugoi
https://codereview.chromium.org/16818013/diff/1/src/effects/SkPerlinNoiseShader.cpp File src/effects/SkPerlinNoiseShader.cpp (right): https://codereview.chromium.org/16818013/diff/1/src/effects/SkPerlinNoiseShader.cpp#newcode1012 src/effects/SkPerlinNoiseShader.cpp:1012: #if defined(SK_BUILD_FOR_ANDROID) On 2013/06/13 16:57:13, sugoi wrote: > On ...
7 years, 6 months ago (2013-06-13 18:04:42 UTC) #6
bsalomon
On 2013/06/13 18:04:42, sugoi wrote: > https://codereview.chromium.org/16818013/diff/1/src/effects/SkPerlinNoiseShader.cpp > File src/effects/SkPerlinNoiseShader.cpp (right): > > https://codereview.chromium.org/16818013/diff/1/src/effects/SkPerlinNoiseShader.cpp#newcode1012 > ...
7 years, 6 months ago (2013-06-13 19:21:19 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/sugoi@chromium.org/16818013/19001
7 years, 6 months ago (2013-06-17 14:09:34 UTC) #8
commit-bot: I haz the power
7 years, 6 months ago (2013-06-17 14:19:03 UTC) #9
Message was sent while issue was closed.
Change committed as 9637

Powered by Google App Engine
This is Rietveld 408576698