Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2926)

Issue 7058075: Implementation of the displacement effect (both CPU and GPU) (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by sugoi
Modified:
11 years, 10 months ago
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Implementation of the displacement effect (both CPU and GPU) TEST=Added new GM called "displacement" Committed: https://code.google.com/p/skia/source/detail?r=7182

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 10

Patch Set 4 : #

Total comments: 4

Patch Set 5 : #

Total comments: 4

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+723 lines, -0 lines) Patch
gm/displacement.cpp View 1 2 3 4 5 1 chunk +137 lines, -0 lines 0 comments Download
gyp/effects.gypi View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
gyp/gmslides.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
include/effects/SkDisplacementMapEffect.h View 1 2 3 1 chunk +54 lines, -0 lines 0 comments Download
src/effects/SkDisplacementMapEffect.cpp View 1 2 3 4 5 1 chunk +527 lines, -0 lines 0 comments Download
src/ports/SkGlobalInitialization_default.cpp View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 17
sugoi
11 years, 10 months ago (2013-01-10 16:43:58 UTC) #1
sugoi1
Ok, I tested with the new webkit implementation of displacement that's in review right now, ...
11 years, 10 months ago (2013-01-11 19:15:41 UTC) #2
sugoi1
11 years, 10 months ago (2013-01-11 19:15:52 UTC) #3
Stephen White
https://codereview.appspot.com/7058075/diff/8001/gm/displacement.cpp File gm/displacement.cpp (right): https://codereview.appspot.com/7058075/diff/8001/gm/displacement.cpp#newcode2 gm/displacement.cpp:2: * Copyright 2012 Google Inc. Nit: 2013 https://codereview.appspot.com/7058075/diff/8001/include/effects/SkDisplacementMapEffect.h File ...
11 years, 10 months ago (2013-01-11 20:24:50 UTC) #4
bsalomon
https://codereview.appspot.com/7058075/diff/8001/include/effects/SkDisplacementMapEffect.h File include/effects/SkDisplacementMapEffect.h (right): https://codereview.appspot.com/7058075/diff/8001/include/effects/SkDisplacementMapEffect.h#newcode2 include/effects/SkDisplacementMapEffect.h:2: * Copyright 2012 The Android Open Source Project On ...
11 years, 10 months ago (2013-01-11 20:53:13 UTC) #5
bsalomon
We should add it to the shader unit test (see GrEffectUnitTest.h)
11 years, 10 months ago (2013-01-11 20:54:16 UTC) #6
Stephen White
On 2013/01/11 20:53:13, bsalomon wrote: > https://codereview.appspot.com/7058075/diff/8001/include/effects/SkDisplacementMapEffect.h > File include/effects/SkDisplacementMapEffect.h (right): > > https://codereview.appspot.com/7058075/diff/8001/include/effects/SkDisplacementMapEffect.h#newcode2 > ...
11 years, 10 months ago (2013-01-11 21:15:55 UTC) #7
sugoi1
I added the unit test for GrDisplacementMapEffect, although I'm not sure how/when it gets run, ...
11 years, 10 months ago (2013-01-14 20:30:22 UTC) #8
Stephen White
https://codereview.appspot.com/7058075/diff/15001/gm/displacement.cpp File gm/displacement.cpp (right): https://codereview.appspot.com/7058075/diff/15001/gm/displacement.cpp#newcode79 gm/displacement.cpp:79: canvas->drawSprite(*color, 0, 0, &paint); I'm afraid we'll have to ...
11 years, 10 months ago (2013-01-14 20:38:45 UTC) #9
bsalomon
https://codereview.appspot.com/7058075/diff/15001/src/effects/SkDisplacementMapEffect.cpp File src/effects/SkDisplacementMapEffect.cpp (right): https://codereview.appspot.com/7058075/diff/15001/src/effects/SkDisplacementMapEffect.cpp#newcode134 src/effects/SkDisplacementMapEffect.cpp:134: SkDisplacementMapEffect::SkDisplacementMapEffect(ChannelSelectorType xChannelSelector, ChannelSelectorType yChannelSelector, SkScalar scale, SkImageFilter* displacement, SkImageFilter* ...
11 years, 10 months ago (2013-01-14 20:42:09 UTC) #10
sugoi1
https://codereview.appspot.com/7058075/diff/15001/gm/displacement.cpp File gm/displacement.cpp (right): https://codereview.appspot.com/7058075/diff/15001/gm/displacement.cpp#newcode79 gm/displacement.cpp:79: canvas->drawSprite(*color, 0, 0, &paint); Done, I just replaced drawSprite ...
11 years, 10 months ago (2013-01-14 20:42:26 UTC) #11
bsalomon
On 2013/01/14 20:42:09, bsalomon wrote: > https://codereview.appspot.com/7058075/diff/15001/src/effects/SkDisplacementMapEffect.cpp > File src/effects/SkDisplacementMapEffect.cpp (right): > > https://codereview.appspot.com/7058075/diff/15001/src/effects/SkDisplacementMapEffect.cpp#newcode134 > ...
11 years, 10 months ago (2013-01-14 20:42:51 UTC) #12
sugoi1
Implemented the "inverse Y" math in the displacement shader in case one or both textures ...
11 years, 10 months ago (2013-01-15 14:38:40 UTC) #13
Stephen White
https://codereview.appspot.com/7058075/diff/17003/gm/displacement.cpp File gm/displacement.cpp (right): https://codereview.appspot.com/7058075/diff/17003/gm/displacement.cpp#newcode82 gm/displacement.cpp:82: SkAutoTUnref<SkImageFilter> displ(SkNEW_ARGS(SkBitmapSource, (fBitmap/*fCheckerboard*/))); Nit: please remove commented-out code. https://codereview.appspot.com/7058075/diff/17003/src/effects/SkDisplacementMapEffect.cpp ...
11 years, 10 months ago (2013-01-15 15:17:03 UTC) #14
bsalomon
https://codereview.appspot.com/7058075/diff/17003/src/effects/SkDisplacementMapEffect.cpp File src/effects/SkDisplacementMapEffect.cpp (right): https://codereview.appspot.com/7058075/diff/17003/src/effects/SkDisplacementMapEffect.cpp#newcode437 src/effects/SkDisplacementMapEffect.cpp:437: code->appendf("\t\tvec2 %s = vec2(%s.x, 0.5*(1.0-%s) + %s*%s.y);", On 2013/01/15 ...
11 years, 10 months ago (2013-01-15 15:21:20 UTC) #15
sugoi1
Ok, I fixed the inverse Y implementation.
11 years, 10 months ago (2013-01-15 15:24:44 UTC) #16
Stephen White
11 years, 10 months ago (2013-01-15 15:32:30 UTC) #17
On 2013/01/15 15:24:44, sugoi1 wrote:
> Ok, I fixed the inverse Y implementation.

LGTM.  Thanks for the changes.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b