From b91e942f5eac65dcc69da6edf8a0b69f8567a2ab Mon Sep 17 00:00:00 2001 From: Benoit Girard Date: Tue, 23 Oct 2012 17:18:37 -0400 Subject: [PATCH] Bug 804724 - Add an abort painting marker. r=ehsan --HG-- extra : rebase_source : 10f327e91b15d673303eb607a361c1c4d14a1e92 --- gfx/layers/basic/BasicTiledThebesLayer.cpp | 1 + tools/profiler/sps_sampler.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/gfx/layers/basic/BasicTiledThebesLayer.cpp b/gfx/layers/basic/BasicTiledThebesLayer.cpp index 98ecfcbc49e..ef5361ecc5d 100644 --- a/gfx/layers/basic/BasicTiledThebesLayer.cpp +++ b/gfx/layers/basic/BasicTiledThebesLayer.cpp @@ -274,6 +274,7 @@ BasicTiledThebesLayer::ComputeProgressiveUpdateRegion(const nsIntRegion& aInvali gfx::Rect viewport; float scaleX, scaleY; if (BasicManager()->ProgressiveUpdateCallback(!freshRegion.IsEmpty(), viewport, scaleX, scaleY)) { + SAMPLE_MARKER("Abort painting"); aRegionToPaint.SetEmpty(); return aIsRepeated; } diff --git a/tools/profiler/sps_sampler.h b/tools/profiler/sps_sampler.h index faafd15916c..8c38d65c4d9 100644 --- a/tools/profiler/sps_sampler.h +++ b/tools/profiler/sps_sampler.h @@ -424,6 +424,9 @@ inline void mozilla_sampler_call_exit(void *aHandle) inline void mozilla_sampler_add_marker(const char *aMarker) { + if (!stack_key_initialized) + return; + ProfileStack *stack = tlsStack.get(); if (!stack) { return;