RESOLVED FIXED 176531
[ARM] Building FELightningNEON.cpp fails due to missing {Point,Spot}LightSource declarations
https://bugs.webkit.org/show_bug.cgi?id=176531
Summary [ARM] Building FELightningNEON.cpp fails due to missing {Point,Spot}LightSour...
Adrian Perez
Reported 2017-09-07 09:23:33 PDT
SSIA. Compiler output (GCC 6) follows. --- In file included from platform/graphics/filters/FELighting.cpp:30:0: platform/graphics/cpu/arm/filters/FELightingNEON.h: In member function ‘void WebCore::FELighting::platformApplyNeon(WebCore::FELighting::LightingData&, WebCore::LightSource::PaintingData&)’: platform/graphics/cpu/arm/filters/FELightingNEON.h:119:9: error: ‘PointLightSource’ was not declared in this scope PointLightSource* pointLightSource = static_cast<PointLightSource*>(m_lightSource.get()); ^~~~~~~~~~~~~~~~ platform/graphics/cpu/arm/filters/FELightingNEON.h:127:9: error: ‘SpotLightSource’ was not declared in this scope SpotLightSource* spotLightSource = static_cast<SpotLightSource*>(m_lightSource.get()); ^~~~~~~~~~~~~~~
Attachments
Patch (3.88 KB, patch)
2017-09-07 10:07 PDT, Adrian Perez
no flags
Patch (v2) (3.88 KB, patch)
2017-09-07 10:40 PDT, Adrian Perez
no flags
Adrian Perez
Comment 1 2017-09-07 09:28:05 PDT
After adding the needed #include incantations, the compiler keeps complaining (output below). From a cursory glance it looks like some downcasting might be needed, I'm taking a look at the code. --- In file included from platform/graphics/cpu/arm/filters/FELightingNEON.cpp:28:0: platform/graphics/cpu/arm/filters/FELightingNEON.h: In member function ‘void WebCore::FELighting::platformApplyNeon(WebCore::FELighting::LightingData&, WebCore::LightSource::PaintingData&)’: platform/graphics/cpu/arm/filters/FELightingNEON.h:121:96: error: invalid static_cast from type ‘WebCore::LightSource’ to type ‘WebCore::PointLightSource*’ PointLightSource* pointLightSource = static_cast<PointLightSource*>(m_lightSource.get()); ^ platform/graphics/cpu/arm/filters/FELightingNEON.h:128:93: error: invalid static_cast from type ‘WebCore::LightSource’ to type ‘WebCore::SpotLightSource*’ SpotLightSource* spotLightSource = static_cast<SpotLightSource*>(m_lightSource.get()); ^
Adrian Perez
Comment 2 2017-09-07 09:47:37 PDT
(In reply to Adrian Perez from comment #1) > After adding the needed #include incantations, the compiler keeps > complaining (output below). From a cursory glance it looks like some > downcasting might be needed, I'm taking a look at the code. Noup, m_lightSource is a Ref<LightSource>, and the Ref<T>::get() returns a reference. The code has to be updated to make casts to the correct reference types, and member access using the dot operator instead. I'll be submitting a patch momentarily.
Adrian Perez
Comment 3 2017-09-07 10:07:05 PDT
Adrian Perez
Comment 4 2017-09-07 10:40:42 PDT
Created attachment 320132 [details] Patch (v2) Now this version does the casts properly O:-)
WebKit Commit Bot
Comment 5 2017-09-07 11:22:49 PDT
Comment on attachment 320132 [details] Patch (v2) Clearing flags on attachment: 320132 Committed r221742: <http://trac.webkit.org/changeset/221742>
WebKit Commit Bot
Comment 6 2017-09-07 11:22:50 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2017-09-27 12:34:14 PDT
Note You need to log in before you can comment on or make changes to this bug.