Bug 1350676 - Label nsExiprationTracker subclasses BlurCache & GradientCache (r=dvander)
authorBill McCloskey <billm@mozilla.com>
Wed, 14 Jun 2017 14:24:28 -0700
changeset 367199 568e147a74acc74cbfe1f49ce5fb21e94a07a96f
parent 367198 99566b93d105c2fb5fcc09d39875854ed6ab92e2
child 367200 c4c2e0bdd865f4f1d2ba48e28400ba9e64f82c58
push id32125
push usercbook@mozilla.com
push dateTue, 04 Jul 2017 08:48:50 +0000
treeherdermozilla-central@fef489e8c2a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1350676
milestone56.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 1350676 - Label nsExiprationTracker subclasses BlurCache & GradientCache (r=dvander) MozReview-Commit-ID: 6O1gGQAIYJQ
gfx/thebes/gfxBlur.cpp
gfx/thebes/gfxGradientCache.cpp
--- a/gfx/thebes/gfxBlur.cpp
+++ b/gfx/thebes/gfxBlur.cpp
@@ -7,16 +7,17 @@
 
 #include "gfx2DGlue.h"
 #include "gfxContext.h"
 #include "gfxPlatform.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/Blur.h"
 #include "mozilla/gfx/PathHelpers.h"
 #include "mozilla/Maybe.h"
+#include "mozilla/SystemGroup.h"
 #include "nsExpirationTracker.h"
 #include "nsClassHashtable.h"
 #include "gfxUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 
 gfxAlphaBoxBlur::gfxAlphaBoxBlur()
@@ -346,17 +347,18 @@ struct BlurCacheData {
  * SourceSurfaces used to draw the blurs.
  *
  * An entry stays in the cache as long as it is used often.
  */
 class BlurCache final : public nsExpirationTracker<BlurCacheData,4>
 {
   public:
     BlurCache()
-      : nsExpirationTracker<BlurCacheData, 4>(GENERATION_MS, "BlurCache")
+      : nsExpirationTracker<BlurCacheData, 4>(GENERATION_MS, "BlurCache",
+                                              SystemGroup::EventTargetFor(TaskCategory::Other))
     {
     }
 
     virtual void NotifyExpired(BlurCacheData* aObject)
     {
       RemoveObject(aObject);
       mHashEntries.Remove(aObject->mKey);
     }
--- a/gfx/thebes/gfxGradientCache.cpp
+++ b/gfx/thebes/gfxGradientCache.cpp
@@ -3,16 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/gfx/2D.h"
 #include "nsTArray.h"
 #include "PLDHashTable.h"
 #include "nsExpirationTracker.h"
 #include "nsClassHashtable.h"
+#include "mozilla/SystemGroup.h"
 #include "mozilla/Telemetry.h"
 #include "gfxGradientCache.h"
 #include <time.h>
 
 namespace mozilla {
 namespace gfx {
 
 using namespace mozilla;
@@ -118,17 +119,18 @@ struct GradientCacheData {
  * entry is in the cache, all the references it has are guaranteed to be valid:
  * the nsStyleRect for the key, the gfxPattern for the value.
  */
 class GradientCache final : public nsExpirationTracker<GradientCacheData,4>
 {
   public:
     GradientCache()
       : nsExpirationTracker<GradientCacheData,4>(MAX_GENERATION_MS,
-                                                 "GradientCache")
+                                                 "GradientCache",
+                                                 SystemGroup::EventTargetFor(TaskCategory::Other))
     {
       srand(time(nullptr));
       mTimerPeriod = rand() % MAX_GENERATION_MS + 1;
       Telemetry::Accumulate(Telemetry::GRADIENT_RETENTION_TIME, mTimerPeriod);
     }
 
     virtual void NotifyExpired(GradientCacheData* aObject)
     {