Bug 1594524 - Move the call to gpu_profile.end_frame() up so that we don't measure debug overlays. r=gw
authorMarkus Stange <mstange@themasta.com>
Thu, 12 Dec 2019 03:40:27 +0000
changeset 506602 02828d8e1d7841028d87638f4f9de82bf8afce8f
parent 506601 748d2a318649649e15c7a9f4323b98ec1ca4b598
child 506603 cce8edb56b192c236344a0cfd9b5724fc4ed5116
push id36908
push usermalexandru@mozilla.com
push dateThu, 12 Dec 2019 09:53:26 +0000
treeherdermozilla-central@192e0e33eb59 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgw
bugs1594524
milestone73.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1594524 - Move the call to gpu_profile.end_frame() up so that we don't measure debug overlays. r=gw Differential Revision: https://phabricator.services.mozilla.com/D52090
gfx/wr/webrender/src/renderer.rs
--- a/gfx/wr/webrender/src/renderer.rs
+++ b/gfx/wr/webrender/src/renderer.rs
@@ -3148,16 +3148,19 @@ impl Renderer {
                 // for a bit more context.
                 if doc_index != last_document_index {
                     self.texture_resolver.end_pass(&mut self.device, None, None);
                 }
             }
 
             self.unlock_external_images();
             self.active_documents = active_documents;
+
+            let _gm = self.gpu_profile.start_marker("end frame");
+            self.gpu_profile.end_frame();
         });
 
         if let Some(device_size) = device_size {
             // Update the state of the debug overlay surface, ensuring that
             // the compositor mode has a suitable surface to draw to, if required.
             self.update_debug_overlay(device_size);
 
             // Bind a surface to draw the debug / profiler information to.
@@ -3259,18 +3262,16 @@ impl Renderer {
         self.profile_counters.reset();
         self.profile_counters.frame_counter.inc();
         results.stats.resource_upload_time = self.resource_upload_time;
         self.resource_upload_time = 0;
         results.stats.gpu_cache_upload_time = self.gpu_cache_upload_time;
         self.gpu_cache_upload_time = 0;
 
         profile_timers.cpu_time.profile(|| {
-            let _gm = self.gpu_profile.start_marker("end frame");
-            self.gpu_profile.end_frame();
             if let Some(debug_renderer) = self.debug.try_get_mut() {
                 let small_screen = self.debug_flags.contains(DebugFlags::SMALL_SCREEN);
                 let scale = if small_screen { 1.6 } else { 1.0 };
                 // TODO(gw): Tidy this up so that compositor config integrates better
                 //           with the (non-compositor) surface y-flip options.
                 let surface_origin_is_top_left = match self.compositor_config {
                     CompositorConfig::Native { .. } => true,
                     CompositorConfig::Draw { .. } => self.device.surface_origin_is_top_left(),