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

Issue 4174049: Fixing shadow rendering in Skia (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 4 months ago by junov
Modified:
13 years, 3 months ago
Reviewers:
Stephen White, reed1
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Added support for alpha mask-based shadow rendering under ARGB bitmaps. Improved mask blurring to produce higher quality blurred shadows using three-pass box blurring

Patch Set 1 #

Total comments: 12

Patch Set 2 : Reverted SkDraw.cpp, reacted to all comments, added test set for gm #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -12 lines) Patch
gm/base/shadows_4444.png View 1 0 chunks +-1 lines, --1 lines 0 comments Download
gm/base/shadows_565.png View 1 0 chunks +-1 lines, --1 lines 0 comments Download
gm/base/shadows_8888.png View 1 0 chunks +-1 lines, --1 lines 0 comments Download
gm/gm_files.mk View 1 1 chunk +1 line, -0 lines 0 comments Download
gm/shadows.cpp View 1 1 chunk +101 lines, -0 lines 1 comment Download
include/effects/SkBlurDrawLooper.h View 3 chunks +6 lines, -2 lines 0 comments Download
include/effects/SkBlurMaskFilter.h View 1 chunk +4 lines, -2 lines 0 comments Download
src/effects/SkBlurDrawLooper.cpp View 1 7 chunks +24 lines, -1 line 1 comment Download
src/effects/SkBlurMask.h View 1 1 chunk +6 lines, -1 line 1 comment Download
src/effects/SkBlurMask.cpp View 1 4 chunks +40 lines, -8 lines 0 comments Download
src/effects/SkBlurMaskFilter.cpp View 1 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 15
junov
13 years, 4 months ago (2011-02-14 15:48:15 UTC) #1
junov
http://codereview.appspot.com/4174049/diff/1/src/core/SkDraw.cpp File src/core/SkDraw.cpp (right): http://codereview.appspot.com/4174049/diff/1/src/core/SkDraw.cpp#newcode1134 src/core/SkDraw.cpp:1134: bitmap.extractAlpha(&tmpBitmap); There is an opportunity to optimize here by ...
13 years, 4 months ago (2011-02-14 15:57:00 UTC) #2
Stephen White
Some style nits, and I'd like to see the bool param to SkBlurMask::Blur() go away. ...
13 years, 4 months ago (2011-02-14 16:20:31 UTC) #3
reed1
Two meta-comments: 1. Lets definitely add some tests/samples for this new high-quality mode as part ...
13 years, 4 months ago (2011-02-14 16:45:47 UTC) #4
reed1
3. How much better does a real gaussian implementation look?
13 years, 4 months ago (2011-02-14 16:46:05 UTC) #5
junov
According to the literature, a three-pass box filter is guaranteed to yield discrepancies of less ...
13 years, 4 months ago (2011-02-14 20:24:34 UTC) #6
junov
For comment 2: I guess what your are saying is that the choice of the ...
13 years, 4 months ago (2011-02-14 20:29:53 UTC) #7
junov
http://codereview.appspot.com/4174049/diff/1/src/core/SkDraw.cpp File src/core/SkDraw.cpp (right): http://codereview.appspot.com/4174049/diff/1/src/core/SkDraw.cpp#newcode1132 src/core/SkDraw.cpp:1132: } else if (paint.getMaskFilter() && bitmap.getConfig() == SkBitmap::kARGB_8888_Config) { ...
13 years, 4 months ago (2011-02-14 20:46:08 UTC) #8
reed1
I think we may regress some clients if we change the existing path taken for ...
13 years, 4 months ago (2011-02-15 19:51:39 UTC) #9
reed1
I've run the patch on SampleApp, and the results look nice!
13 years, 4 months ago (2011-02-15 21:11:12 UTC) #10
junov
Fair enough, there are actually two independent bug fixes in that CL. The change to ...
13 years, 4 months ago (2011-02-16 14:51:44 UTC) #11
junov
Reverted SkDraw.cpp, reacted to all comments, added test set for gm
13 years, 4 months ago (2011-02-16 22:07:28 UTC) #12
junov
http://codereview.appspot.com/4174049/diff/11002/gm/shadows.cpp File gm/shadows.cpp (right): http://codereview.appspot.com/4174049/diff/11002/gm/shadows.cpp#newcode18 gm/shadows.cpp:18: fPaint.setStrokeWidth(SkIntToScalar(4)); Oops, indent booboo. I'm on it
13 years, 4 months ago (2011-02-16 22:10:11 UTC) #13
Stephen White
http://codereview.appspot.com/4174049/diff/11002/src/effects/SkBlurDrawLooper.cpp File src/effects/SkBlurDrawLooper.cpp (right): http://codereview.appspot.com/4174049/diff/11002/src/effects/SkBlurDrawLooper.cpp#newcode28 src/effects/SkBlurDrawLooper.cpp:28: { Looks like skia code style is to omit ...
13 years, 4 months ago (2011-02-16 22:28:23 UTC) #14
reed1
13 years, 4 months ago (2011-02-17 14:07:17 UTC) #15
LGTM

The code base is inconsistent in its { } usage, so I won't focus on that in this
CL. Going forward the style is:

1. always use { } for "if" and "while" and "for" and "else"
2. the braces are always on the same line as their keyword (e.g. } else { )
Sign in to reply to this message.

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