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 [PDF] Fix font embedding restrictions. 2014-06-19 11:05:39 -07:00
SkAnnotation.h Factory methods for heap-allocated SkAnnotation objects. 2014-02-27 11:47:36 +00:00
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 move common blur types into central header 2014-04-28 16:25:35 +00:00
SkCanvas.h Disable LCD text when rasterizing SkPictureShader tiles. 2015-02-02 05:25:04 -08:00
SkChunkAlloc.h combine glyph and image bulk alloc, and adjust initial alloc size, to reduce total waste from 50% to 30% 2013-06-19 19:25:36 +00:00
SkClipStack.h Add dump() to SkClipStack to help with debugging. 2014-06-09 07:59:06 -07:00
SkColor.h SkAlpha constant defs 2013-07-19 17:43:27 +00:00
SkColorFilter.h Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. 2014-12-01 11:47:08 -08:00
SkColorPriv.h Address MSVC warnings about possible value truncation. In the process removes some apparently unused code. 2014-09-02 13:40:48 -07:00
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 Remove SkDataTable from SkFlattenable hierarchy. 2013-10-15 20:39:57 +00:00
SkDeque.h This CL addresses "SkCanvas::save flags are not respected by GPU backend" (https://code.google.com/p/skia/issues/detail?id=1503). 2013-08-16 00:53:34 +00:00
SkDevice.h remove dead SK_SUPPORT_LEGACY_DEVICE_CLEAR code 2014-12-21 11:03:36 -08:00
SkDither.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkDocument.h SkDocument SK_API 2014-11-14 13:24:18 -08:00
SkDraw.h pass dst-rect through from drawBitmapRect for better precision 2014-12-15 13:42:51 -08:00
SkDrawFilter.h Add GPU support for roundrects 2013-04-25 15:27:00 +00:00
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 fix size_t/int warnings 2014-04-23 19:19:44 +00:00
SkError.h Sanitizing source files in Housekeeper-Nightly 2013-09-05 07:01:19 +00:00
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 Removed unnecessary define 2013-11-08 15:24:12 +00:00
SkFloatBits.h remove unused SkIntToFloatCast_NoOverflowCheck 2014-08-19 07:39:41 -07:00
SkFloatingPoint.h use log2(scale) to compute mip level 2015-01-16 08:35:09 -08:00
SkFont.h Treat embedded bitmaps as a hinting method. 2014-08-19 13:18:58 -07:00
SkFontHost.h Remove a layer of indirection and code from SkFontHost. 2014-09-10 15:49:48 -07:00
SkFontLCDConfig.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-03-13 07:01:04 +00:00
SkFontStyle.h Replace SkTypeface::Style with SkFontStyle. 2014-10-20 13:33:19 -07:00
SkGraphics.h Cleanup: Remove unused InstallNewHandler() function from SkGraphics. 2014-11-05 07:20:51 -08:00
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 Add SkTypeface::getBounds() 2014-10-22 13:20:58 -07:00
SkMallocPixelRef.h Update comment for SkMallocPixelRef::NewWithProc. 2015-01-29 13:52:13 -08:00
SkMask.h remove unused kLCD_MaskFormat 2014-11-13 14:39:58 -08:00
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 "NULL !=" = NULL 2014-09-05 13:34:00 -07:00
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 Add option to dump images from nanobench. 2014-08-07 14:28:50 -07:00
SkPackBits.h Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
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 Remove copile time enabling of SK_ARM_HAS_NEON. 2014-08-01 09:21:19 -04:00
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 Add dump() to SkClipStack to help with debugging. 2014-06-09 07:59:06 -07:00
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 deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients 2013-12-17 19:22:07 +00:00
SkStream.h Remove staging SkStream::unref(). 2015-01-22 06:08:31 -08:00
SkString.h document the SkStrAppend methods 2014-11-07 07:37:33 -08:00
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 Enable unused param checking for public includes. 2014-11-14 11:11:46 -08:00
SkTDArray.h Remove debug-only fData from SKTDArray. 2014-11-19 09:41:27 -08:00
SkTDict.h move some headers out of public 2014-06-17 09:04:45 -07:00
SkTDStack.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
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 Revert of Add nanosecond timer. (https://codereview.chromium.org/250243002/) 2014-04-24 20:17:24 +00:00
SkTInternalLList.h "NULL !=" = NULL 2014-09-05 13:34:00 -07:00
SkTLazy.h "NULL !=" = NULL 2014-09-05 13:34:00 -07:00
SkTRegistry.h Rewrite SkTRegistry to take any trivially-copyable type. 2013-09-04 17:20:18 +00:00
SkTSearch.h One SkTSearch to rule them all. Allow key to be of different type than the array. 2013-05-17 19:05:03 +00:00
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 Factor out UnPreMultiplyPreservingByteOrder 2014-01-15 22:24:58 +00:00
SkUtils.h SSE2 implementation of memcpy32 2014-05-21 12:43:07 +00:00
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