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

Issue 98703002: Fix compilation with SK_ENABLE_INST_COUNT=1 (Closed)

Created:
7 years ago by Kimmo Kinnunen
Modified:
7 years ago
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Fix compilation with SK_ENABLE_INST_COUNT=1 Add INHERITED declarations to class declarations that prevent compilation with the flag. Remove SK_DEFINE_INST_COUNT from all class implementations. Instead, use function-local static variables in the reference count helper classes to create the global instances to store the needed info. The accessor functions are defined inline in the helper classes, so definitions are not needed. The initialization point of the variables should be as well defined as previously. Remove SK_DECLARE_INST_COUNT_TEMPLATE and use SK_DECLARE_INST_COUNT instead. This avoids possible future compilation errors further. For SK_ENABLE_INST_COUNT=0 compilation, add an empty static member function to all classes that use SK_DECLARE_INST_COUNT and SK_DECLARE_INST_COUNT_ROOT macros. The function ensures that classes contain public INHERITED typedef. This member function seems to be compiled away. This shouĺd ensure that part of the compilation errors are caught earlier. Also adds DSK_DECLARE_INST_COUNT to few SkPDFDict subclasses. Committed: http://code.google.com/p/skia/source/detail?r=12501

Patch Set 1 #

Total comments: 1

Patch Set 2 : address review comments #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -293 lines) Patch
bench/GrResourceCacheBench.cpp View 1 1 chunk +0 lines, -3 lines 0 comments Download
M bench/RefCntBench.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
bench/SkBenchmark.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M gm/gm_expectations.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M gyp/core.gypi View 1 2 chunks +0 lines, -2 lines 0 comments Download
gyp/gpu.gypi View 1 1 chunk +0 lines, -1 line 0 comments Download
M include/core/SkInstCnt.h View 1 3 chunks +43 lines, -49 lines 0 comments Download
M include/lazy/SkLruImageCache.h View 1 chunk +1 line, -0 lines 0 comments Download
M include/lazy/SkPurgeableImageCache.h View 1 chunk +1 line, -0 lines 0 comments Download
M include/ports/SkFontConfigInterface.h View 1 chunk +1 line, -0 lines 0 comments Download
M samplecode/SampleApp.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkAdvancedTypefaceMetrics.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
D src/core/SkBBoxHierarchy.cpp View 1 1 chunk +0 lines, -11 lines 0 comments Download
M src/core/SkBitmap.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/core/SkBitmapDevice.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkBitmapHeap.cpp View 1 1 chunk +0 lines, -3 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 1 chunk +0 lines, -4 lines 0 comments Download
M src/core/SkColorFilter.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/core/SkColorTable.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/core/SkData.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/core/SkDataTable.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkDevice.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkDeviceProfile.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/core/SkDrawLooper.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkFlattenable.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkFontHost.cpp View 1 2 chunks +0 lines, -4 lines 0 comments Download
M src/core/SkImageFilter.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/core/SkMaskFilter.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/core/SkMaskGamma.h View 1 2 chunks +1 line, -6 lines 0 comments Download
M src/core/SkPath.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkPathEffect.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkPathHeap.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkPathRef.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkPicture.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/core/SkPictureFlat.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkPictureStateTree.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkPixelRef.cpp View 1 1 chunk +0 lines, -3 lines 0 comments Download
M src/core/SkPtrRecorder.cpp View 1 1 chunk +0 lines, -3 lines 0 comments Download
src/core/SkRTree.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkRasterizer.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
D src/core/SkRefCnt.cpp View 1 1 chunk +0 lines, -13 lines 0 comments Download
M src/core/SkShader.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/core/SkStream.cpp View 1 1 chunk +0 lines, -9 lines 0 comments Download
src/core/SkTypeface.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/core/SkXfermode.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/doc/SkDocument.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/effects/SkBitmapAlphaThresholdShader.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/effects/SkLayerDrawLooper.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/effects/SkLightingImageFilter.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/gpu/GrAARectRenderer.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/gpu/GrContext.cpp View 1 1 chunk +0 lines, -3 lines 0 comments Download
M src/gpu/GrDrawTarget.cpp View 1 2 chunks +0 lines, -4 lines 0 comments Download
M src/gpu/GrEffect.cpp View 1 2 chunks +0 lines, -4 lines 0 comments Download
D src/gpu/GrGeometryBuffer.cpp View 1 1 chunk +0 lines, -10 lines 0 comments Download
M src/gpu/GrOvalRenderer.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/gpu/GrPath.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/gpu/GrPathRenderer.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/gpu/GrPathRendererChain.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/gpu/GrRenderTarget.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/gpu/GrResource.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/gpu/GrStencilBuffer.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/gpu/GrSurface.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/gpu/GrTextStrike.cpp View 1 1 chunk +0 lines, -3 lines 0 comments Download
M src/gpu/GrTexture.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/gpu/gl/GrGLCaps.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/gpu/gl/GrGLInterface.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLProgram.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLTexture.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/gpu/gl/GrGpuGL_program.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/gpu/gl/SkGLContextHelper.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/gpu/gl/debug/GrGLCreateDebugInterface.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/image/SkImage.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/image/SkImage_Gpu.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/image/SkSurface.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/image/SkSurface_Gpu.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/images/SkImageDecoder.cpp View 1 1 chunk +0 lines, -4 lines 0 comments Download
M src/images/SkMovie.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/lazy/SkBitmapFactory.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/lazy/SkLruImageCache.cpp View 1 1 chunk +0 lines, -3 lines 0 comments Download
M src/lazy/SkPurgeableImageCache.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download
M src/pdf/SkPDFFont.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/pdf/SkPDFGraphicState.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/pdf/SkPDFPage.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/pdf/SkPDFResourceDict.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/pdf/SkPDFResourceDict.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/pdf/SkPDFShader.cpp View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/pdf/SkPDFStream.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/pdf/SkPDFTypes.cpp View 1 1 chunk +0 lines, -10 lines 0 comments Download
M src/text/SkTextLayout.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/utils/SkBoundaryPatch.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/utils/SkDumpCanvas.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/utils/SkLayer.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/utils/SkUnitMappers.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/views/SkEventSink.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
src/views/SkView.cpp View 1 1 chunk +0 lines, -3 lines 0 comments Download
src/views/animated/SkWidgetViews.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M tests/GrMemoryPoolTest.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
tests/LListTest.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
tests/RefDictTest.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M tests/Test.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
tests/UtilsTest.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Kimmo Kinnunen
7 years ago (2013-12-02 09:33:02 UTC) #1
robertphillips
lgtm
7 years ago (2013-12-02 14:09:25 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/98703002/1
7 years ago (2013-12-02 14:42:43 UTC) #3
commit-bot: I haz the power
Presubmit check for 98703002-1 failed and returned exit status 1. Running presubmit commit checks ...
7 years ago (2013-12-02 14:42:47 UTC) #4
robertphillips
Brian - can you take a look?
7 years ago (2013-12-02 14:57:13 UTC) #5
bsalomon
https://codereview.chromium.org/98703002/diff/1/include/core/SkInstCnt.h File include/core/SkInstCnt.h (right): https://codereview.chromium.org/98703002/diff/1/include/core/SkInstCnt.h#newcode126 include/core/SkInstCnt.h:126: #define SK_DECLARE_INST_COUNT(className) static void AddInstChild() { INHERITED::AddInstChild(); } nice, ...
7 years ago (2013-12-02 15:19:45 UTC) #6
Kimmo Kinnunen
On 2013/12/02 15:19:45, bsalomon wrote: > https://codereview.chromium.org/98703002/diff/1/include/core/SkInstCnt.h > File include/core/SkInstCnt.h (right): > > https://codereview.chromium.org/98703002/diff/1/include/core/SkInstCnt.h#newcode126 > ...
7 years ago (2013-12-04 10:35:03 UTC) #7
bsalomon
I didn't mean to imply that you had to do all this to land it, ...
7 years ago (2013-12-04 15:03:43 UTC) #8
robertphillips
lgtm.
7 years ago (2013-12-04 15:16:02 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/98703002/40001
7 years ago (2013-12-05 06:07:44 UTC) #10
commit-bot: I haz the power
7 years ago (2013-12-05 12:08:34 UTC) #11
Message was sent while issue was closed.
Change committed as 12501

Powered by Google App Engine
This is Rietveld 408576698