From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Drawing UI elements behind text Date: Thu, 28 Nov 2024 13:56:54 +0200 Message-ID: <86y113d115.fsf@gnu.org> References: <641230ac-2dbc-42ac-a57e-acda77fe9296@imayhem.com> <8C55E590-E586-440A-89C5-0E5153518790@gmail.com> <78d3a7e7-f5a7-476b-8a9d-27beca44a94a@imayhem.com> <86plmgg2vx.fsf@gnu.org> <86bjy0fqqu.fsf@gnu.org> <943ad61e-9823-4dff-b8c0-d9d1b74ef676@imayhem.com> <861pywfnb2.fsf@gnu.org> <005e93b1-4b5b-4d59-9fc3-9bf9b9c29bdc@imayhem.com> <86v7w7etn9.fsf@gnu.org> <7127ca97-a1ce-4e46-af93-16ca849ff207@imayhem.com> <861pyvel42.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18429"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Cecilio Pardo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 28 12:57:54 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tGd9d-0004bE-H8 for ged-emacs-devel@m.gmane-mx.org; Thu, 28 Nov 2024 12:57:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGd8m-0003WH-QI; Thu, 28 Nov 2024 06:57:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGd8k-0003W3-Os for emacs-devel@gnu.org; Thu, 28 Nov 2024 06:56:59 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGd8j-0007Dx-G7; Thu, 28 Nov 2024 06:56:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Y5x2KtLgUIl+7smt38FECqfR8xaX8S4ZIaCcWYjubPc=; b=C3cfl2J1I/Y8 fEPcQX8+wCxJt7hMFRIc7IEtx0N1kA3LIQMJSeKovvxzNylK9liwCEpulDAH5Yxb2zJFRjmJL7UcK kg5BrjUrhlhiYf6ssMcOdQiZAVcvg3M2/Tl/n4KGOjLP79gl4feaRsN7aUBR27vQOELCViFXcmFzD lz4ScOr9ZMb4th0U3eLet7GaVcr07QIjdoarTbxeTpCdq3VzHkUYxnYkM9qSPc2M9wmrgSN1ZKS2M C5gihixJzq48thn4G53eZQj8ihhaRWscvd5hBESVBtH3JyZ9/yw+mezPvW/LTZz/Pz5MeEmogHU94 F8GJvo1zg7gcJR785oF5cg==; In-Reply-To: (message from Cecilio Pardo on Thu, 28 Nov 2024 11:41:25 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325806 Archived-At: > Date: Thu, 28 Nov 2024 11:41:25 +0100 > Cc: emacs-devel@gnu.org > From: Cecilio Pardo > > On 28/11/2024 10:57, Eli Zaretskii wrote: > >> The segments are drawn independently of redisplay, on top of its result, > >> without affecting it (so that the next redisplay finds it exactly as it > >> was). So no optimizations are disabled, and the time added by them is > >> independent of what redisplay had to do. > > > > I'm probably missing something: if Emacs uses the scroll_run_hook, > > which bitblts a portion of the screen's pixels, doesn't that move also > > the pixels of the segments? If not, does it mean those segments' > > pixels are not drawn on the screen, but somehow overlaid on it using > > some video driver trick? > > This is working only if emacs is using a double buffered configuration. > Redisplay works on the back buffer, where we don't draw anything. When > the back buffer goes to the screen, we add the segments to the screen. > scroll_run_hook works on the back buffer. I see. So the display code basically knows nothing about these segments? And you need to redraw them in their entirety each redisplay cycle?