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

Issue 169973002: Begin making SkPerlinNoiseShader const. (Closed)

Created:
6 years, 10 months ago by scroggo
Modified:
6 years, 9 months ago
CC:
skia-review_googlegroups.com, mtklein
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Begin making SkPerlinNoiseShader const. The overall goal is to make SkShader itself immutable (BUG=skia:1976 ). The fields cannot yet be made constant, due to the constructor which takes an SkReadBuffer. Other than that constructor, the fields are now unchanged. Remove setTileSize and initPaint. Merge initPaint with the constructor of PaintingData, since it is only ever used on a new PaintingData. Merge setTileSize with the SkPerlinNoiseShader constructor, its only call site. BUG=skia:1976 Committed: http://code.google.com/p/skia/source/detail?r=13682

Patch Set 1 #

Total comments: 5

Patch Set 2 : Remove PaintingData #

Patch Set 3 : Make methods const and simplify const comments. #

Total comments: 10

Patch Set 4 : Flatten the original fSeed value. #

Patch Set 5 : Go back to patch set 1. PaintingData has been restored. #

Patch Set 6 : const methods, no default option on private constructor, mutex #

Patch Set 7 : const methods, no default option on private constructor, mutex #

Patch Set 8 : const methods, no default option on private constructor, mutex #

Total comments: 1

