aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2016-03-17 09:53:58 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-17 09:53:58 -0700
commit43812e24cbb97208d149f419f0c3f61181ba4126 (patch)
tree8fcded06a5a187a33341377c9e039ac3eb74a4c8 /src/gpu
parent57d66ddf50b31c2561526075be9c8796df209e2d (diff)
Revert of free -> reset (patchset #3 id:40001 of https://codereview.chromium.org/1811723002/ )
Reason for revert: Suspect for Win10 failures. Original issue's description: > free -> reset > > The C++ standard library uses ".reset()" where we sometimes write ".free()". > We also use ".reset()" quite a lot. This standardizes on ".reset()". > > This is one more step towards dropping SkAutoTDelete in favor of the standard > std::unique_ptr. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1811723002 > > Committed: https://skia.googlesource.com/skia/+/0e3738db89e86035ed5d4f629bf58b817b1e5274 TBR=reed@google.com,mtklein@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1813843002
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrGlyph.h6
-rw-r--r--src/gpu/GrLayerCache.cpp2
-rw-r--r--src/gpu/text/GrBatchFontCache.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/GrGlyph.h b/src/gpu/GrGlyph.h
index fb998a4947..55e925f09d 100644
--- a/src/gpu/GrGlyph.h
+++ b/src/gpu/GrGlyph.h
@@ -28,7 +28,7 @@ struct GrGlyph {
kCoverage_MaskStyle,
kDistance_MaskStyle
};
-
+
typedef uint32_t PackedID;
GrBatchAtlas::AtlasID fID;
@@ -49,7 +49,7 @@ struct GrGlyph {
fTooLargeForAtlas = GrBatchAtlas::GlyphTooLargeForAtlas(bounds.width(), bounds.height());
}
- void reset() {
+ void free() {
if (fPath) {
delete fPath;
fPath = nullptr;
@@ -86,7 +86,7 @@ struct GrGlyph {
static inline MaskStyle UnpackMaskStyle(PackedID packed) {
return ((packed >> 20) & 1) ? kDistance_MaskStyle : kCoverage_MaskStyle;
}
-
+
static inline uint16_t UnpackID(PackedID packed) {
return (uint16_t)packed;
}
diff --git a/src/gpu/GrLayerCache.cpp b/src/gpu/GrLayerCache.cpp
index 3c7ab88735..c2facbb12d 100644
--- a/src/gpu/GrLayerCache.cpp
+++ b/src/gpu/GrLayerCache.cpp
@@ -98,7 +98,7 @@ GrLayerCache::~GrLayerCache() {
SkASSERT(0 == fPictureHash.count());
// The atlas only lets go of its texture when the atlas is deleted.
- fAtlas.reset();
+ fAtlas.free();
}
void GrLayerCache::initAtlas() {
diff --git a/src/gpu/text/GrBatchFontCache.cpp b/src/gpu/text/GrBatchFontCache.cpp
index 97c55e28ad..d99df1da03 100644
--- a/src/gpu/text/GrBatchFontCache.cpp
+++ b/src/gpu/text/GrBatchFontCache.cpp
@@ -165,7 +165,7 @@ GrBatchTextStrike::GrBatchTextStrike(GrBatchFontCache* cache, const GrFontDescKe
GrBatchTextStrike::~GrBatchTextStrike() {
SkTDynamicHash<GrGlyph, GrGlyph::PackedID>::Iter iter(&fCache);
while (!iter.done()) {
- (*iter).reset();
+ (*iter).free();
++iter;
}
}