diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index fe2d4bfb9646e458e72f4a90ac2ebbb16b58401b..29af01e93938b31a9a40a8716c61ac78d4d2afcd 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -2382,7 +2382,10 @@ void SkCanvas::onDrawGlyphRunList(const sktext::GlyphRunList& glyphRunList, cons #if (defined(SK_GANESH) || defined(SK_GRAPHITE)) sk_sp SkCanvas::convertBlobToSlug( const SkTextBlob& blob, SkPoint origin, const SkPaint& paint) { +#if defined(IS_OHOS) +#else TRACE_EVENT0("skia", TRACE_FUNC); +#endif auto glyphRunList = fScratchGlyphRunBuilder->blobToGlyphRunList(blob, origin); return this->onConvertGlyphRunListToSlug(glyphRunList, paint); } @@ -2499,7 +2502,10 @@ bool gSkBlobAsSlugTesting = false; void SkCanvas::drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint& paint) { +#if defined(IS_OHOS) +#else TRACE_EVENT0("skia", TRACE_FUNC); +#endif RETURN_ON_NULL(blob); RETURN_ON_FALSE(blob->bounds().makeOffset(x, y).isFinite()); diff --git a/src/core/SkChromeRemoteGlyphCache.cpp b/src/core/SkChromeRemoteGlyphCache.cpp index 9ef89ccfe959b4d9f9e46bb4a0a9092e215cffe0..1117c012209ebafe9ba67c747282985d6a219859 100644 --- a/src/core/SkChromeRemoteGlyphCache.cpp +++ b/src/core/SkChromeRemoteGlyphCache.cpp @@ -665,6 +665,8 @@ void SkStrikeServerImpl::checkForDeletedEntries() { sk_sp SkStrikeServerImpl::getOrCreateCache(const SkStrikeSpec& strikeSpec) { // In cases where tracing is turned off, make sure not to get an unused function warning. // Lambdaize the function. +#if defined(IS_OHOS) +#else TRACE_EVENT1("skia", "RecForDesc", "rec", TRACE_STR_COPY( [&strikeSpec](){ @@ -676,6 +678,7 @@ sk_sp SkStrikeServerImpl::getOrCreateCache(const SkStrikeSpec& str }().c_str() ) ); +#endif if (auto it = fDescToRemoteStrike.find(&strikeSpec.descriptor()); it != fDescToRemoteStrike.end())