Revert "spanification: Add SK_UNSAFE_TODO in gpu/graphite (1/7)"

This reverts commit 2a685534004f400aab598ab05423cd64a4c9168d.

Reason for revert: Seems to be breaking the Chrome roll with:

../../third_party/skia/src/gpu/graphite/task/CopyTask.cpp:139:9: error: use of undeclared identifier 'SkLog'
  139 |         SKIA_LOG_E("Unable to copy between textures of different formats, src = %s, dst = %s",
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  140 |                     TextureFormatName(srcFormat), TextureFormatName(dstFormat));
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/skia/include/private/SkLog.h:39:30: note: expanded from macro 'SKIA_LOG_E'

Failure Link: <LINK TO FAILURE>

Original change's description:
> spanification: Add SK_UNSAFE_TODO in gpu/graphite (1/7)
>
> As part of the effort to enforce -Wunsafe-buffer-usage across Skia, this
> patch inserts SK_UNSAFE_TODO macro in targeted lines that trigger the
> warning in a subset of files in the gpu/graphite directory, and deletes
> their file level check exclusion in unsafe_buffers_mappings.
>
> Upcoming follow-up work includes:
> - Refactoring existing code to use safe constructs (e.g., spans).
> - Expanding enforcement across directories beyond gpu/graphite.
>
> This CL introduces no behavior changes.
>
> Automated via: https://paste.googleplex.com/4903479387226112
> Design doc: http://go/unsafe-buffer-skia
>
> Bug: b/565401613
> Change-Id: I066e76247aa5fdfc4b204b6b0301542d17b92f21
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1375836
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Auto-Submit: Francisco Ochoa <frankchavez@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