Patch Set 9 : Don't lazily initialize bitmaps. Use setPixels #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -102 lines) Patch
M include/effects/SkPerlinNoiseShader.h View 1 2 3 4 5 1 chunk +17 lines, -17 lines 0 comments Download
M src/effects/SkPerlinNoiseShader.cpp View 1 2 3 4 5 6 7 8 11 chunks +46 lines, -85 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
scroggo
6 years, 10 months ago (2014-02-17 21:51:04 UTC) #1
sugoi
Adding senorblanco@ to the discussion to get his input on this: From what I remember, ...
6 years, 10 months ago (2014-02-18 13:24:48 UTC) #2
Stephen White
https://codereview.chromium.org/169973002/diff/1/src/effects/SkPerlinNoiseShader.cpp File src/effects/SkPerlinNoiseShader.cpp (right): https://codereview.chromium.org/169973002/diff/1/src/effects/SkPerlinNoiseShader.cpp#newcode84 src/effects/SkPerlinNoiseShader.cpp:84: PaintingData(const SkISize& tileSize, SkScalar seed, Not new to this ...
6 years, 10 months ago (2014-02-18 14:58:56 UTC) #3
Dominik Grewe
https://codereview.chromium.org/169973002/diff/1/include/effects/SkPerlinNoiseShader.h File include/effects/SkPerlinNoiseShader.h (right): https://codereview.chromium.org/169973002/diff/1/include/effects/SkPerlinNoiseShader.h#newcode95 include/effects/SkPerlinNoiseShader.h:95: // be made constant. Is it always feasible to ...
6 years, 10 months ago (2014-02-18 15:00:33 UTC) #4
Stephen White
On 2014/02/18 13:24:48, sugoi wrote: > Adding senorblanco@ to the discussion to get his input ...
6 years, 10 months ago (2014-02-18 15:10:24 UTC) #5
sugoi
On 2014/02/18 15:10:24, Stephen White wrote: > If tile size is absolutely dependent on input ...
6 years, 10 months ago (2014-02-18 15:30:50 UTC) #6
scroggo
On 2014/02/18 15:30:50, sugoi wrote: > On 2014/02/18 15:10:24, Stephen White wrote: > > If ...
6 years, 10 months ago (2014-02-18 16:42:57 UTC) #7
scroggo
On 2014/02/18 16:42:57, scroggo wrote: > If we go that route, does this seem like ...
6 years, 10 months ago (2014-02-18 16:44:06 UTC) #8
tomhudson
Ping! We'd like to constify the shaders this quarter. Is there work I can help ...
6 years, 9 months ago (2014-03-03 14:41:57 UTC) #9
scroggo
On 2014/03/03 14:41:57, tomhudson wrote: > Ping! We'd like to constify the shaders this quarter. ...
6 years, 9 months ago (2014-03-04 22:26:33 UTC) #10
Stephen White
https://codereview.chromium.org/169973002/diff/140001/src/effects/SkPerlinNoiseShader.cpp File src/effects/SkPerlinNoiseShader.cpp (right): https://codereview.chromium.org/169973002/diff/140001/src/effects/SkPerlinNoiseShader.cpp#newcode246 src/effects/SkPerlinNoiseShader.cpp:246: fSeed = buffer.readInt(); Hmmm. Isn't this going to require ...
6 years, 9 months ago (2014-03-05 14:32:57 UTC) #11
sugoi
https://codereview.chromium.org/169973002/diff/140001/src/effects/SkPerlinNoiseShader.cpp File src/effects/SkPerlinNoiseShader.cpp (right): https://codereview.chromium.org/169973002/diff/140001/src/effects/SkPerlinNoiseShader.cpp#newcode246 src/effects/SkPerlinNoiseShader.cpp:246: fSeed = buffer.readInt(); On 2014/03/05 14:32:58, Stephen White wrote: ...
6 years, 9 months ago (2014-03-05 16:50:32 UTC) #12
Stephen White
On 2014/03/05 16:50:32, sugoi wrote: > https://codereview.chromium.org/169973002/diff/140001/src/effects/SkPerlinNoiseShader.cpp > File src/effects/SkPerlinNoiseShader.cpp (right): > > https://codereview.chromium.org/169973002/diff/140001/src/effects/SkPerlinNoiseShader.cpp#newcode246 > ...
6 years, 9 months ago (2014-03-05 17:41:46 UTC) #13
reed1
1. We are absolutely on the road to reentrant-safe shaders. 2. This does not strictly ...
6 years, 9 months ago (2014-03-05 18:21:32 UTC) #14
scroggo
https://codereview.chromium.org/169973002/diff/140001/src/effects/SkPerlinNoiseShader.cpp File src/effects/SkPerlinNoiseShader.cpp (right): https://codereview.chromium.org/169973002/diff/140001/src/effects/SkPerlinNoiseShader.cpp#newcode246 src/effects/SkPerlinNoiseShader.cpp:246: fSeed = buffer.readInt(); On 2014/03/05 16:50:33, sugoi wrote: > ...
6 years, 9 months ago (2014-03-05 18:24:05 UTC) #15
sugoi
On 2014/03/05 17:41:46, Stephen White wrote: > On 2014/03/05 16:50:32, sugoi wrote: > > > ...
6 years, 9 months ago (2014-03-05 18:25:54 UTC) #16
sugoi
On 2014/03/05 18:24:05, scroggo wrote: > What do you mean by "later on during processing?" ...
6 years, 9 months ago (2014-03-05 18:34:10 UTC) #17
scroggo
reed wrote: > 1. We are absolutely on the road to reentrant-safe shaders. > 2. ...
6 years, 9 months ago (2014-03-05 18:48:11 UTC) #18
reed1
would a quick VC help discuss some of these issues?
6 years, 9 months ago (2014-03-05 18:50:50 UTC) #19
scroggo
On 2014/03/05 18:50:50, reed1 wrote: > would a quick VC help discuss some of these ...
6 years, 9 months ago (2014-03-05 19:02:35 UTC) #20
reed1
api lgtm
6 years, 9 months ago (2014-03-05 19:17:21 UTC) #21
sugoi1
On 2014/03/05 19:02:35, scroggo wrote: > On 2014/03/05 18:50:50, reed1 wrote: > > would a ...
6 years, 9 months ago (2014-03-05 19:41:14 UTC) #22
scroggo
On 2014/03/05 19:41:14, sugoi1 wrote: > On 2014/03/05 19:02:35, scroggo wrote: > > On 2014/03/05 ...
6 years, 9 months ago (2014-03-05 21:33:25 UTC) #23
Stephen White
LGTM, but please consider my comment about the bitmaps. https://codereview.chromium.org/169973002/diff/240001/src/effects/SkPerlinNoiseShader.cpp File src/effects/SkPerlinNoiseShader.cpp (right): https://codereview.chromium.org/169973002/diff/240001/src/effects/SkPerlinNoiseShader.cpp#newcode251 src/effects/SkPerlinNoiseShader.cpp:251: ...
6 years, 9 months ago (2014-03-05 21:37:49 UTC) #24
Stephen White
On 2014/03/05 21:37:49, Stephen White wrote: > LGTM, but please consider my comment about the ...
6 years, 9 months ago (2014-03-05 21:46:24 UTC) #25
scroggo
On 2014/03/05 21:46:24, Stephen White wrote: > On 2014/03/05 21:37:49, Stephen White wrote: > > ...
6 years, 9 months ago (2014-03-05 22:05:40 UTC) #26
Stephen White
On 2014/03/05 21:46:24, Stephen White wrote: > On 2014/03/05 21:37:49, Stephen White wrote: > > ...
6 years, 9 months ago (2014-03-05 22:09:53 UTC) #27
scroggo
On 2014/03/05 22:09:53, Stephen White wrote: > On 2014/03/05 21:46:24, Stephen White wrote: > > ...
6 years, 9 months ago (2014-03-05 22:54:58 UTC) #28
Stephen White
Great! I think this'll get around my worry about defeating Ganesh cacheing, too, since the ...
6 years, 9 months ago (2014-03-05 23:12:21 UTC) #29
scroggo
The CQ bit was checked by scroggo@google.com
6 years, 9 months ago (2014-03-06 14:52:54 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/scroggo@google.com/169973002/260001
6 years, 9 months ago (2014-03-06 14:53:01 UTC) #31
commit-bot: I haz the power
6 years, 9 months ago (2014-03-06 15:13:55 UTC) #32
Message was sent while issue was closed.
Change committed as 13682

Powered by Google App Engine
This is Rietveld 408576698