From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Cecilio Pardo Newsgroups: gmane.emacs.devel Subject: Problems implementing double buffered painting for Windows Date: Mon, 11 May 2020 12:13:50 +0200 Message-ID: <86wo5ig4o1.fsf@inmotica-integral.es> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="90460"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (windows-nt) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 11 12:22:30 2020 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 1jY5Zt-000NNq-M5 for ged-emacs-devel@m.gmane-mx.org; Mon, 11 May 2020 12:22:29 +0200 Original-Received: from localhost ([::1]:43128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jY5Zs-0003qq-Ot for ged-emacs-devel@m.gmane-mx.org; Mon, 11 May 2020 06:22:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY5ZP-0003AX-Jq for emacs-devel@gnu.org; Mon, 11 May 2020 06:21:59 -0400 Original-Received: from [82.223.54.191] (port=56819 helo=localhost.localdomain) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY5ZO-0003jU-Cy for emacs-devel@gnu.org; Mon, 11 May 2020 06:21:58 -0400 Original-Received: from there (121.red-2-138-99.dynamicip.rima-tde.net [2.138.99.121]) by localhost.localdomain (Postfix) with ESMTPA id DFFB3D5884 for ; Mon, 11 May 2020 10:13:50 +0000 (UTC) X-Host-Lookup-Failed: Reverse DNS lookup failed for 82.223.54.191 (failed) Received-SPF: pass client-ip=82.223.54.191; envelope-from=cpardo@imayhem.com; helo=localhost.localdomain X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/11 06:13:51 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: 16 X-Spam_score: 1.6 X-Spam_bar: + X-Spam_report: (1.6 / 5.0 requ) BAYES_50=0.8, RDNS_NONE=0.793, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:249775 Archived-At: Hello, I'm trying to implement double buffered painting for Windows, to eliminate flicker. I am encountering some problems: - When to flip buffers? I have tried to attach the flip to frame_up_to_date_hook on the 'terminal' struct, but it sometimes get called when it should not, producing flicker. - What portion of the screen has been updated? I have seen no clear way to find this out. I'm resorting to intercept calls to w32_fill_rect to mark areas as invalidated, as it /seems/ to be always used to clean the area before painting, but this is clearly not a solution. Any ideas welcome. Thank you. -- Cecilio Pardo