Bug: b/565401613
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ib6dc42124a5ef2a4775fff54e551143804864c13
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1381656
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/include/private/SkLog.h b/include/private/SkLog.h
index 3f09b65..8fb56f51 100644
--- a/include/private/SkLog.h
+++ b/include/private/SkLog.h
@@ -32,7 +32,7 @@
 #define SKIA_LOG(priority, fmt, ...)                                           \
     do {                                                                       \
         if constexpr (priority <= SKIA_LOWEST_ACTIVE_LOG_PRIORITY) {           \
-            SK_UNSAFE_TODO(SkLog)(priority, "[skia] " fmt "\n", ##__VA_ARGS__);  \
+            SkLog(priority, "[skia] " fmt "\n", ##__VA_ARGS__);                \
         }                                                                      \
     } while (0)
 
diff --git a/src/core/SkTraceEventCommon.h b/src/core/SkTraceEventCommon.h
index c2ec41e..34c6011 100644
--- a/src/core/SkTraceEventCommon.h
+++ b/src/core/SkTraceEventCommon.h
@@ -5,7 +5,6 @@
 #define SkTraceEventCommon_DEFINED
 
 #include "include/core/SkTypes.h"
-#include "include/private/SkAttributes.h"
 #include "include/utils/SkTraceEventPhase.h"
 
 // Trace events are for tracking application performance and resource usage.
@@ -217,8 +216,7 @@
 template <typename... Args>
 static inline void sk_noop(Args...) {}
 #define TRACE_EMPTY(...) do { sk_noop(__VA_ARGS__); } while (0)
-#define TRACE_EMPTY_FMT(fmt, ...) \
-    do { SK_UNSAFE_TODO(skprintf_like_noop)(fmt, ##__VA_ARGS__); } while (0)
+#define TRACE_EMPTY_FMT(fmt, ...) do { skprintf_like_noop(fmt, ##__VA_ARGS__); } while (0)
 #else
 #define TRACE_EMPTY(...) do {} while (0)
 #define TRACE_EMPTY_FMT(fmt, ...) do {} while (0)
@@ -238,7 +236,7 @@
     #define TRACE_EVENT_INSTANT0(cg, n, scope) TRACE_EMPTY(cg, n, scope)
     #define TRACE_EVENT_INSTANT1(cg, n, scope, a1n, a1v) TRACE_EMPTY(cg, n, scope, a1n, a1v)
     #define TRACE_EVENT_INSTANT2(cg, n, scope, a1n, a1v, a2n, a2v)  \
-        SK_UNSAFE_TODO(TRACE_EMPTY(cg, n, scope, a1n, a1v, a2n, a2v))
+        TRACE_EMPTY(cg, n, scope, a1n, a1v, a2n, a2v)
     #define TRACE_EVENT_INSTANT0_ALWAYS(cg, n, scope) TRACE_EMPTY(cg, n, scope)
     #define TRACE_EVENT_INSTANT1_ALWAYS(cg, n, scope, a1n, a1v) TRACE_EMPTY(cg, n, scope, a1n, a1v)
     #define TRACE_EVENT_INSTANT2_ALWAYS(cg, n, scope, a1n, a1v, a2n, a2v)  \
@@ -469,9 +467,8 @@
 #define ATRACE_ANDROID_FRAMEWORK(fmt, ...)                                                  \
     char SK_PERFETTO_UID(skTraceStrBuf)[SK_ANDROID_FRAMEWORK_ATRACE_BUFFER_SIZE];           \
     if (SkAndroidFrameworkTraceUtil::getEnableTracing()) {                                  \
-        SK_UNSAFE_TODO(snprintf)(SK_PERFETTO_UID(skTraceStrBuf),                            \
-                                 SK_ANDROID_FRAMEWORK_ATRACE_BUFFER_SIZE,                   \
-                                 fmt, ##__VA_ARGS__);                                       \
+        snprintf(SK_PERFETTO_UID(skTraceStrBuf), SK_ANDROID_FRAMEWORK_ATRACE_BUFFER_SIZE,   \
+                 fmt, ##__VA_ARGS__);                                                       \
     }                                                                                       \
     TRACE_EVENT0("skia.android", TRACE_STR_COPY(SK_PERFETTO_UID(skTraceStrBuf)))
 
@@ -531,9 +528,8 @@
 
 #define TRACE_EVENT_INSTANT2(category_group, name, scope, arg1_name, arg1_val,      \
                              arg2_name, arg2_val)                                   \
-    do { SK_UNSAFE_TODO(TRACE_EVENT_ATRACE_OR_PERFETTO(category_group, name,       \
-                                                       arg1_name, arg1_val,        \
-                                                       arg2_name, arg2_val);) } while(0)
+    do { TRACE_EVENT_ATRACE_OR_PERFETTO(category_group, name, arg1_name, arg1_val,  \
+                                        arg2_name, arg2_val); } while(0)
 
 // As above but appends the ".always" suffix
 #define TRACE_EVENT_INSTANT0_ALWAYS(category_group, name, scope) \
@@ -629,9 +625,9 @@
 
 #define TRACE_EVENT_INSTANT2(category_group, name, scope, arg1_name, arg1_val, \
                              arg2_name, arg2_val)                              \
-  SK_UNSAFE_TODO(INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name,    \
-                                          TRACE_EVENT_FLAG_NONE | scope, arg1_name, arg1_val, \
-                                          arg2_name, arg2_val))
+  INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name,    \
+                           TRACE_EVENT_FLAG_NONE | scope, arg1_name, arg1_val, \
+                           arg2_name, arg2_val)
 
 #define TRACE_EVENT_INSTANT0_ALWAYS(category_group, name, scope)            \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \
diff --git a/src/gpu/graphite/BufferManager.cpp b/src/gpu/graphite/BufferManager.cpp
index 3c31859..44baa6a 100644
--- a/src/gpu/graphite/BufferManager.cpp
+++ b/src/gpu/graphite/BufferManager.cpp
@@ -10,7 +10,6 @@
 #include "include/gpu/graphite/Recording.h"
 #include "include/private/SkAlign.h"
 #include "include/private/SkAssert.h"
-#include "include/private/SkAttributes.h"
 #include "include/private/SkLog.h"
 #include "include/private/SkMath.h"
 #include "include/private/SkTo.h"
@@ -535,7 +534,7 @@
     if (alignedCount > count) {
         const uint32_t byteDiff = (alignedCount - count) * stride;
         void* zPtr = SkTAddOffset<void>(data, count * stride);
-        SK_UNSAFE_TODO(memset(zPtr, 0, byteDiff));
+        memset(zPtr, 0, byteDiff);
     }
     return VertexWriter{data, size};
 }
diff --git a/src/gpu/graphite/ClipAtlasManager.cpp b/src/gpu/graphite/ClipAtlasManager.cpp
index d77f52b..ec06118 100644
--- a/src/gpu/graphite/ClipAtlasManager.cpp
+++ b/src/gpu/graphite/ClipAtlasManager.cpp
@@ -14,7 +14,6 @@
 #include "include/core/SkSize.h"
 #include "include/gpu/graphite/Recorder.h"
 #include "include/private/SkAssert.h"
-#include "include/private/SkAttributes.h"
 #include "include/private/SkMalloc.h"
 #include "include/private/SkTArray.h"
 #include "src/core/SkAutoPixmapStorage.h"
@@ -214,7 +213,7 @@
                                      topLeft.y() + kEntryPadding + subsetRelativePos.y());
             fDrawAtlas->setLastUseToken(entry->fLocator,
                                         recorder->priv().tokenTracker()->nextFlushToken());
