summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2024-11-13 11:48:29 -0500
committer John Reck <jreck@google.com> 2024-11-18 15:46:42 -0500
commit1895e2e9de073860cca89c9f94c0af548d6eb6aa (patch)
treec10372b8b545e1dc1cfec200712b37dfac7eb18e /libs/hwui/renderthread
parentea0378dc388aec0ccde233ba17a83b032190a251 (diff)
Don't create layers for negative-sized RenderNodes
Fixes: 257954570 Test: n/a Flag: EXEMPT trivial bug fix Change-Id: I82a00ec21b58ea55779d02db4a54d1ef2d37dcc7
Diffstat (limited to 'libs/hwui/renderthread')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 8ec04304a808..b36b8be10779 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -418,6 +418,11 @@ void CanvasContext::prepareTree(TreeInfo& info, int64_t* uiFrameInfo, int64_t sy
RenderNode* target) {
mRenderThread.removeFrameCallback(this);
+ // Make sure we have a valid device info
+ if (!DeviceInfo::get()->hasMaxTextureSize()) {
+ (void)mRenderThread.requireGrContext();
+ }
+
// If the previous frame was dropped we don't need to hold onto it, so
// just keep using the previous frame's structure instead
const auto reason = wasSkipped(mCurrentFrameInfo);