aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkAAClip.cpp2
-rw-r--r--src/core/SkBitmap.cpp8
-rw-r--r--src/core/SkBitmapHeap.h6
-rw-r--r--src/core/SkCachedData.h4
-rw-r--r--src/core/SkClipStack.cpp2
-rw-r--r--src/core/SkDeviceProfile.cpp2
-rw-r--r--src/core/SkDrawable.cpp2
-rwxr-xr-xsrc/core/SkGlyphCache.cpp5
-rw-r--r--src/core/SkGlyphCache_Globals.h1
-rw-r--r--src/core/SkImageFilter.cpp9
-rw-r--r--src/core/SkMessageBus.h2
-rw-r--r--src/core/SkPaint.cpp1
-rw-r--r--src/core/SkPath.cpp3
-rw-r--r--src/core/SkPixelRef.cpp2
-rw-r--r--src/core/SkRegion.cpp2
-rw-r--r--src/core/SkRegionPriv.h2
-rw-r--r--src/core/SkResourceCache.cpp11
-rw-r--r--src/core/SkScalerContext.cpp1
-rw-r--r--src/core/SkShader.cpp4
-rw-r--r--src/core/SkString.cpp4
-rwxr-xr-xsrc/core/SkTLS.cpp9
-rw-r--r--src/core/SkTypeface.cpp1
-rw-r--r--src/core/SkTypefaceCache.cpp3
23 files changed, 47 insertions, 39 deletions
diff --git a/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp
index 19e94c8c86..902b87a6c7 100644
--- a/src/core/SkAAClip.cpp
+++ b/src/core/SkAAClip.cpp
@@ -7,11 +7,11 @@
*/
#include "SkAAClip.h"
+#include "SkAtomics.h"
#include "SkBlitter.h"
#include "SkColorPriv.h"
#include "SkPath.h"
#include "SkScan.h"
-#include "SkThread.h"
#include "SkUtils.h"
class AutoAAClipValidate {
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 8f799125e4..aa26bdcab3 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -7,6 +7,7 @@
*/
+#include "SkAtomics.h"
#include "SkBitmap.h"
#include "SkColorPriv.h"
#include "SkDither.h"
@@ -14,14 +15,13 @@
#include "SkImagePriv.h"
#include "SkMallocPixelRef.h"
#include "SkMask.h"
-#include "SkReadBuffer.h"
-#include "SkWriteBuffer.h"
+#include "SkPackBits.h"
#include "SkPixelRef.h"
-#include "SkThread.h"
+#include "SkReadBuffer.h"
#include "SkUnPreMultiply.h"
#include "SkUtils.h"
#include "SkValidationUtils.h"
-#include "SkPackBits.h"
+#include "SkWriteBuffer.h"
#include <new>
static bool reset_return_false(SkBitmap* bm) {
diff --git a/src/core/SkBitmapHeap.h b/src/core/SkBitmapHeap.h
index 07f629c77a..259d947923 100644
--- a/src/core/SkBitmapHeap.h
+++ b/src/core/SkBitmapHeap.h
@@ -12,7 +12,7 @@
#include "SkFlattenable.h"
#include "SkRefCnt.h"
#include "SkTDArray.h"
-#include "SkThread.h"
+#include "SkAtomics.h"
/**
* SkBitmapHeapEntry provides users of SkBitmapHeap (using internal storage) with a means to...
@@ -52,7 +52,7 @@ private:
class SkBitmapHeapReader : public SkRefCnt {
public:
-
+
SkBitmapHeapReader() : INHERITED() {}
virtual SkBitmap* getBitmap(int32_t slot) const = 0;
@@ -69,7 +69,7 @@ class SkBitmapHeap : public SkBitmapHeapReader {
public:
class ExternalStorage : public SkRefCnt {
public:
-
+
virtual bool insert(const SkBitmap& bitmap, int32_t slot) = 0;
diff --git a/src/core/SkCachedData.h b/src/core/SkCachedData.h
index 886ca3e7e4..6493a75e0b 100644
--- a/src/core/SkCachedData.h
+++ b/src/core/SkCachedData.h
@@ -8,7 +8,7 @@
#ifndef SkCachedData_DEFINED
#define SkCachedData_DEFINED
-#include "SkThread.h"
+#include "SkMutex.h"
class SkDiscardableMemory;
@@ -78,7 +78,7 @@ public:
#else
void validate() const {}
#endif
-
+
/*
* Attaching a data to to a SkResourceCache (only one at a time) enables the data to be
* unlocked when the cache is the only owner, thus freeing it to be purged (assuming the
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp
index e0c3db01ba..c4c68ced08 100644
--- a/src/core/SkClipStack.cpp
+++ b/src/core/SkClipStack.cpp
@@ -5,11 +5,11 @@
* found in the LICENSE file.
*/
+#include "SkAtomics.h"
#include "SkCanvas.h"
#include "SkClipStack.h"
#include "SkPath.h"
#include "SkPathOps.h"
-#include "SkThread.h"
#include <new>
diff --git a/src/core/SkDeviceProfile.cpp b/src/core/SkDeviceProfile.cpp
index 8d60151f6f..188e12b4b0 100644
--- a/src/core/SkDeviceProfile.cpp
+++ b/src/core/SkDeviceProfile.cpp
@@ -7,7 +7,7 @@
#include "SkDeviceProfile.h"
-#include "SkThread.h"
+#include "SkMutex.h"
#define DEFAULT_GAMMAEXP 2.2f
#define DEFAULT_CONTRASTSCALE 0.5f
diff --git a/src/core/SkDrawable.cpp b/src/core/SkDrawable.cpp
index 41547ee697..50522709e9 100644
--- a/src/core/SkDrawable.cpp
+++ b/src/core/SkDrawable.cpp
@@ -5,9 +5,9 @@
* found in the LICENSE file.
*/
+#include "SkAtomics.h"
#include "SkCanvas.h"
#include "SkDrawable.h"
-#include "SkThread.h"
static int32_t next_generation_id() {
static int32_t gCanvasDrawableGenerationID;
diff --git a/src/core/SkGlyphCache.cpp b/src/core/SkGlyphCache.cpp
index ec342275cc..6ae17b1074 100755
--- a/src/core/SkGlyphCache.cpp
+++ b/src/core/SkGlyphCache.cpp
@@ -9,10 +9,11 @@
#include "SkGlyphCache_Globals.h"
#include "SkGraphics.h"
#include "SkLazyPtr.h"
+#include "SkMutex.h"
#include "SkPaint.h"
#include "SkPath.h"
-#include "SkTemplates.h"
#include "SkTLS.h"
+#include "SkTemplates.h"
#include "SkTypeface.h"
//#define SPEW_PURGE_STATUS
@@ -417,8 +418,6 @@ void SkGlyphCache::invokeAndRemoveAuxProcs() {
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
-#include "SkThread.h"
-
size_t SkGlyphCache_Globals::setCacheSizeLimit(size_t newLimit) {
static const size_t minLimit = 256 * 1024;
if (newLimit < minLimit) {
diff --git a/src/core/SkGlyphCache_Globals.h b/src/core/SkGlyphCache_Globals.h
index 4bd607c598..e8f950f611 100644
--- a/src/core/SkGlyphCache_Globals.h
+++ b/src/core/SkGlyphCache_Globals.h
@@ -9,6 +9,7 @@
#define SkGlyphCache_Globals_DEFINED
#include "SkGlyphCache.h"
+#include "SkMutex.h"
#include "SkTLS.h"
#ifndef SK_DEFAULT_FONT_CACHE_COUNT_LIMIT
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 7233ec6706..394d8b20e7 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -13,12 +13,13 @@
#include "SkDevice.h"
#include "SkLazyPtr.h"
#include "SkMatrixImageFilter.h"
+#include "SkMutex.h"
#include "SkReadBuffer.h"
-#include "SkWriteBuffer.h"
#include "SkRect.h"
#include "SkTDynamicHash.h"
#include "SkTInternalLList.h"
#include "SkValidationUtils.h"
+#include "SkWriteBuffer.h"
#if SK_SUPPORT_GPU
#include "GrContext.h"
#include "GrDrawContext.h"
@@ -28,9 +29,9 @@
#ifdef SK_BUILD_FOR_IOS
enum { kDefaultCacheSize = 2 * 1024 * 1024 };
-#else
+#else
enum { kDefaultCacheSize = 128 * 1024 * 1024 };
-#endif
+#endif
static int32_t next_image_filter_unique_id() {
static int32_t gImageFilterUniqueID;
@@ -546,4 +547,4 @@ bool SkImageFilter::Proxy::filterImage(const SkImageFilter* filter, const SkBitm
SkBitmap* result, SkIPoint* offset) {
return fDevice->filterImage(filter, src, ctx, result, offset);
}
-
+
diff --git a/src/core/SkMessageBus.h b/src/core/SkMessageBus.h
index b25ab80798..6f032a1fe2 100644
--- a/src/core/SkMessageBus.h
+++ b/src/core/SkMessageBus.h
@@ -9,9 +9,9 @@
#define SkMessageBus_DEFINED
#include "SkLazyPtr.h"
+#include "SkMutex.h"
#include "SkTArray.h"
#include "SkTDArray.h"
-#include "SkThread.h"
#include "SkTypes.h"
template <typename Message>
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index f40aeff727..eae8ec70e5 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -17,6 +17,7 @@
#include "SkImageFilter.h"
#include "SkMaskFilter.h"
#include "SkMaskGamma.h"
+#include "SkMutex.h"
#include "SkReadBuffer.h"
#include "SkWriteBuffer.h"
#include "SkPaintDefaults.h"
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index daac0772dc..9381f48f3b 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -12,7 +12,6 @@
#include "SkPathPriv.h"
#include "SkPathRef.h"
#include "SkRRect.h"
-#include "SkThread.h"
////////////////////////////////////////////////////////////////////////////
@@ -1881,7 +1880,7 @@ size_t SkPath::readFromMemory(const void* storage, size_t length) {
}
unsigned version = packed & 0xFF;
-
+
fConvexity = (packed >> kConvexity_SerializationShift) & 0xFF;
fFillType = (packed >> kFillType_SerializationShift) & 0xFF;
uint8_t dir = (packed >> kDirection_SerializationShift) & 0x3;
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp
index 6e1f5c6417..082435f8c7 100644
--- a/src/core/SkPixelRef.cpp
+++ b/src/core/SkPixelRef.cpp
@@ -6,8 +6,8 @@
*/
#include "SkBitmapCache.h"
+#include "SkMutex.h"
#include "SkPixelRef.h"
-#include "SkThread.h"
#include "SkTraceEvent.h"
//#define SK_SUPPORT_LEGACY_UNBALANCED_PIXELREF_LOCKCOUNT
diff --git a/src/core/SkRegion.cpp b/src/core/SkRegion.cpp
index 24d7248582..05ba4f46a2 100644
--- a/src/core/SkRegion.cpp
+++ b/src/core/SkRegion.cpp
@@ -7,9 +7,9 @@
*/
+#include "SkAtomics.h"
#include "SkRegionPriv.h"
#include "SkTemplates.h"
-#include "SkThread.h"
#include "SkUtils.h"
/* Region Layout
diff --git a/src/core/SkRegionPriv.h b/src/core/SkRegionPriv.h
index 00feedeab8..9ddefc06cc 100644
--- a/src/core/SkRegionPriv.h
+++ b/src/core/SkRegionPriv.h
@@ -11,7 +11,7 @@
#define SkRegionPriv_DEFINED
#include "SkRegion.h"
-#include "SkThread.h"
+#include "SkAtomics.h"
#define assert_sentinel(value, isSentinel) \
SkASSERT(((value) == SkRegion::kRunTypeSentinel) == isSentinel)
diff --git a/src/core/SkResourceCache.cpp b/src/core/SkResourceCache.cpp
index f0fe72113e..6c76d350c3 100644
--- a/src/core/SkResourceCache.cpp
+++ b/src/core/SkResourceCache.cpp
@@ -8,6 +8,7 @@
#include "SkChecksum.h"
#include "SkMessageBus.h"
#include "SkMipMap.h"
+#include "SkMutex.h"
#include "SkPixelRef.h"
#include "SkResourceCache.h"
@@ -74,7 +75,7 @@ void SkResourceCache::init() {
class SkOneShotDiscardablePixelRef : public SkPixelRef {
public:
-
+
// Ownership of the discardablememory is transfered to the pixelref
SkOneShotDiscardablePixelRef(const SkImageInfo&, SkDiscardableMemory*, size_t rowBytes);
~SkOneShotDiscardablePixelRef();
@@ -236,7 +237,7 @@ static bool gDumpCacheTransactions;
void SkResourceCache::add(Rec* rec) {
this->checkMessages();
-
+
SkASSERT(rec);
// See if we already have this key (racy inserts, etc.)
Rec* existing = fHash->find(rec->getKey());
@@ -244,7 +245,7 @@ void SkResourceCache::add(Rec* rec) {
SkDELETE(rec);
return;
}
-
+
this->addToHead(rec);
fHash->add(rec);
@@ -357,7 +358,7 @@ size_t SkResourceCache::setTotalByteLimit(size_t newLimit) {
SkCachedData* SkResourceCache::newCachedData(size_t bytes) {
this->checkMessages();
-
+
if (fDiscardableFactory) {
SkDiscardableMemory* dm = fDiscardableFactory(bytes);
return dm ? SkNEW_ARGS(SkCachedData, (bytes, dm)) : NULL;
@@ -515,8 +516,6 @@ void SkResourceCache::checkMessages() {
///////////////////////////////////////////////////////////////////////////////
-#include "SkThread.h"
-
SK_DECLARE_STATIC_MUTEX(gMutex);
static SkResourceCache* gResourceCache = NULL;
static void cleanup_gResourceCache() {
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index 4ce42ddc07..b765aad97c 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -21,7 +21,6 @@
#include "SkRasterizer.h"
#include "SkRasterClip.h"
#include "SkStroke.h"
-#include "SkThread.h"
#define ComputeBWRowBytes(width) (((unsigned)(width) + 7) >> 3)
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
index f146345f9a..32984960ab 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -5,17 +5,17 @@
* found in the LICENSE file.
*/
+#include "SkAtomics.h"
#include "SkBitmapProcShader.h"
#include "SkColorShader.h"
#include "SkEmptyShader.h"
-#include "SkReadBuffer.h"
#include "SkMallocPixelRef.h"
#include "SkPaint.h"
#include "SkPicture.h"
#include "SkPictureShader.h"
+#include "SkReadBuffer.h"
#include "SkScalar.h"
#include "SkShader.h"
-#include "SkThread.h"
#include "SkWriteBuffer.h"
//#define SK_TRACK_SHADER_LIFETIME
diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp
index c10347dad1..5c63a8b515 100644
--- a/src/core/SkString.cpp
+++ b/src/core/SkString.cpp
@@ -7,9 +7,9 @@
*/
-#include "SkString.h"
+#include "SkAtomics.h"
#include "SkFixed.h"
-#include "SkThread.h"
+#include "SkString.h"
#include "SkUtils.h"
#include <stdarg.h>
#include <stdio.h>
diff --git a/src/core/SkTLS.cpp b/src/core/SkTLS.cpp
index 3f78a2434c..346fed80ce 100755
--- a/src/core/SkTLS.cpp
+++ b/src/core/SkTLS.cpp
@@ -1,3 +1,10 @@
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
#include "SkTLS.h"
// enable to help debug TLS storage
@@ -5,7 +12,7 @@
#ifdef SK_TRACE_TLS_LIFETIME
- #include "SkThread.h"
+ #include "SkAtomics.h"
static int32_t gTLSRecCount;
#endif
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp
index 2c7db68d87..c94e22f2bc 100644
--- a/src/core/SkTypeface.cpp
+++ b/src/core/SkTypeface.cpp
@@ -10,6 +10,7 @@
#include "SkFontDescriptor.h"
#include "SkFontMgr.h"
#include "SkLazyPtr.h"
+#include "SkMutex.h"
#include "SkOTTable_OS_2.h"
#include "SkStream.h"
#include "SkTypeface.h"
diff --git a/src/core/SkTypefaceCache.cpp b/src/core/SkTypefaceCache.cpp
index f253b60523..49779fcbe3 100644
--- a/src/core/SkTypefaceCache.cpp
+++ b/src/core/SkTypefaceCache.cpp
@@ -9,7 +9,8 @@
#include "SkTypefaceCache.h"
-#include "SkThread.h"
+#include "SkAtomics.h"
+#include "SkMutex.h"
#define TYPEFACE_CACHE_LIMIT 1024