D9848: Updated the blur method to use the more efficient dual kawase blur algorithm.
Vlad Zagorodniy
noreply at phabricator.kde.org
Sun Jan 14 10:05:34 UTC 2018
zzag added a comment.
Restricted Application edited projects, added KWin; removed Plasma.
Also, I would consider using smart pointers(e.g. `QScopedPointer`).
INLINE COMMENTS
> blur.cpp:92
> + delete m_simpleTarget;
> + m_simpleTarget = NULL;
> +
Please use `nullptr`.
> blur.cpp:95
> delete m_simpleShader;
> - delete shader;
> - delete target;
> + m_simpleShader = NULL;
> +
Please use `nullptr`.
> blur.cpp:98
> + delete m_shader;
> + m_shader = NULL;
> }
Please use `nullptr`.
> blur.cpp:125
> + delete m_renderTargets[i];
> + m_renderTargets[i] = NULL;
> +
`nullptr`
> blurshader.cpp:55
> GLSLBlurShader::GLSLBlurShader()
> - : BlurShader(), shader(NULL)
> + : BlurShader(), m_shaderDownsample(NULL), m_shaderUpsample(NULL), m_shaderCopysample(NULL)
> {
You can simplify:
GLShader *m_shaderDownsample = nullptr;
GLShader *m_shaderUpsample = nullptr;
GLShader *m_shaderCopysample = nullptr;
> blurshader.cpp:68
> + delete m_shaderDownsample;
> + m_shaderDownsample = NULL;
> +
`nullptr`
> blurshader.cpp:71
> + delete m_shaderUpsample;
> + m_shaderUpsample = NULL;
> +
`nullptr`
> blurshader.cpp:74
> + delete m_shaderCopysample;
> + m_shaderCopysample = NULL;
>
`nullptr`
> blurshader.cpp:86
> + case copySampleType:
> + if (matrix == m_matrixCopysample)
> + return;
Please use `{}`
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D9848
To: anemeth, #plasma, #kwin
Cc: romangg, zzag, anthonyfieroni, mart, davidedmundson, fredrik, ngraham, plasma-devel, kwin, #kwin, iodelay, bwowk, ZrenBot, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180114/6adc4e63/attachment.html>
More information about the Plasma-devel
mailing list