-            return SK_UNSAFE_TODO(fDrawAtlas->getProxies()[entry->fLocator.pageIndex()]);
+            return fDrawAtlas->getProxies()[entry->fLocator.pageIndex()];
         }
         entry = entry->fNext;
     }
@@ -301,7 +300,7 @@
     fDrawAtlas->setLastUseToken(*locator,
                                 recorder->priv().tokenTracker()->nextFlushToken());
 
-    return SK_UNSAFE_TODO(fDrawAtlas->getProxies()[locator->pageIndex()]);
+    return fDrawAtlas->getProxies()[locator->pageIndex()];
 }
 
 bool ClipAtlasManager::DrawAtlasMgr::recordUploads(DrawContext* dc, Recorder* recorder) {
diff --git a/src/gpu/graphite/ClipStack.cpp b/src/gpu/graphite/ClipStack.cpp
index 5e8d407..bafd3dca 100644
--- a/src/gpu/graphite/ClipStack.cpp
+++ b/src/gpu/graphite/ClipStack.cpp
@@ -19,7 +19,6 @@
 #include "include/core/SkSpan.h"
 #include "include/core/SkStrokeRec.h"
 #include "include/gpu/graphite/Recorder.h"
-#include "include/private/SkAttributes.h"
 #include "include/private/SkDebug.h"
 #include "include/private/SkEnumBitMask.h"
 #include "include/private/SkFloatingPoint.h"
@@ -426,14 +425,13 @@
         fLocalToDevice.inverseMapPoints(deviceQuad, localQuad, 4);
         for (int i = 0; i < 4; ++i) {
             // TODO: Would be nice to make this consistent with how the GPU clips NDC w.
-            if (SK_UNSAFE_TODO(deviceQuad[i].w < SkPathPriv::kW0PlaneDistance) ||
-                SK_UNSAFE_TODO(localQuad[i].w < SkPathPriv::kW0PlaneDistance)) {
+            if (deviceQuad[i].w < SkPathPriv::kW0PlaneDistance ||
+                localQuad[i].w < SkPathPriv::kW0PlaneDistance) {
                 // Something in O actually projects behind the W = 0 plane and would be clipped
                 // to infinity, so it's extremely unlikely that this contains O.
                 return false;
             }
-            if (SK_UNSAFE_TODO(!fShape.conservativeContains(skvx::float2::Load(localQuad + i) /
-                                                            localQuad[i].w))) {
+            if (!fShape.conservativeContains(skvx::float2::Load(localQuad + i) / localQuad[i].w)) {
                 return false;
             }
         }
diff --git a/src/gpu/graphite/Context.cpp b/src/gpu/graphite/Context.cpp
index dfc5166..c92d895 100644
--- a/src/gpu/graphite/Context.cpp
+++ b/src/gpu/graphite/Context.cpp
@@ -34,7 +34,6 @@
 #include "include/gpu/graphite/Surface.h"
 #include "include/private/SingleOwner.h"
 #include "include/private/SkAlign.h"
-#include "include/private/SkAttributes.h"
 #include "include/private/SkEnumBitMask.h"
 #include "include/private/SkLog.h"
 #include "include/private/SkMutex.h"
@@ -709,7 +708,7 @@
     // This matrix generates (r,g,b,a) = (0, 0, 0, y)
     float yM[20];
     std::fill_n(yM, 15, 0.f);
-    SK_UNSAFE_TODO(std::copy_n(baseM + 0, 5, yM + 15));
+    std::copy_n(baseM + 0, 5, yM + 15);
     if (!copyPlane(yaInfo, "AsyncReadPixelsYPlane", yM, texMatrix, &transfers[0])) {
         return params.fail();
     }
@@ -731,7 +730,7 @@
     // This matrix generates (r,g,b,a) = (0, 0, 0, u)
     float uM[20];
     std::fill_n(uM, 15, 0.f);
-    SK_UNSAFE_TODO(std::copy_n(baseM + 5, 5, uM + 15));
+    std::copy_n(baseM + 5, 5, uM + 15);
     if (!copyPlane(uvInfo, "AsyncReadPixelsUPlane", uM, texMatrix, &transfers[1])) {
         return params.fail();
     }
@@ -739,7 +738,7 @@
     // This matrix generates (r,g,b,a) = (0, 0, 0, v)
     float vM[20];
     std::fill_n(vM, 15, 0.f);
-    SK_UNSAFE_TODO(std::copy_n(baseM + 10, 5, vM + 15));
+    std::copy_n(baseM + 10, 5, vM + 15);
     if (!copyPlane(uvInfo, "AsyncReadPixelsVPlane", vM, texMatrix, &transfers[2])) {
         return params.fail();
     }
@@ -912,10 +911,9 @@
                                                                        const void* src) {
             if (flipY) {
                 for (int y = 0; y < dstInfo.height(); ++y) {
-                    const auto* srcRow = SK_UNSAFE_TODO(static_cast<const char*>(src) +
-                                                        (dstInfo.height() - 1 - y) * rowBytes);
-                    auto* dstRow =
-                            SK_UNSAFE_TODO(static_cast<char*>(dst) + y * dstInfo.minRowBytes());
+                    const auto* srcRow = static_cast<const char*>(src) +
+                                         (dstInfo.height() - 1 - y) * rowBytes;
+                    auto* dstRow = static_cast<char*>(dst) + y * dstInfo.minRowBytes();
                     cpuXferFn.run(dstInfo.width(), 1,
                                   srcRow, rowBytes,
                                   dstRow, dstInfo.minRowBytes());
diff --git a/src/gpu/graphite/Device.cpp b/src/gpu/graphite/Device.cpp
index 31e8303..140834b 100644
--- a/src/gpu/graphite/Device.cpp
+++ b/src/gpu/graphite/Device.cpp
@@ -40,7 +40,6 @@
 #include "include/gpu/graphite/TextureInfo.h"
 #include "include/private/SingleOwner.h"
 #include "include/private/SkAssert.h"
-#include "include/private/SkAttributes.h"
 #include "include/private/SkFloatingPoint.h"
 #include "include/private/SkTo.h"
 #include "src/core/SkArenaAlloc.h"
@@ -1296,7 +1295,7 @@
                 break;
             }
 
-            SK_UNSAFE_TODO(strokeCorners[i]) = {strokeCorner, strokeCorner};
+            strokeCorners[i] = {strokeCorner, strokeCorner};
             validCorners++;
         }
 
@@ -1443,20 +1442,19 @@
     // SkPaint paintWithShader(paint);
     int dstClipIndex = 0;
     for (int i = 0; i < count; ++i) {
-        const auto& entry = SK_UNSAFE_TODO(set[i]);
         // If the entry is clipped by 'dstClips', that must be provided
-        SkASSERT(!entry.fHasClip || dstClips);
+        SkASSERT(!set[i].fHasClip || dstClips);
         // Similarly, if it has an extra transform, those must be provided
-        SkASSERT(entry.fMatrixIndex < 0 || preViewMatrices);
+        SkASSERT(set[i].fMatrixIndex < 0 || preViewMatrices);
 
         // See SkImageShader::MakeForDrawRect, as this behavior is consistent but avoids
         // allocating SkShader objects or having to modify the SkPaint.
         // Adjust `dst` such that it only samples from the portion of fSrcRect that overlaps with
         // the image bounds. This "decal" effect is applied geometrically to what is drawn so that
         // actual texture tiling can be clamped to the src rect.
-        const SkRect imageBounds = SkRect::Make(entry.fImage->bounds());
-        SkRect dstToDraw = entry.fDstRect;
-        SkRect subset = entry.fSrcRect;
+        const SkRect imageBounds = SkRect::Make(set[i].fImage->bounds());
+        SkRect dstToDraw = set[i].fDstRect;
+        SkRect subset = set[i].fSrcRect;
         SkMatrix localMatrix = SkMatrix::RectToRectOrIdentity(subset, dstToDraw);
         if (!imageBounds.contains(subset)) {
             if (subset.intersect(imageBounds)) {
@@ -1468,16 +1466,16 @@
         }
         if (!dstToDraw.isEmpty()) {
             PaintParams::SimpleImage imageShader{
-                    entry.fImage.get(),
+                    set[i].fImage.get(),
                     &localMatrix,
                     constraint == SkCanvas::kStrict_SrcRectConstraint ? subset : imageBounds,
                     sampling};
 
             // NOTE: See drawEdgeAAQuad for details, we do not snap non-AA quads.
-            SkEnumBitMask<EdgeAAQuad::Flags> flags = static_cast<EdgeAAQuad::Flags>(entry.fAAFlags);
-            EdgeAAQuad quad = entry.fHasClip
-                                      ? EdgeAAQuad(SK_UNSAFE_TODO(dstClips + dstClipIndex), flags)
-                                      : EdgeAAQuad(dstToDraw, flags);
+            SkEnumBitMask<EdgeAAQuad::Flags> flags =
+                    static_cast<EdgeAAQuad::Flags>(set[i].fAAFlags);
+            EdgeAAQuad quad = set[i].fHasClip ? EdgeAAQuad(dstClips + dstClipIndex, flags)
+                                              : EdgeAAQuad(dstToDraw, flags);
 
             // TODO: Calling drawGeometry() for each entry re-evaluates the clip stack every time,
             // which is consistent with Ganesh's behavior. It also matches the behavior if edge-AA
@@ -1485,14 +1483,13 @@
             // However, we should explore the performance trade off with doing one bulk evaluation
             // for the whole set
             const SkMatrix* xtraXform =
-                    entry.fMatrixIndex < 0 ? nullptr
-                                           : SK_UNSAFE_TODO(&preViewMatrices[entry.fMatrixIndex]);
+                    set[i].fMatrixIndex < 0 ? nullptr : &preViewMatrices[set[i].fMatrixIndex];
             this->drawGeometry(xtraXform ? localToDevice.concat(SkM44(*xtraXform)) : localToDevice,
                                Geometry(quad),
-                               PaintParams(paint, imageShader, entry.fAlpha),
+                               PaintParams(paint, imageShader, set[i].fAlpha),
                                DefaultFillStyle());
         }
-        dstClipIndex += 4 * entry.fHasClip;
+        dstClipIndex += 4 * set[i].fHasClip;
     }
 }
 
diff --git a/src/gpu/graphite/DrawAtlas.h b/src/gpu/graphite/DrawAtlas.h
index dccf244..8238a2a 100644
--- a/src/gpu/graphite/DrawAtlas.h
+++ b/src/gpu/graphite/DrawAtlas.h
@@ -13,7 +13,6 @@
 #include "include/core/SkRefCnt.h"
 #include "include/core/SkSize.h"
 #include "include/private/SkAssert.h"
-#include "include/private/SkAttributes.h"
 #include "include/private/SkDebug.h"
 #include "include/private/SkTArray.h"
 #include "src/core/SkIPoint16.h"
@@ -156,8 +155,8 @@
     };
 
     // DEPRECATED
-    class AtlasLocator;
     class PlotLocator;
+    class AtlasLocator;
 
     /**
      * An interface for eviction callbacks. Whenever an atlas evicts a specific PlotLocator,
@@ -296,12 +295,12 @@
     void updatePlot(Plot* plot, AtlasLocator*);
 
     void makeMRU(Plot* plot, int pageIdx) {
-        if (SK_UNSAFE_TODO(fPages[pageIdx].fPlotList.head()) == plot) {
+        if (fPages[pageIdx].fPlotList.head() == plot) {
             return;
         }
 
-        SK_UNSAFE_TODO(fPages[pageIdx].fPlotList.remove(plot));
-        SK_UNSAFE_TODO(fPages[pageIdx].fPlotList.addToHead(plot));
+        fPages[pageIdx].fPlotList.remove(plot);
+        fPages[pageIdx].fPlotList.addToHead(plot);
 
         // No MRU update for pages -- since we will always try to add from
         // the front and remove from the back there is no need for MRU.
@@ -320,8 +319,7 @@
         int count = 0;
         PlotList::Iter plotIter;
         for (uint32_t pageIndex = 0; pageIndex < this->maxPages(); ++pageIndex) {
-            plotIter.init(SK_UNSAFE_TODO(fPages[pageIndex].fPlotList),
-                          PlotList::Iter::kHead_IterStart);
+            plotIter.init(fPages[pageIndex].fPlotList, PlotList::Iter::kHead_IterStart);
             while (Plot* plot = plotIter.get()) {
                 if (func(plot)) {
                     count++;
@@ -490,12 +488,9 @@
  */
 class DrawAtlas::BulkUsePlotUpdater {
 public:
-    BulkUsePlotUpdater() {
-        SK_UNSAFE_TODO(memset(fPlotAlreadyUpdated, 0, sizeof(fPlotAlreadyUpdated)));
-    }
+    BulkUsePlotUpdater() { memset(fPlotAlreadyUpdated, 0, sizeof(fPlotAlreadyUpdated)); }
     BulkUsePlotUpdater(const BulkUsePlotUpdater& that) : fPlotsToUpdate(that.fPlotsToUpdate) {
-        SK_UNSAFE_TODO(
-                memcpy(fPlotAlreadyUpdated, that.fPlotAlreadyUpdated, sizeof(fPlotAlreadyUpdated)));
+        memcpy(fPlotAlreadyUpdated, that.fPlotAlreadyUpdated, sizeof(fPlotAlreadyUpdated));
     }
 
     bool add(const AtlasLocator& atlasLocator) {
@@ -510,7 +505,7 @@
 
     void reset() {
         fPlotsToUpdate.clear();
-        SK_UNSAFE_TODO(memset(fPlotAlreadyUpdated, 0, sizeof(fPlotAlreadyUpdated)));
+        memset(fPlotAlreadyUpdated, 0, sizeof(fPlotAlreadyUpdated));
     }
 
     struct PlotData {
@@ -526,12 +521,12 @@
 private:
     bool find(int pageIdx, int index) const {
         SkASSERT(index < kMaxPlots);
-        return (SK_UNSAFE_TODO(fPlotAlreadyUpdated[pageIdx]) >> index) & 1;
+        return (fPlotAlreadyUpdated[pageIdx] >> index) & 1;
     }
 
     void set(int pageIdx, int index) {
         SkASSERT(!this->find(pageIdx, index));
-        SK_UNSAFE_TODO(fPlotAlreadyUpdated[pageIdx] |= (1 << index));
+        fPlotAlreadyUpdated[pageIdx] |= (1 << index);
         fPlotsToUpdate.push_back(PlotData(pageIdx, index));
     }
 
@@ -725,7 +720,7 @@
 
     uint32_t plot = plotLocator.plotIndex();
     uint32_t page = plotLocator.pageIndex();
-    uint64_t plotGeneration = SK_UNSAFE_TODO(fPages[page].fPlotArray[plot]->genID());
+    uint64_t plotGeneration = fPages[page].fPlotArray[plot]->genID();
     uint64_t locatorGeneration = plotLocator.genID();
     return plot < fNumPlots && page < fNumActivePages && plotGeneration == locatorGeneration;
 }
@@ -742,7 +737,7 @@
         // it's possible we've added a plot to the updater and subsequently the plot's page
         // was deleted -- so we check to prevent a crash
         if (pd.fPageIndex < fNumActivePages) {
-            Plot* plot = SK_UNSAFE_TODO(fPages[pd.fPageIndex].fPlotArray[pd.fPlotIndex].get());
+            Plot* plot = fPages[pd.fPageIndex].fPlotArray[pd.fPlotIndex].get();
             this->internalSetLastUseToken(plot, pd.fPageIndex, token);
         }
     }
@@ -752,7 +747,7 @@
     SkASSERT(this->hasID(atlasLocator.plotLocator()));
     uint32_t pageIdx = atlasLocator.pageIndex();
     uint32_t plotIdx = atlasLocator.plotIndex();
-    return SK_UNSAFE_TODO(fPages[pageIdx].fPlotArray[plotIdx].get());
+    return fPages[pageIdx].fPlotArray[plotIdx].get();
 }
 
 inline void DrawAtlas::internalSetLastUseToken(Plot* plot, uint32_t pageIdx, Token token) {
diff --git a/src/gpu/graphite/DrawListBase.h b/src/gpu/graphite/DrawListBase.h
index 814859e..69c765a 100644
--- a/src/gpu/graphite/DrawListBase.h
+++ b/src/gpu/graphite/DrawListBase.h
@@ -9,7 +9,6 @@
 
 #include "include/gpu/graphite/GraphiteTypes.h"
 
-#include "include/private/SkAttributes.h"
 #include "include/private/SkDebug.h"
 #include "include/private/SkEnumBitMask.h"
 #include "src/core/SkBlockAllocator.h"
@@ -32,11 +31,11 @@
 
 namespace skgpu::graphite {
 
-class DrawContext;
 class DrawPass;
+class DrawContext;
 class Geometry;
-class Recorder;
 class Renderer;
+class Recorder;
 
 struct Layer;
 
@@ -273,8 +272,8 @@
 
             for (int i = 0; i < binding.numTextures(); ++i) {
                 auto [t, s] = binding.texture(i);
-                SK_UNSAFE_TODO(textures[i]) = t.get();
-                SK_UNSAFE_TODO(samplers[i]) = s;
+                textures[i] = t.get();
+                samplers[i] = s;
             }
         }
 
diff --git a/tools/unsafe_buffers/unsafe_buffers_mappings.txt b/tools/unsafe_buffers/unsafe_buffers_mappings.txt
index ee4f6e4..983dd99 100644
--- a/tools/unsafe_buffers/unsafe_buffers_mappings.txt
+++ b/tools/unsafe_buffers/unsafe_buffers_mappings.txt
@@ -23,7 +23,17 @@
 # Temporary exclusions.
 # TODO(564587252): Convert files to SK_UNSAFE_TODO instead of
 # file-wide suppressions.
+src:*src/gpu/graphite/BufferManager.cpp
+src:*src/gpu/graphite/ClipAtlasManager.cpp
+src:*src/gpu/graphite/ClipStack.cpp
+src:*src/gpu/graphite/Context.cpp
+src:*src/gpu/graphite/Device.cpp
 src:*src/gpu/graphite/DrawAtlas.cpp
+src:*src/gpu/graphite/DrawAtlas.h
+src:*src/gpu/graphite/DrawContext.cpp
+src:*src/gpu/graphite/DrawListBase.h
+src:*src/gpu/graphite/DrawPass.cpp
+src:*src/gpu/graphite/GlobalCache.cpp
 src:*src/gpu/graphite/GraphicsPipeline.cpp
 src:*src/gpu/graphite/ImageFactories.cpp
 src:*src/gpu/graphite/Image_YUVA_Graphite.cpp