DanglingPtr: triage dangling ptr in SkiaRenderer
Investigating the code, we can be confident `this` won't outlive
`skia_output_surface_`, as the latter is stored as a unique_ptr in its
direct parent (as well as `this`). Moreover, the declaration order of
the two fields are correct in terms of dependency.
Bug: 1291138
Change-Id: I1f5e4a76049c766a0ce052926f0dab0cd707f397
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3833537
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Commit-Queue: Paul Semel <paulsemel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1035540}
diff --git a/components/viz/service/display/skia_renderer.h b/components/viz/service/display/skia_renderer.h
index 3a0074b..bb3be1d4 100644
--- a/components/viz/service/display/skia_renderer.h
+++ b/components/viz/service/display/skia_renderer.h
@@ -290,7 +290,7 @@
}
// Interface used for drawing. Common among different draw modes.
- raw_ptr<SkCanvas, DanglingUntriaged> current_canvas_ = nullptr;
+ raw_ptr<SkCanvas> current_canvas_ = nullptr;
class FrameResourceGpuCommandsCompletedFence;
scoped_refptr<FrameResourceGpuCommandsCompletedFence>
@@ -325,7 +325,7 @@
std::vector<SkMatrix> batched_cdt_matrices_;
// Specific for SkDDL.
- const raw_ptr<SkiaOutputSurface, DanglingUntriaged> skia_output_surface_;
+ const raw_ptr<SkiaOutputSurface> skia_output_surface_;
const bool is_using_raw_draw_;