diff options
author | 2023-11-07 18:35:11 +0900 | |
---|---|---|
committer | 2023-11-08 14:01:49 +0900 | |
commit | 29781f450d3acc1a1405a83a1a99bad73ed4ff91 (patch) | |
tree | a5b0378bc82684e749070f4c9f2560467f40e5dc /libs | |
parent | 253698da790ebb76df2f5bee60362300ce004c6c (diff) |
Make active Context valid while buildLayer() When RecordingCanvas::drawPoints() is executed through buildLayer(), active Context is null.
It leads to crash
Change-Id: Iefe7fa0e056e82f07cd54fa3bfd74180f89ae726
Diffstat (limited to 'libs')
-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; |