electron/shell/browser/osr
trop[bot] 31e6d66c74
perf: avoid redundant calls to GetView() (#43231)
* perf: avoid double-calls to GetView()

There are a lot of places where we call the virtual method GetView()
twice in succession: the first to check if the view exists, and the
second to use. This PR holds the view in a temp variable instead, e.g.:

if (auto* view = foo->GetView())
  view->DoSomething();

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* perf: avoid discarded GetView() call

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-08-06 19:24:05 -05:00
..
osr_host_display_client.cc chore: bump chromium to 117.0.5884.1 (main) (#38969) 2023-07-16 16:14:43 +02:00
osr_host_display_client.h chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
osr_host_display_client_mac.mm chore: bump chromium to 121.0.6116.0 (main) (#40490) 2023-11-14 13:21:32 -08:00
osr_render_widget_host_view.cc perf: avoid redundant calls to GetView() (#43231) 2024-08-06 19:24:05 -05:00
osr_render_widget_host_view.h chore: bump chromium to 128.0.6558.0 (32-x-y) (#42746) 2024-07-03 10:54:21 -04:00
osr_video_consumer.cc chore: bump chromium to 127.0.6521.0 (main) (#42118) 2024-06-07 17:18:35 -04:00
osr_video_consumer.h chore: bump chromium to 120.0.6099.0 (main) (#40316) 2023-11-01 10:02:12 -04:00
osr_view_proxy.cc refactor: inline simple getters (#41125) 2024-01-29 20:43:28 -06:00
osr_view_proxy.h refactor: inline simple getters (#41125) 2024-01-29 20:43:28 -06:00
osr_web_contents_view.cc perf: avoid redundant calls to GetView() (#43231) 2024-08-06 19:24:05 -05:00
osr_web_contents_view.h fix: crash with creating OffScreenWebContentsView (#42940) 2024-07-17 09:10:23 -05:00
osr_web_contents_view_mac.mm chore: bump chromium to 117.0.5923.0 (main) (#39304) 2023-08-04 10:47:29 +02:00