From patchwork Tue Oct 14 11:12:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 587 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org Authentication-Results: mail.u-boot.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=DOKiqrbQ; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9DFBA68112 for ; Tue, 14 Oct 2025 05:13:37 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id IVihe7mKKjig for ; Tue, 14 Oct 2025 05:13:37 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2B9446813C for ; Tue, 14 Oct 2025 05:13:36 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9A7986813D for ; Tue, 14 Oct 2025 05:13:31 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id fju5uyS4qp29 for ; Tue, 14 Oct 2025 05:13:31 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.179; helo=mail-il1-f179.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) by mail.u-boot.org (Postfix) with ESMTPS id 9A4ED6813C for ; Tue, 14 Oct 2025 05:13:29 -0600 (MDT) Received: by mail-il1-f179.google.com with SMTP id e9e14a558f8ab-42d857dcf92so19508445ab.1 for ; Tue, 14 Oct 2025 04:13:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440408; x=1761045208; darn=u-boot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=llFYByEXVSXvkjnhx61gplMVcwMBkxq2MIneFVC5oJc=; b=DOKiqrbQm45+9xVzvR3MlmfayO7bJneItV2HtsAkgZ8CF2+yBguISFXqqXtkXMEi0P HGYA9I9mSGBi1s39Ml42V0SathABPipKiz9ls3bRRKciT+cPZWMx4L4pWVjGLRGxyi7p xoLL+GVKZjcIPOSJpUX6coGVylX6mxzetExQo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440408; x=1761045208; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=llFYByEXVSXvkjnhx61gplMVcwMBkxq2MIneFVC5oJc=; b=cz/E7dCDWCBqMvyVW3Jo7tpsdxpfTgFi8nVr313aXsS6XCBYU4V6jkTwkMP6zklpgy UKnk3/5ooS8I91x4t6aM0bKcd4ZcbViJU74SI/FCnXd1buzuX1O8KDeMuFHGr7vNWzgc LEkyDeBmHc75FRRmS1ySZ69339ham+y3Hi99j6suFnivCwBVBTQqLZdP9dAavDEYJBPE cymzUIfPhSMeyzag+KzX2t+66mOxzLH9BF+6J/4XPsVUiVKxI7feaO7i2qdjI0CLMd0s DhGiX/PxiL/sMttUeB4mBaC7lSpBvYwMO0uMsBj9dHMluHuTaOoPzZU1dZnL8HjAiDSn SwwA== X-Gm-Message-State: AOJu0Yz74LXWw7XMfVSRGFzBaT9Mqvc/cvUCLUAHe66ZqcRY3U9nW5pc 1sPp+64i7MaoPAxA66Yf2eIXTmTSH19u566wPjLUC7obp0IQGSJcQt61PQNyrgCBg1ZvocLsj8J 6MVJEB9iZ2B4= X-Gm-Gg: ASbGncs8YMtEdV6BJQCwejpFhQYgJdLQGKk+zdxc7axsln52545PTEz3+48BMWCiKQ0 deSiLs+jtVk70gBqonHPNFxRWF6G2GLge9h0voCpKVCSfEl7widPx5K6Sn1tR+l0lmL32pesaW5 KByxRO5siY36aN3i9y0DhPGKkrNf94yFM59V74w04uUm1YQqIjIYzfia0VHH3SonDzHa0ga1OHv pvnDyPUwx7wfo+kWSX8ilcb/LkdTykvD0htOjlcz4S++I/Sqszl59hwq2yfYU5EkpGD3AOFQm8b ftHobdwdgBLgPSnc5XUE4kxd9bHSqn6qJO90PYwVL6vifexznKUHr+u8KFTMSyv+ju6iTVHdhJm kKSaLeHPZevuEZH2v4U+P8OTa6cvpjOzqs06A3jHhDFljy4f3Xs9BPqPS X-Google-Smtp-Source: AGHT+IGBLjTuc0auzGFD6OZUinB90pGZm3cf7MYc75HN4KzT2XzO0ZUHnx41eWErX/6T//zE5vItsQ== X-Received: by 2002:a05:6e02:1fe3:b0:42f:95a1:2e8 with SMTP id e9e14a558f8ab-42f95a104bfmr161881245ab.24.1760440408396; Tue, 14 Oct 2025 04:13:28 -0700 (PDT) Received: from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-430a3869174sm4608785ab.15.2025.10.14.04.13.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:27 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:41 -0600 Message-ID: <20251014111301.1059317-5-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251014111301.1059317-1-sjg@chromium.org> References: <20251014111301.1059317-1-sjg@chromium.org> MIME-Version: 1.0 Message-ID-Hash: 565ANPPOIZH7KEVNL4AUOP5J7S7BR5QO X-Message-ID-Hash: 565ANPPOIZH7KEVNL4AUOP5J7S7BR5QO X-MailFrom: sjg@chromium.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 04/16] expo: Avoid setting SCENEOF_SIZE_VALID with calculated size List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: When the size of an object is calculated from its contents, we should not set the SCENEOF_SIZE_VALID flag. This flag prevents the object from resizing if the font is changed, for example. The flag is intended to mean that the size was explicitly set by the controller, so we should generally not set it in the expo implementation. It is also inefficient to search for the object ID when we already have the object. Update scene_set_default_bbox() to just set the size and request that it be synced. Signed-off-by: Simon Glass --- boot/scene.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/boot/scene.c b/boot/scene.c index dd13b74b4d7..04a5e8a03e2 100644 --- a/boot/scene.c +++ b/boot/scene.c @@ -803,10 +803,12 @@ static int scene_set_default_bbox(struct scene *scn) switch (obj->type) { case SCENEOBJT_IMAGE: case SCENEOBJT_TEXT: - if (!(obj->flags & SCENEOF_SIZE_VALID)) { - scene_obj_set_size(scn, obj->id, obj->dims.x, - obj->dims.y); - } + if (obj->flags & SCENEOF_SIZE_VALID) + break; + obj->req_bbox.x1 = obj->req_bbox.x0 + obj->dims.x; + obj->req_bbox.y1 = obj->req_bbox.y0 + obj->dims.y; + obj->flags |= SCENEOF_SYNC_SIZE; + break; default: break; }