Bug 1208937 - Remove gfxPattern::GraphicsPatternType. r=jwatt.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 27 Sep 2015 20:38:20 -0700
changeset 264800 870329114ced41ce3d057482e172753462e5126f
parent 264799 b85067b9554f190e21c5e526f5a076a75241b713
child 264801 d3362879b8b1865812f2ec8c062d7ddd264bf8ac
push id65752
push usernnethercote@mozilla.com
push dateMon, 28 Sep 2015 23:12:55 +0000
treeherdermozilla-inbound@870329114ced [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1208937
milestone44.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 1208937 - Remove gfxPattern::GraphicsPatternType. r=jwatt. This is easy because the only remaining uses occur in uncalled functions, which can be removed.
gfx/thebes/gfx2DGlue.h
gfx/thebes/gfxPattern.cpp
gfx/thebes/gfxPattern.h
--- a/gfx/thebes/gfx2DGlue.h
+++ b/gfx/thebes/gfx2DGlue.h
@@ -101,31 +101,16 @@ inline ExtendMode ToExtendMode(gfxPatter
     return ExtendMode::REPEAT;
   case gfxPattern::EXTEND_REFLECT:
     return ExtendMode::REFLECT;
   default:
     return ExtendMode::CLAMP;
   }
 }
 
-inline gfxPattern::GraphicsPatternType
-ThebesPatternType(PatternType aType)
-{
-  switch (aType) {
-  case PatternType::SURFACE:
-    return gfxPattern::PATTERN_SURFACE;
-  case PatternType::LINEAR_GRADIENT:
-    return gfxPattern::PATTERN_LINEAR;
-  case PatternType::RADIAL_GRADIENT:
-    return gfxPattern::PATTERN_RADIAL;
-  default:
-    return gfxPattern::PATTERN_SOLID;
-  }
-}
-
 inline gfxPattern::GraphicsExtend ThebesExtend(ExtendMode aExtend)
 {
   switch (aExtend) {
   case ExtendMode::REPEAT:
     return gfxPattern::EXTEND_REPEAT;
   case ExtendMode::REFLECT:
     return gfxPattern::EXTEND_REFLECT;
   default:
--- a/gfx/thebes/gfxPattern.cpp
+++ b/gfx/thebes/gfxPattern.cpp
@@ -214,19 +214,13 @@ gfxPattern::GetSolidColor(Color& aColorO
   if (mGfxPattern.GetPattern()->GetType() == PatternType::COLOR) {
     aColorOut = static_cast<ColorPattern*>(mGfxPattern.GetPattern())->mColor;
     return true;
   }
 
  return false;
 }
 
-gfxPattern::GraphicsPatternType
-gfxPattern::GetType() const
-{
-  return ThebesPatternType(mGfxPattern.GetPattern()->GetType());
-}
-
 int
 gfxPattern::CairoStatus()
 {
   return CAIRO_STATUS_SUCCESS;
 }
--- a/gfx/thebes/gfxPattern.h
+++ b/gfx/thebes/gfxPattern.h
@@ -69,25 +69,16 @@ public:
         // usually becomes PAD.
         EXTEND_PAD_EDGE = 1000
     };
 
     // none, repeat, reflect
     void SetExtend(GraphicsExtend extend);
     GraphicsExtend Extend() const;
 
-    enum GraphicsPatternType {
-        PATTERN_SOLID,
-        PATTERN_SURFACE,
-        PATTERN_LINEAR,
-        PATTERN_RADIAL
-    };
-
-    GraphicsPatternType GetType() const;
-
     int CairoStatus();
 
     void SetFilter(GraphicsFilter filter);
     GraphicsFilter Filter() const;
 
     /* returns TRUE if it succeeded */
     bool GetSolidColor(mozilla::gfx::Color& aColorOut);