skia2/include/core
mtklein 7b274c78fb Port SkRefCnt.h to new SkAtomics.h
This adds sk_memory_barrier(), implemented using sk_atomic_fetch_add() on an uninitialized variable.  If that becomes a problem we can drop this to the porting layer, using std::atomic_thread_fence() / __atomic_thread_fence() / __sync_synchronize().

The big win is that ref() doesn't generate a memory barrier any more on ARM.
This is an instance of SkSafeRef() in SkPaint(const SkPaint&) after this CL:
     4d0:       684a            ldr     r2, [r1, #4]
     4d2:       6018            str     r0, [r3, #0]
     4d4:       b13a            cbz     r2, 4e6 <_ZN7SkPaintC1ERKS_+0x2e>
     4d6:       1d10            adds    r0, r2, #4
     4d8:       e850 4f00       ldrex   r4, [r0]
     4dc:       3401            adds    r4, #1
     4de:       e840 4500       strex   r5, r4, [r0]
     4e2:       2d00            cmp     r5, #0
     4e4:       d1f8            bne.n   4d8 <_ZN7SkPaintC1ERKS_+0x20>

Here's the before,  pretty much the same with two memory barriers surrounding the ref():
     4d8:       684a            ldr     r2, [r1, #4]
     4da:       6018            str     r0, [r3, #0]
     4dc:       b15a            cbz     r2, 4f6 <_ZN7SkPaintC1ERKS_+0x3e>
     4de:       1d10            adds    r0, r2, #4
     4e0:       f3bf 8f5f       dmb     sy
     4e4:       e850 4f00       ldrex   r4, [r0]
     4e8:       3401            adds    r4, #1
     4ea:       e840 4500       strex   r5, r4, [r0]
     4ee:       2d00            cmp     r5, #0
     4f0:       d1f8            bne.n   4e4 <_ZN7SkPaintC1ERKS_+0x2c>
     4f2:       f3bf 8f5f       dmb     sy

The miscellaneous files in here are just fixups to explicitly include SkMutex.h,
instead of leeching it off SkRefCnt.h.

No public API changes.
TBR=reed@google.com

Build trybots seem hosed.
NOTRY=true

BUG=skia:

Review URL: https://codereview.chromium.org/896803002
2015-02-03 13:38:58 -08:00
..
SkAdvancedTypefaceMetrics.h
SkAnnotation.h
SkAtomics.h Atomics overhaul. 2015-02-02 12:22:07 -08:00
SkBBHFactory.h Remove unused TileGridInfo 2015-01-20 05:57:06 -08:00
SkBitmap.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkBitmapDevice.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkBlitRow.h rename blitrow::proc and add (uncalled) hook for colorproc16 2015-01-13 13:51:00 -08:00
SkBlurTypes.h
SkCanvas.h Disable LCD text when rasterizing SkPictureShader tiles. 2015-02-02 05:25:04 -08:00
SkChunkAlloc.h
SkClipStack.h
SkColor.h
SkColorFilter.h Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. 2014-12-01 11:47:08 -08:00
SkColorPriv.h
SkColorTable.h Flail a little against LLVM crash. 2014-12-02 13:17:06 -08:00
SkComposeShader.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkData.h Stop overloading internal_dispose in SkTextBlob and SkData 2014-11-20 08:02:46 -08:00
SkDataTable.h
SkDeque.h
SkDevice.h remove dead SK_SUPPORT_LEGACY_DEVICE_CLEAR code 2014-12-21 11:03:36 -08:00
SkDither.h
SkDocument.h
SkDraw.h pass dst-rect through from drawBitmapRect for better precision 2014-12-15 13:42:51 -08:00
SkDrawFilter.h
SkDrawLooper.h SkDrawLooper: No need for virtual bounds computation methods. 2014-12-01 13:03:22 -08:00
SkDrawPictureCallback.h Rename SkDrawPictureCallback to SkPicture::AbortCallback 2015-01-07 07:28:41 -08:00
SkDynamicAnnotations.h Look at DYNAMIC_ANNOTATIONS_ENABLED now. 2014-12-15 13:38:07 -08:00
SkEndian.h
SkError.h
SkFilterQuality.h add newImage API 2015-01-23 05:58:07 -08:00
SkFixed.h Switch SkBitmapProcState's SkFractionalInt to 32.32. 2014-11-21 12:10:33 -08:00
SkFlattenable.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkFlattenableSerialization.h
SkFloatBits.h
SkFloatingPoint.h use log2(scale) to compute mip level 2015-01-16 08:35:09 -08:00
SkFont.h
SkFontHost.h
SkFontLCDConfig.h
SkFontStyle.h
SkGraphics.h
SkImage.h initial preroll api 2015-01-25 10:33:58 -08:00
SkImageDecoder.h Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
SkImageEncoder.h add const to encodePixels pixel parameter 2014-12-19 12:26:07 -08:00
SkImageFilter.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkImageGenerator.h need to rebaseline (changed) c_gms, update dox 2015-01-07 18:20:16 -08:00
SkImageInfo.h export SkImageInfo 2015-01-30 14:54:38 -08:00
SkInstCnt.h DM: wire up --leaks / -l again 2015-02-02 13:24:37 -08:00
SkLazyPtr.h
SkMallocPixelRef.h Update comment for SkMallocPixelRef::NewWithProc. 2015-01-29 13:52:13 -08:00
SkMask.h
SkMaskFilter.h remove view matrix from context 2014-12-17 15:50:11 -08:00
SkMath.h Disable the noisiest /analyze warning in Chrome. ~3,700/12,000 2015-01-30 12:57:50 -08:00
SkMatrix.h remove dead SkPersp macros 2015-01-20 19:58:36 -08:00
SkMetaData.h
SkMultiPictureDraw.h Add a flag to flush the canvases during SkMultiPictureDraw::draw(). 2015-01-28 11:01:06 -08:00
SkMutex.h Atomics overhaul. 2015-02-02 12:22:07 -08:00
SkOnce.h namespace {} trick for SK_DECLARE_STATIC_ONCE 2015-01-13 08:40:23 -08:00
SkOSFile.h
SkPackBits.h
SkPaint.h add newImage API 2015-01-23 05:58:07 -08:00
SkPath.h share code between arcTo and addArc, update dox 2015-01-29 12:59:11 -08:00
SkPathEffect.h Add patheffects to debugger printout 2015-01-26 06:08:52 -08:00
SkPathMeasure.h use conics 2014-12-17 08:21:05 -08:00
SkPathRef.h Fix rrects that are large enough that we lose/gain a bit when we add the radius to a bounds coordinate. 2014-12-15 12:28:33 -08:00
SkPicture.h initial preroll api 2015-01-25 10:33:58 -08:00
SkPictureRecorder.h Remove legacy Picture defines. 2014-12-19 07:28:00 -08:00
SkPixelRef.h Remove unused globalRef/globalUnref. 2015-01-30 07:34:48 -08:00
SkPixelSerializer.h add const to encodePixels pixel parameter 2014-12-19 12:26:07 -08:00
SkPoint.h Rewrite NaN checks in terms of SkScalarIsNaN() 2014-12-15 12:08:47 -08:00
SkPostConfig.h Move sync code to include/, switch from using platform define to a proxy header in core/ 2015-01-21 13:13:31 -08:00
SkPreConfig.h
SkRasterizer.h Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. 2014-12-01 11:47:08 -08:00
SkRect.h It is dangerous to ignore SkRect::intersect's return value 2015-01-07 12:16:10 -08:00
SkRefCnt.h Port SkRefCnt.h to new SkAtomics.h 2015-02-03 13:38:58 -08:00
SkRegion.h
SkRRect.h Fill SkRRect::fType proactively. 2014-12-18 13:29:54 -08:00
SkScalar.h use log2(scale) to compute mip level 2015-01-16 08:35:09 -08:00
SkShader.h Remove unused hasLocalMatrix. 2015-01-30 07:14:04 -08:00
SkSize.h
SkStream.h Remove staging SkStream::unref(). 2015-01-22 06:08:31 -08:00
SkString.h
SkStrokeRec.h Add color emoji fallback for nvpr text 2014-12-01 08:38:55 -08:00
SkSurface.h Remove deprecated SkSurface::NewRenderTarget factories 2015-01-23 11:02:50 -08:00
SkSurfaceProps.h add SkImage::newSurface 2014-11-21 08:46:38 -08:00
SkTArray.h
SkTDArray.h Remove debug-only fData from SKTDArray. 2014-11-19 09:41:27 -08:00
SkTDict.h
SkTDStack.h
SkTemplates.h Adding check on input count 2015-01-07 13:28:08 -08:00
SkTextBlob.h Conservative SkTextBlob bounds. 2015-01-28 10:56:06 -08:00
SkThread.h Atomics overhaul. 2015-02-02 12:22:07 -08:00
SkThreadPriv.h Atomics overhaul. 2015-02-02 12:22:07 -08:00
SkTime.h
SkTInternalLList.h
SkTLazy.h
SkTRegistry.h
SkTSearch.h
SkTypeface.h SkTypeface to use SkStreamAsset. 2015-01-27 05:39:10 -08:00
SkTypes.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkUnPreMultiply.h
SkUtils.h
SkWeakRefCnt.h Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
SkWriteBuffer.h Replace EncodeBitmap with an interface. 2014-12-11 10:53:58 -08:00
SkWriter32.h Make SkWriter32::snapshotAsData() a dumb copy. 2015-01-29 12:03:53 -08:00
SkXfermode.h Remove the need for asCoeff in SkXfermode. 2015-01-22 06:52:29 -08:00