WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
149752
[Cairo] fast/canvas/canvas-imageSmoothingFoo tests failed after
r190383
.
https://bugs.webkit.org/show_bug.cgi?id=149752
Summary
[Cairo] fast/canvas/canvas-imageSmoothingFoo tests failed after r190383.
Hunseop Jeong
Reported
2015-10-02 09:35:51 PDT
https://build.webkit.org/builders/GTK%20Linux%2064-bit%20Debug%20%28Tests%29/builds/5838/steps/layout-test/logs/stdio
fast/canvas/canvas-imageSmoothingEnabled.html [ Failure ] fast/canvas/canvas-imageSmoothingQuality.html [ Failure ]
Attachments
Patch
(1.58 KB, patch)
2015-10-02 09:41 PDT
,
Hunseop Jeong
no flags
Details
Formatted Diff
Diff
Patch
(1.63 KB, patch)
2015-10-05 23:01 PDT
,
Hunseop Jeong
no flags
Details
Formatted Diff
Diff
Patch
(6.28 KB, patch)
2015-10-05 23:49 PDT
,
Hunseop Jeong
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Hunseop Jeong
Comment 1
2015-10-02 09:41:35 PDT
Created
attachment 262339
[details]
Patch
Martin Robinson
Comment 2
2015-10-04 23:42:41 PDT
Comment on
attachment 262339
[details]
Patch I wonder if it is possible to have Cairo more closely match the behavior of CG here? What do you think?
Carlos Garcia Campos
Comment 3
2015-10-05 00:13:35 PDT
(In reply to
comment #2
)
> Comment on
attachment 262339
[details]
> Patch > > I wonder if it is possible to have Cairo more closely match the behavior of > CG here? What do you think?
I don't think it's possible, because CG has more options than cairo, so there's always an option we can't match. In cairo Low and None are the same, which is CAIRO_FILTER_FAST, medium and default are also the same CAIRO_FILTER_GOOD and high is CAIRO_FILTER_BEST. A possible change could be: - None -> FAST - Low, Default, Medium -> GOOD - High -> BEST But there are cases where Low is used for performance reasons (scrolling) and we really want to use FAST there. What we currently do in HTMLCanvasElement.h is defining a DefaultInterpolationQuality #if USE(CG) #define DefaultInterpolationQuality InterpolationLow #else #define DefaultInterpolationQuality InterpolationDefault #endif I think we could do the same for SmoothingQuality, and use the default value in the constructor.
Hunseop Jeong
Comment 4
2015-10-05 19:41:38 PDT
(In reply to
comment #3
)
> (In reply to
comment #2
) > > Comment on
attachment 262339
[details]
> > Patch > > > > I wonder if it is possible to have Cairo more closely match the behavior of > > CG here? What do you think? > > I don't think it's possible, because CG has more options than cairo, so > there's always an option we can't match. In cairo Low and None are the same, > which is CAIRO_FILTER_FAST, medium and default are also the same > CAIRO_FILTER_GOOD and high is CAIRO_FILTER_BEST. A possible change could be: > > - None -> FAST > - Low, Default, Medium -> GOOD > - High -> BEST >
You mean, we change the match : switch (m_state->m_imageInterpolationQuality) { case InterpolationNone: cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_FAST); break; case InterpolationLow: case InterpolationMedium: case InterpolationDefault: cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_GOOD); break; case InterpolationHigh: cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_BEST); break; } ?
> But there are cases where Low is used for performance reasons (scrolling) > and we really want to use FAST there. What we currently do in > HTMLCanvasElement.h is defining a DefaultInterpolationQuality > > #if USE(CG) > #define DefaultInterpolationQuality InterpolationLow > #else > #define DefaultInterpolationQuality InterpolationDefault > #endif > > I think we could do the same for SmoothingQuality, and use the default value > in the constructor.
and use the 'InterpolationLow' like as CG in HTMLCanvasElement?
Carlos Garcia Campos
Comment 5
2015-10-05 22:50:09 PDT
(In reply to
comment #4
)
> (In reply to
comment #3
) > > (In reply to
comment #2
) > > > Comment on
attachment 262339
[details]
> > > Patch > > > > > > I wonder if it is possible to have Cairo more closely match the behavior of > > > CG here? What do you think? > > > > I don't think it's possible, because CG has more options than cairo, so > > there's always an option we can't match. In cairo Low and None are the same, > > which is CAIRO_FILTER_FAST, medium and default are also the same > > CAIRO_FILTER_GOOD and high is CAIRO_FILTER_BEST. A possible change could be: > > > > - None -> FAST > > - Low, Default, Medium -> GOOD > > - High -> BEST > > > You mean, we change the match : > > switch (m_state->m_imageInterpolationQuality) { > case InterpolationNone: > cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_FAST); > break; > case InterpolationLow: > case InterpolationMedium: > case InterpolationDefault: > cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_GOOD); > break; > case InterpolationHigh: > cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_BEST); > break; > } > ?
No, as I said below, this will cause performance regression in some situations.
> > But there are cases where Low is used for performance reasons (scrolling) > > and we really want to use FAST there. What we currently do in > > HTMLCanvasElement.h is defining a DefaultInterpolationQuality > > > > #if USE(CG) > > #define DefaultInterpolationQuality InterpolationLow > > #else > > #define DefaultInterpolationQuality InterpolationDefault > > #endif > > > > I think we could do the same for SmoothingQuality, and use the default value > > in the constructor. > > and use the 'InterpolationLow' like as CG in HTMLCanvasElement?
Define a DefaultSmoothingQuality there and use it in the constructor
Hunseop Jeong
Comment 6
2015-10-05 23:01:42 PDT
Created
attachment 262503
[details]
Patch
Hunseop Jeong
Comment 7
2015-10-05 23:04:08 PDT
(In reply to
comment #5
)
> (In reply to
comment #4
) > > (In reply to
comment #3
) > > > (In reply to
comment #2
) > > > > Comment on
attachment 262339
[details]
> > > > Patch > > > > > > > > I wonder if it is possible to have Cairo more closely match the behavior of > > > > CG here? What do you think? > > > > > > I don't think it's possible, because CG has more options than cairo, so > > > there's always an option we can't match. In cairo Low and None are the same, > > > which is CAIRO_FILTER_FAST, medium and default are also the same > > > CAIRO_FILTER_GOOD and high is CAIRO_FILTER_BEST. A possible change could be: > > > > > > - None -> FAST > > > - Low, Default, Medium -> GOOD > > > - High -> BEST > > > > > You mean, we change the match : > > > > switch (m_state->m_imageInterpolationQuality) { > > case InterpolationNone: > > cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_FAST); > > break; > > case InterpolationLow: > > case InterpolationMedium: > > case InterpolationDefault: > > cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_GOOD); > > break; > > case InterpolationHigh: > > cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_BEST); > > break; > > } > > ? > > No, as I said below, this will cause performance regression in some > situations. > > > > But there are cases where Low is used for performance reasons (scrolling) > > > and we really want to use FAST there. What we currently do in > > > HTMLCanvasElement.h is defining a DefaultInterpolationQuality > > > > > > #if USE(CG) > > > #define DefaultInterpolationQuality InterpolationLow > > > #else > > > #define DefaultInterpolationQuality InterpolationDefault > > > #endif > > > > > > I think we could do the same for SmoothingQuality, and use the default value > > > in the constructor. > > > > and use the 'InterpolationLow' like as CG in HTMLCanvasElement? > > Define a DefaultSmoothingQuality there and use it in the constructor
Oh..I see. But I got a fail message after applying this patch in fast/canvas/canvas-imageSmoothingQuality.html. PASS defaultContext.imageSmoothingQuality is 'low' FAIL defaultContext.imageSmoothingQuality should be low. Was medium.
Hunseop Jeong
Comment 8
2015-10-05 23:07:23 PDT
(In reply to
comment #7
)
> (In reply to
comment #5
) > > (In reply to
comment #4
) > > > (In reply to
comment #3
) > > > > (In reply to
comment #2
) > > > > > Comment on
attachment 262339
[details]
> > > > > Patch > > > > > > > > > > I wonder if it is possible to have Cairo more closely match the behavior of > > > > > CG here? What do you think? > > > > > > > > I don't think it's possible, because CG has more options than cairo, so > > > > there's always an option we can't match. In cairo Low and None are the same, > > > > which is CAIRO_FILTER_FAST, medium and default are also the same > > > > CAIRO_FILTER_GOOD and high is CAIRO_FILTER_BEST. A possible change could be: > > > > > > > > - None -> FAST > > > > - Low, Default, Medium -> GOOD > > > > - High -> BEST > > > > > > > You mean, we change the match : > > > > > > switch (m_state->m_imageInterpolationQuality) { > > > case InterpolationNone: > > > cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_FAST); > > > break; > > > case InterpolationLow: > > > case InterpolationMedium: > > > case InterpolationDefault: > > > cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_GOOD); > > > break; > > > case InterpolationHigh: > > > cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_BEST); > > > break; > > > } > > > ? > > > > No, as I said below, this will cause performance regression in some > > situations. > > > > > > But there are cases where Low is used for performance reasons (scrolling) > > > > and we really want to use FAST there. What we currently do in > > > > HTMLCanvasElement.h is defining a DefaultInterpolationQuality > > > > > > > > #if USE(CG) > > > > #define DefaultInterpolationQuality InterpolationLow > > > > #else > > > > #define DefaultInterpolationQuality InterpolationDefault > > > > #endif > > > > > > > > I think we could do the same for SmoothingQuality, and use the default value > > > > in the constructor. > > > > > > and use the 'InterpolationLow' like as CG in HTMLCanvasElement? > > > > Define a DefaultSmoothingQuality there and use it in the constructor > > Oh..I see. But I got a fail message after applying this patch in > fast/canvas/canvas-imageSmoothingQuality.html. > > PASS defaultContext.imageSmoothingQuality is 'low' > FAIL defaultContext.imageSmoothingQuality should be low. Was medium.
fase/canvas/canvas-imageSmoothingQuality test checks the default value of imageSmoothingQuality whether is low.
Carlos Garcia Campos
Comment 9
2015-10-05 23:13:36 PDT
So, we need platform specific test result, then
Hunseop Jeong
Comment 10
2015-10-05 23:49:05 PDT
Created
attachment 262505
[details]
Patch
Hunseop Jeong
Comment 11
2015-10-05 23:51:11 PDT
(In reply to
comment #9
)
> So, we need platform specific test result, then
Do I add the platform specific test expected file with FAIL result?
Carlos Garcia Campos
Comment 12
2015-10-06 00:44:43 PDT
(In reply to
comment #11
)
> (In reply to
comment #9
) > > So, we need platform specific test result, then > > Do I add the platform specific test expected file with FAIL result?
Yes, that's what we expect :-) Thanks
WebKit Commit Bot
Comment 13
2015-10-06 09:35:32 PDT
Comment on
attachment 262505
[details]
Patch Clearing flags on attachment: 262505 Committed
r190618
: <
http://trac.webkit.org/changeset/190618
>
WebKit Commit Bot
Comment 14
2015-10-06 09:35:37 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug