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

Issue 3391041: Option for BlurDrawLooper to not apply canvas transform to blur offset

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 7 months ago by mikelawther
Modified:
13 years, 7 months ago
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

The HTML5 canvas client of BlurDrawLooper needs the option to not apply the canvas transform to the blur offset. see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#shadows - "The shadowOffsetX and shadowOffsetY attributes specify the distance that the shadow will be offset in the positive horizontal and positive vertical distance respectively. Their values are in coordinate space units. They are not affected by the current transformation matrix." This patch is part of fixing http://code.google.com/p/chromium/issues/detail?id=64647.

Patch Set 1 #

Total comments: 5

Patch Set 2 : addressed comments, also do not transform blur radius #

Total comments: 2

Patch Set 3 : Add param to SkBlurMaskFilter to ignore transform on radius #

Total comments: 2

Patch Set 4 : remove unused fRadius member #

Patch Set 5 : removed accidental inclusion of sampleapp files from previous patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -13 lines) Patch
M include/effects/SkBlurDrawLooper.h View 1 2 3 3 chunks +15 lines, -1 line 0 comments Download
M include/effects/SkBlurMaskFilter.h View 1 chunk +11 lines, -1 line 0 comments Download
M src/effects/SkBlurDrawLooper.cpp View 1 2 3 4 chunks +23 lines, -4 lines 0 comments Download
M src/effects/SkBlurMaskFilter.cpp View 6 chunks +19 lines, -7 lines 0 comments Download

Messages

Total messages: 12
mikelawther
Hi guys - this is my first Skia patch :) Sorry if I've included the ...
13 years, 7 months ago (2010-12-02 00:47:33 UTC) #1
Stephen White
http://codereview.appspot.com/3391041/diff/1/src/effects/SkBlurDrawLooper.cpp File src/effects/SkBlurDrawLooper.cpp (right): http://codereview.appspot.com/3391041/diff/1/src/effects/SkBlurDrawLooper.cpp#newcode20 src/effects/SkBlurDrawLooper.cpp:20: : fBlurFlags(flags) I think this flag should be read ...
13 years, 7 months ago (2010-12-02 15:13:53 UTC) #2
wjmaclean
http://codereview.appspot.com/3391041/diff/1/src/effects/SkBlurDrawLooper.cpp File src/effects/SkBlurDrawLooper.cpp (right): http://codereview.appspot.com/3391041/diff/1/src/effects/SkBlurDrawLooper.cpp#newcode66 src/effects/SkBlurDrawLooper.cpp:66: fCanvas->translate(fDx / current.getScaleX(), fDy / current.getScaleY()); Agreed, I think ...
13 years, 7 months ago (2010-12-02 15:29:48 UTC) #3
mikelawther
http://codereview.appspot.com/3391041/diff/1/src/effects/SkBlurDrawLooper.cpp File src/effects/SkBlurDrawLooper.cpp (right): http://codereview.appspot.com/3391041/diff/1/src/effects/SkBlurDrawLooper.cpp#newcode20 src/effects/SkBlurDrawLooper.cpp:20: : fBlurFlags(flags) On 2010/12/02 15:13:53, Stephen White wrote: > ...
13 years, 7 months ago (2010-12-03 04:43:22 UTC) #4
mikelawther
btw - here is the corresponding Webkit patch that uses this code: https://bugs.webkit.org/show_bug.cgi?id=50437
13 years, 7 months ago (2010-12-03 05:19:37 UTC) #5
Stephen White
Looking much better; thanks for the postTranslate(). http://codereview.appspot.com/3391041/diff/6001/src/effects/SkBlurDrawLooper.cpp File src/effects/SkBlurDrawLooper.cpp (right): http://codereview.appspot.com/3391041/diff/6001/src/effects/SkBlurDrawLooper.cpp#newcode71 src/effects/SkBlurDrawLooper.cpp:71: untransformedRadius, SkBlurMaskFilter::kNormal_BlurStyle)); ...
13 years, 7 months ago (2010-12-03 20:22:08 UTC) #6
mikelawther
I added a similar flag to SkBlurMaskFilter as suggested. http://codereview.appspot.com/3391041/diff/6001/src/effects/SkBlurDrawLooper.cpp File src/effects/SkBlurDrawLooper.cpp (right): http://codereview.appspot.com/3391041/diff/6001/src/effects/SkBlurDrawLooper.cpp#newcode71 src/effects/SkBlurDrawLooper.cpp:71: ...
13 years, 7 months ago (2010-12-06 03:57:18 UTC) #7
Stephen White
This looks much cleaner, thanks. http://codereview.appspot.com/3391041/diff/12001/src/effects/SkBlurDrawLooper.cpp File src/effects/SkBlurDrawLooper.cpp (right): http://codereview.appspot.com/3391041/diff/12001/src/effects/SkBlurDrawLooper.cpp#newcode9 src/effects/SkBlurDrawLooper.cpp:9: : fRadius(radius), fDx(dx), fDy(dy), ...
13 years, 7 months ago (2010-12-06 19:07:21 UTC) #8
mikelawther
OK - I think I've addressed everything :) How do I go about getting this ...
13 years, 7 months ago (2010-12-06 23:31:12 UTC) #9
Stephen White
On 2010/12/06 23:31:12, mikelawther wrote: > OK - I think I've addressed everything :) How ...
13 years, 7 months ago (2010-12-06 23:42:33 UTC) #10
Stephen White
Landed as r631.
13 years, 7 months ago (2010-12-06 23:46:45 UTC) #11
mikelawther
13 years, 7 months ago (2010-12-06 23:49:30 UTC) #12
On 2010/12/06 23:46:45, Stephen White wrote:
> Landed as r631.

Thanks!
Sign in to reply to this message.

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