Looks clean. The impl in SkXfermode (of multiply_proc) looks faster than what was in SkBlendImageFilter. ...
11 years, 9 months ago
(2013-02-01 20:11:29 UTC)
#1
Looks clean.
The impl in SkXfermode (of multiply_proc) looks faster than what was in
SkBlendImageFilter. Lets be sure (1) its correct, (2) we may need a build-flag
around the change (at least the different impl) so we can stage rebaselining
existing results (I'm assuming we may get slightly different results)...
Adding stephen, as the author of SkBlendImageFilter.
https://codereview.appspot.com/7221086/diff/1/src/effects/SkBlendImageFilter.cpp
File src/effects/SkBlendImageFilter.cpp (right):
https://codereview.appspot.com/7221086/diff/1/src/effects/SkBlendImageFilter....
src/effects/SkBlendImageFilter.cpp:39:
Need to delete this local function.
On 2013/02/01 20:11:29, reed1 wrote: > Looks clean. > > The impl in SkXfermode (of ...
11 years, 9 months ago
(2013-02-01 20:13:56 UTC)
#2
On 2013/02/01 20:11:29, reed1 wrote:
> Looks clean.
>
> The impl in SkXfermode (of multiply_proc) looks faster than what was in
> SkBlendImageFilter. Lets be sure (1) its correct, (2) we may need a build-flag
> around the change (at least the different impl) so we can stage rebaselining
> existing results (I'm assuming we may get slightly different results)...
>
> Adding stephen, as the author of SkBlendImageFilter.
>
How can I set a build flag?
something like static void multiply_proc(...) { #ifdef SK_IGNORE_MULTIPLY_XFERMODE_OPT ... put the current code from SkBlendImageFilter ...
11 years, 9 months ago
(2013-02-01 20:18:16 UTC)
#3
something like
static void multiply_proc(...) {
#ifdef SK_IGNORE_MULTIPLY_XFERMODE_OPT
... put the current code from SkBlendImageFilter here
#else
... put your new code here
#endif
}
That way skia (which won't define that flag) will immediately begin testing and
benchmarking the new code. Chrome can stage this by #defining the flag
initially, build its rebaselined images, and then remove their definition.
On 2013/02/01 20:13:56, RikC wrote: > On 2013/02/01 20:11:29, reed1 wrote: > > Looks clean. ...
11 years, 9 months ago
(2013-02-01 20:24:42 UTC)
#4
On 2013/02/01 20:13:56, RikC wrote:
> On 2013/02/01 20:11:29, reed1 wrote:
> > Looks clean.
> >
> > The impl in SkXfermode (of multiply_proc) looks faster than what was in
> > SkBlendImageFilter. Lets be sure (1) its correct, (2) we may need a
build-flag
> > around the change (at least the different impl) so we can stage rebaselining
> > existing results (I'm assuming we may get slightly different results)...
> >
> > Adding stephen, as the author of SkBlendImageFilter.
> >
> How can I set a build flag?
Thanks for taking this on.
Are the results of the "blend" GM the same?
You can test that via something like this:
# revert your patch
mkdir foo
ninja -C out/Release gm # or whatever build system you're using
out/Release/gm -w foo --match blend
# then, apply your patch, rebuild, and
out/Release/gm -r foo --match blend
Hopefully they're only slightly different. If so, add a compile-time flag,
something like
#ifndef SK_USE_OLD_MULTIPLY_BLENDMODE
// new stuff
#else
// old stuff
#endif
Then put something in the patch description reminding us to #define
SK_USE_OLD_MULTIPLY_BLENDMODE in Chrome until we've rebaselined the WebKit
tests.
> > Then put something in the patch description reminding us to #define > SK_USE_OLD_MULTIPLY_BLENDMODE ...
11 years, 9 months ago
(2013-02-01 21:04:28 UTC)
#5
>
> Then put something in the patch description reminding us to #define
> SK_USE_OLD_MULTIPLY_BLENDMODE in Chrome until we've rebaselined the WebKit
> tests.
Done.
Also, updated the patch description
On 2013/02/01 21:04:28, RikC wrote: > > > > Then put something in the patch ...
11 years, 9 months ago
(2013-02-01 21:10:17 UTC)
#6
On 2013/02/01 21:04:28, RikC wrote:
> >
> > Then put something in the patch description reminding us to #define
> > SK_USE_OLD_MULTIPLY_BLENDMODE in Chrome until we've rebaselined the WebKit
> > tests.
>
> Done.
> Also, updated the patch description
LGTM
On 2013/02/01 21:10:17, Stephen White wrote: > On 2013/02/01 21:04:28, RikC wrote: > > > ...
11 years, 9 months ago
(2013-02-01 21:12:07 UTC)
#7
On 2013/02/01 21:10:17, Stephen White wrote:
> On 2013/02/01 21:04:28, RikC wrote:
> > >
> > > Then put something in the patch description reminding us to #define
> > > SK_USE_OLD_MULTIPLY_BLENDMODE in Chrome until we've rebaselined the WebKit
> > > tests.
> >
> > Done.
> > Also, updated the patch description
>
> LGTM
Hmm. Perhaps we should also augment the xfermodes GM's to exercise this new
mode as well, instead of leaving it up to the blend GM.
On 2013/02/01 21:12:07, Stephen White wrote: > On 2013/02/01 21:10:17, Stephen White wrote: > > ...
11 years, 9 months ago
(2013-02-01 21:12:50 UTC)
#8
On 2013/02/01 21:12:07, Stephen White wrote:
> On 2013/02/01 21:10:17, Stephen White wrote:
> > On 2013/02/01 21:04:28, RikC wrote:
> > > >
> > > > Then put something in the patch description reminding us to #define
> > > > SK_USE_OLD_MULTIPLY_BLENDMODE in Chrome until we've rebaselined the
WebKit
> > > > tests.
> > >
> > > Done.
> > > Also, updated the patch description
> >
> > LGTM
>
> Hmm. Perhaps we should also augment the xfermodes GM's to exercise this new
> mode as well, instead of leaving it up to the blend GM.
(That can be done in a different patch, if necessary.)
> > > > Hmm. Perhaps we should also augment the xfermodes GM's to exercise ...
11 years, 9 months ago
(2013-02-01 21:19:55 UTC)
#9
> >
> > Hmm. Perhaps we should also augment the xfermodes GM's to exercise this new
> > mode as well, instead of leaving it up to the blend GM.
>
> (That can be done in a different patch, if necessary.)
I can do that in a new patch. What file is it that tests the blend modes?
I found XfermodeTest.cpp and it should already test the new one...
On 2013/02/01 21:19:55, RikC wrote: > > > > > > Hmm. Perhaps we should ...
11 years, 9 months ago
(2013-02-01 21:27:48 UTC)
#10
On 2013/02/01 21:19:55, RikC wrote:
> > >
> > > Hmm. Perhaps we should also augment the xfermodes GM's to exercise this
new
> > > mode as well, instead of leaving it up to the blend GM.
> >
> > (That can be done in a different patch, if necessary.)
>
> I can do that in a new patch. What file is it that tests the blend modes?
> I found XfermodeTest.cpp and it should already test the new one...
I was thinking of gm/xfermodes.cpp.
Issue 7221086: This change adds support for the multiply blend mode
Created 11 years, 9 months ago by RikC
Modified 11 years, 9 months ago
Reviewers: caryclark1;reed_google.com, senorblanco, reed1, Stephen White
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 1