diff options
author | 2023-11-08 17:25:04 +0000 | |
---|---|---|
committer | 2023-11-08 17:25:04 +0000 | |
commit | d773035f1a5a3f3db7353d665b653ddfda102d0c (patch) | |
tree | 508f4e70e00a9c4bfb3e7ac1d3f5bd6995b619a0 | |
parent | 0d122c426087f13d2141ce4bb02c0d7b7910b7d0 (diff) | |
parent | 29781f450d3acc1a1405a83a1a99bad73ed4ff91 (diff) |
Merge "Make active Context valid while buildLayer() When RecordingCanvas::drawPoints() is executed through buildLayer(), active Context is null. It leads to crash" into main
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index 504dfaa2a1f5..cedfaed3260a 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -919,6 +919,7 @@ void CanvasContext::buildLayer(RenderNode* node) { // buildLayer() will leave the tree in an unknown state, so we must stop drawing stopDrawing(); + ScopedActiveContext activeContext(this); TreeInfo info(TreeInfo::MODE_FULL, *this); info.damageAccumulator = &mDamageAccumulator; info.layerUpdateQueue = &mLayerUpdateQueue; |