aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/SkGlyphCache.h4
-rw-r--r--src/core/SkSharedMutex.h8
-rw-r--r--src/gpu/GrLayerAtlas.cpp6
-rw-r--r--src/gpu/text/GrStencilAndCoverTextContext.cpp2
-rw-r--r--src/pdf/SkPDFDevice.cpp4
-rw-r--r--src/pdf/SkPDFDevice.h2
-rw-r--r--src/ports/SkFontHost_FreeType.cpp6
7 files changed, 16 insertions, 16 deletions
diff --git a/src/core/SkGlyphCache.h b/src/core/SkGlyphCache.h
index 2c49530e7c..8d6bae6992 100644
--- a/src/core/SkGlyphCache.h
+++ b/src/core/SkGlyphCache.h
@@ -272,7 +272,7 @@ private:
AuxProcRec* fAuxProcList;
};
-class SkAutoGlyphCache : public skstd::unique_ptr<SkGlyphCache, SkGlyphCache::AttachCacheFunctor> {
+class SkAutoGlyphCache : public std::unique_ptr<SkGlyphCache, SkGlyphCache::AttachCacheFunctor> {
public:
/** deprecated: use get() */
SkGlyphCache* getCache() const { return this->get(); }
@@ -294,7 +294,7 @@ public:
: INHERITED(paint.detachCache(surfaceProps, fakeGamma, matrix))
{}
private:
- using INHERITED = skstd::unique_ptr<SkGlyphCache, SkGlyphCache::AttachCacheFunctor>;
+ using INHERITED = std::unique_ptr<SkGlyphCache, SkGlyphCache::AttachCacheFunctor>;
};
class SkAutoGlyphCacheNoGamma : public SkAutoGlyphCache {
diff --git a/src/core/SkSharedMutex.h b/src/core/SkSharedMutex.h
index 840c2d36ad..21c9f46d64 100644
--- a/src/core/SkSharedMutex.h
+++ b/src/core/SkSharedMutex.h
@@ -14,7 +14,7 @@
#ifdef SK_DEBUG
#include "SkMutex.h"
- #include "SkUniquePtr.h"
+ #include <memory>
#endif // SK_DEBUG
// There are two shared lock implementations one debug the other is high performance. They implement
@@ -50,9 +50,9 @@ public:
private:
#ifdef SK_DEBUG
class ThreadIDSet;
- skstd::unique_ptr<ThreadIDSet> fCurrentShared;
- skstd::unique_ptr<ThreadIDSet> fWaitingExclusive;
- skstd::unique_ptr<ThreadIDSet> fWaitingShared;
+ std::unique_ptr<ThreadIDSet> fCurrentShared;
+ std::unique_ptr<ThreadIDSet> fWaitingExclusive;
+ std::unique_ptr<ThreadIDSet> fWaitingShared;
int fSharedQueueSelect{0};
mutable SkMutex fMu;
SkSemaphore fSharedQueue[2];
diff --git a/src/gpu/GrLayerAtlas.cpp b/src/gpu/GrLayerAtlas.cpp
index df8215a607..c1f8732b35 100644
--- a/src/gpu/GrLayerAtlas.cpp
+++ b/src/gpu/GrLayerAtlas.cpp
@@ -12,7 +12,7 @@
#include "GrTextureProvider.h"
///////////////////////////////////////////////////////////////////////////////
-GrLayerAtlas::Plot::Plot()
+GrLayerAtlas::Plot::Plot()
: fID(-1)
, fRects(nullptr) {
fOffset.set(0, 0);
@@ -54,7 +54,7 @@ bool GrLayerAtlas::reattachBackingTexture() {
SkASSERT(!fTexture);
fTexture.reset(fTexProvider->findAndRefTextureByUniqueKey(get_layer_atlas_key()));
- return SkToBool(fTexture);
+ return fTexture != nullptr;
}
void GrLayerAtlas::createBackingTexture() {
@@ -71,7 +71,7 @@ void GrLayerAtlas::createBackingTexture() {
fTexture->resourcePriv().setUniqueKey(get_layer_atlas_key());
}
-GrLayerAtlas::GrLayerAtlas(GrTextureProvider* texProvider, GrPixelConfig config,
+GrLayerAtlas::GrLayerAtlas(GrTextureProvider* texProvider, GrPixelConfig config,
GrSurfaceFlags flags,
const SkISize& backingTextureSize,
int numPlotsX, int numPlotsY) {
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index ab9025d316..661f22512d 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -329,7 +329,7 @@ class GrStencilAndCoverTextContext::FallbackBlobBuilder {
public:
FallbackBlobBuilder() : fBuffIdx(0), fCount(0) {}
- bool isInitialized() const { return SkToBool(fBuilder); }
+ bool isInitialized() const { return fBuilder != nullptr; }
void init(const SkPaint& font, SkScalar textRatio);
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index e349ce42fb..86d4d07acb 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -1533,10 +1533,10 @@ sk_sp<SkPDFArray> SkPDFDevice::copyMediaBox() const {
return mediaBox;
}
-skstd::unique_ptr<SkStreamAsset> SkPDFDevice::content() const {
+std::unique_ptr<SkStreamAsset> SkPDFDevice::content() const {
SkDynamicMemoryWStream buffer;
this->writeContent(&buffer);
- return skstd::unique_ptr<SkStreamAsset>(
+ return std::unique_ptr<SkStreamAsset>(
buffer.bytesWritten() > 0
? buffer.detachAsStream()
: new SkMemoryStream);
diff --git a/src/pdf/SkPDFDevice.h b/src/pdf/SkPDFDevice.h
index b1345a8e3f..b214839f5a 100644
--- a/src/pdf/SkPDFDevice.h
+++ b/src/pdf/SkPDFDevice.h
@@ -168,7 +168,7 @@ public:
/** Returns a SkStream with the page contents.
*/
- skstd::unique_ptr<SkStreamAsset> content() const;
+ std::unique_ptr<SkStreamAsset> content() const;
/** Writes the page contents to the stream. */
void writeContent(SkWStream*) const;
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 9230507662..f01c7d7cc5 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -25,7 +25,7 @@
#include "SkString.h"
#include "SkTemplates.h"
#include "SkTypes.h"
-#include "SkUniquePtr.h"
+#include <memory>
#if defined(SK_CAN_USE_DLOPEN)
#include <dlfcn.h>
@@ -802,7 +802,7 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(SkTypeface* typeface, const S
// load the font file
using UnrefFTFace = SkFunctionWrapper<void, skstd::remove_pointer_t<FT_Face>, unref_ft_face>;
- skstd::unique_ptr<skstd::remove_pointer_t<FT_Face>, UnrefFTFace> ftFace(ref_ft_face(typeface));
+ std::unique_ptr<skstd::remove_pointer_t<FT_Face>, UnrefFTFace> ftFace(ref_ft_face(typeface));
if (nullptr == ftFace) {
SkDEBUGF(("Could not create FT_Face.\n"));
return;
@@ -891,7 +891,7 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(SkTypeface* typeface, const S
}
using DoneFTSize = SkFunctionWrapper<FT_Error, skstd::remove_pointer_t<FT_Size>, FT_Done_Size>;
- skstd::unique_ptr<skstd::remove_pointer_t<FT_Size>, DoneFTSize> ftSize([&ftFace]() -> FT_Size {
+ std::unique_ptr<skstd::remove_pointer_t<FT_Size>, DoneFTSize> ftSize([&ftFace]() -> FT_Size {
FT_Size size;
FT_Error err = FT_New_Size(ftFace.get(), &size);
if (err != 0) {