From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.devel Subject: Re: macOS metal rendering engine in mac port Date: Mon, 24 May 2021 10:58:23 -0700 Message-ID: References: <831r9xjrho.fsf@gnu.org> <5754E85B-9840-416B-B9C1-E6B2B1FC0114@gnu.org> <80A25FCA-2CF4-433F-B82F-4B37ED5BC6DC@gnu.org> <831r9wdrjr.fsf@gnu.org> <83v978ccbc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13539"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Third , YAMAMOTO Mitsuharu , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 24 19:59:47 2021 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 1llErg-0003My-4n for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 19:59:44 +0200 Original-Received: from localhost ([::1]:42776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llErf-0006TE-3D for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 13:59:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llEqh-0005GC-Sm for emacs-devel@gnu.org; Mon, 24 May 2021 13:58:43 -0400 Original-Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:46598) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llEqa-0007nn-Ho; Mon, 24 May 2021 13:58:43 -0400 Original-Received: by mail-pf1-x42f.google.com with SMTP id y15so10048004pfn.13; Mon, 24 May 2021 10:58:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XB+PpeTJtK+642t/HqYXwoLI+yilmXnx45hwCq6FqG8=; b=B0LU8Yjlsrc+xF5y2ojqBBNHCxVbRTCxncvoZFEcqiGeB0+NVzucMk/9i2uBYGmC3t wJLTl/a9zDvdaRuzvkimR8SsshSzM6D4miuz22mCFMCFGOQUEAcX6Yccb1DAjOZmNPZZ rA0CNB9yKuuh7oyK2Ou1Ub1SmHJaOxPkxAt1uq9hdPtpX5JqV6Y6TYbRvuAJKSscdiLL 130iuR82bTHHG/Mk86vq4kepqonlUHxHbvtFD4k0O3rVRQJgrMZ+R6210jYBfAz/AYEl +tPWdD8JETyhfoj+VpjOyJOR3XeqpdLqROfKFHacnqz8U5kiGUqcEFLty2yCEKNysOTG 7eqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XB+PpeTJtK+642t/HqYXwoLI+yilmXnx45hwCq6FqG8=; b=Je+i2gzmrZuM2CvJAqTK1ISkdfEHcpgVXoJGNJRn63VeZwuMbAGpN01vn1lRPADfDR whU2mdVei8IQNPqxE5dFarKQUccl/F7wEd9zg+wJZkNhYWlXp8pJF7nxicCp7qKo8WPc KVIxzMEAz25BBw4mP3XtGrdFVDLVKAQcz+fCbJv92eEzOv/HuwQDDicJRSatImMVJcAF tSG6lB5I0jKEiZTS0pxId4TMfkOr3vIhl/xV47Z5XcZjAGLq6Dh2Mde0pL0gHLHYEw2l UJpZFOm93vonqiXPBRUVkaISTkeIMs691k5xJdnvvC7ojUwaUZYEv9fJl+OvVZ5GqTaH nyaQ== X-Gm-Message-State: AOAM533CLaV0qDLI6z7FfKHLOeXkJiIlutWyNRaZ8+R7wZicG3K/wZZG G0IuoS2YaTsK4TgGX1xvXod9XufHCpf8I4/HCeyp6SrApSrOrw== X-Google-Smtp-Source: ABdhPJyfH9UqmQGvN4kQJmo6kVyaPrdwbfUt1uplc7UFahusk4V6e8lYyXz9LGa6C7qH7YwS453FhMhqz3Md8L8efiU= X-Received: by 2002:a63:5060:: with SMTP id q32mr14783693pgl.32.1621879114478; Mon, 24 May 2021 10:58:34 -0700 (PDT) In-Reply-To: <83v978ccbc.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=aaronjensen@gmail.com; helo=mail-pf1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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:269786 Archived-At: On Mon, May 24, 2021 at 9:43 AM Eli Zaretskii wrote: > > Of course. But it also does that for every other face, starting with > font-lock faces. So something is still amiss here, because 40 is too > small a number. I'm not seeing this. With line numbers off the only call to merge_faces is for escape-glyph when I use scroll-up-benchmark. I'm on Alan's surface-stuff branch if that makes any difference. > > > Also, what did Emacs do when you collected these numbers, and in which > > > buffer under what major mode? > > > > emacs -Q src/xdisp.c with scroll-up-benchmark > > Then you should see font-lock-comment-face, font-lock-keyword-face, > font-lock-variable-name-face, etc., and calls to merge_face_ref for > them coming from face_at_buffer_position. Yeah, I don't see calls to merge_faces for these. Here's the debug code I added: @@ -6646,10 +6648,16 @@ face_at_string_position (struct window *w, Lisp_Object string, Return new face id. */ +long mfc = 0; + int merge_faces (struct window *w, Lisp_Object face_name, int face_id, int base_face_id) { + +fprintf(stderr, "x merge_faces: %d %d %ld\n", face_id, base_face_id, mfc++); +debug_print(face_name); + struct frame *f = WINDOW_XFRAME (w); Lisp_Object attrs[LFACE_VECTOR_SIZE]; struct face *base_face = FACE_FROM_ID_OR_NULL (f, base_face_id);