Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1218)

Issue 804813002: Cleanup: Mark some overridden methods with 'SK_OVERRIDE'. (Closed)

Created:
6 years ago by tfarina
Modified:
6 years ago
Reviewers:
bsalomon, mtklein
CC:
reviews_skia.org, reed1, Nico
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Cleanup: Mark some overridden methods with 'SK_OVERRIDE'. This fixes errors like this: ../../include/gpu/effects/GrPorterDuffXferProcessor.h:27:25: error: 'name' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] BUG=skia:3075 TEST=ninja -C out/Debug skia_lib TBR=bsalomon@google.com Committed: https://skia.googlesource.com/skia/+/912ed6ebb8e2813e72ed7a3dec3b6710ba7e7405

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -30 lines) Patch
M include/effects/SkLayerRasterizer.h View 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkPixelXorXfermode.h View 1 chunk +1 line, -1 line 0 comments Download
M include/gpu/effects/GrPorterDuffXferProcessor.h View 1 chunk +1 line, -1 line 0 comments Download
M include/utils/SkDeferredCanvas.h View 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkColorMatrixFilter.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkLightingImageFilter.cpp View 6 chunks +6 lines, -6 lines 0 comments Download
M src/effects/gradients/SkLinearGradient.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/effects/gradients/SkTwoPointConicalGradient.h View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrDrawTarget.h View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrGeometryProcessor.h View 2 chunks +1 line, -3 lines 0 comments Download
M src/gpu/GrInOrderDrawBuffer.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/SkGpuDevice.h View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/effects/GrConvolutionEffect.h View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/effects/GrYUVtoRGBEffect.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLPathRange.h View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLRenderTarget.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/builders/GrGLNvprProgramBuilder.h View 1 chunk +1 line, -1 line 0 comments Download
M src/images/SkImageDecoder_libjpeg.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/utils/SkTextureCompressor_Blitter.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (2 generated)
tfarina
TBRing... (rs?)
6 years ago (2014-12-14 15:03:22 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/804813002/1
6 years ago (2014-12-14 15:04:19 UTC) #3
mtklein
lgtm CLs that add SK_OVERRIDE where legal are always very welcome! Isn't there a Clang ...
6 years ago (2014-12-14 23:19:28 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://skia.googlesource.com/skia/+/912ed6ebb8e2813e72ed7a3dec3b6710ba7e7405
6 years ago (2014-12-14 23:20:15 UTC) #6
tfarina
I'm not aware of such tool. Ccing Daniel, he might know. Is Skia C++11 ready?
6 years ago (2014-12-15 01:19:36 UTC) #7
dcheng
On 2014/12/15 at 01:19:36, tfarina wrote: > I'm not aware of such tool. Ccing Daniel, ...
6 years ago (2014-12-15 01:30:52 UTC) #8
mtklein
6 years ago (2014-12-15 14:58:01 UTC) #9
Message was sent while issue was closed.
On 2014/12/15 01:30:52, dcheng wrote:
> On 2014/12/15 at 01:19:36, tfarina wrote:
> > I'm not aware of such tool. Ccing Daniel, he might know.
> > 
> > Is Skia C++11 ready?

Skia's supports back to C++98, but sure, it's ready for C++11.  We build and
test it with -std=c++11 on a few of our bots.

> It is theoretically possible to do this with the Clang plugin. I guess the
> bigger question is if it's worth the effort. I have a simple patch which can
> automatically apply fixits generated by clang to source
> (https://codereview.chromium.org/598073004). The workflow is basically
something
> like:
> 
> 1. ninja -C out/Debug -k 1000 > fixits
> 2. tools/clang/scripts/apply-fixits.sh < fixits
> 3. repeat steps 1-2 until everything compiles
> 
> However, the Chrome clang plugin enforces (or will soon enforce) things that
> probably aren't desirable if you aren't using C++11 (it prefers you only use
one
> of {virtual,override,final} and will soon generate fixits to remove redundant
> specifiers) and it also emits fixits to insert 'override' rather than
> SK_OVERRIDE. These aren't insurmountable obstacles, but they might make it
more
> effort than it's worth, if there aren't that many things to fix up.

I think I was thinking of clang-modernize (-add-override -override-macros). 
I'll play around with that.

Powered by Google App Engine
This is Rietveld 408576698