Rename SkDescriptor::equals to SkDescriptor::operator==
BUG=chromium:608566 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1986253002 Review-Url: https://codereview.chromium.org/1986253002
This commit is contained in:
parent
ca6eafc0f7
commit
c5d07faced
@ -85,7 +85,7 @@ public:
|
||||
return desc;
|
||||
}
|
||||
|
||||
bool equals(const SkDescriptor& other) const {
|
||||
bool operator==(const SkDescriptor& other) const {
|
||||
// probe to see if we have a good checksum algo
|
||||
// SkASSERT(a.fChecksum != b.fChecksum || memcmp(&a, &b, a.fLength) == 0);
|
||||
|
||||
|
@ -529,7 +529,7 @@ SkGlyphCache* SkGlyphCache::VisitCache(SkTypeface* typeface,
|
||||
globals.validate();
|
||||
|
||||
for (cache = globals.internalGetHead(); cache != nullptr; cache = cache->fNext) {
|
||||
if (cache->fDesc->equals(*desc)) {
|
||||
if (*cache->fDesc == *desc) {
|
||||
globals.internalDetachCache(cache);
|
||||
if (!proc(cache, context)) {
|
||||
globals.internalAttachCacheToHead(cache);
|
||||
|
@ -71,9 +71,7 @@ public:
|
||||
fScalerContext->getPath(skGlyph, out);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
bool isEqualTo(const SkDescriptor& desc) const override {
|
||||
return fDesc->equals(desc);
|
||||
}
|
||||
bool isEqualTo(const SkDescriptor& desc) const override { return *fDesc == desc; }
|
||||
#endif
|
||||
private:
|
||||
const SkAutoTDelete<SkScalerContext> fScalerContext;
|
||||
|
@ -511,13 +511,13 @@ void GrAtlasTextBlob::AssertEqual(const GrAtlasTextBlob& l, const GrAtlasTextBlo
|
||||
|
||||
SkASSERT_RELEASE(lRun.fDescriptor.getDesc());
|
||||
SkASSERT_RELEASE(rRun.fDescriptor.getDesc());
|
||||
SkASSERT_RELEASE(lRun.fDescriptor.getDesc()->equals(*rRun.fDescriptor.getDesc()));
|
||||
SkASSERT_RELEASE(*lRun.fDescriptor.getDesc() == *rRun.fDescriptor.getDesc());
|
||||
|
||||
if (lRun.fOverrideDescriptor.get()) {
|
||||
SkASSERT_RELEASE(lRun.fOverrideDescriptor->getDesc());
|
||||
SkASSERT_RELEASE(rRun.fOverrideDescriptor.get() && rRun.fOverrideDescriptor->getDesc());
|
||||
SkASSERT_RELEASE(lRun.fOverrideDescriptor->getDesc()->equals(
|
||||
*rRun.fOverrideDescriptor->getDesc()));
|
||||
SkASSERT_RELEASE(*lRun.fOverrideDescriptor->getDesc() ==
|
||||
*rRun.fOverrideDescriptor->getDesc());
|
||||
} else {
|
||||
SkASSERT_RELEASE(!rRun.fOverrideDescriptor.get());
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ void GrAtlasTextBlob::regenInBatch(GrDrawBatch::Target* target,
|
||||
run->fOverrideDescriptor->getDesc() :
|
||||
run->fDescriptor.getDesc();
|
||||
if (!*cache || !SkTypeface::Equal(*typeface, run->fTypeface) ||
|
||||
!((*desc)->equals(*newDesc))) {
|
||||
!(**desc == *newDesc)) {
|
||||
if (*cache) {
|
||||
SkGlyphCache::AttachCache(*cache);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
uint32_t getHash() const { return fHash; }
|
||||
|
||||
bool operator==(const GrFontDescKey& rh) const {
|
||||
return fHash == rh.fHash && fDesc.getDesc()->equals(*rh.fDesc.getDesc());
|
||||
return fHash == rh.fHash && *fDesc.getDesc() == *rh.fDesc.getDesc();
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user