gecko-dev/gfx/2d
Ehsan Akhgari 2824b29025 Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
..
unittest Bug 890714 - Fix mixed line endings. r=joe, r=jesup 2013-07-08 16:33:15 -04:00
2D.h Bug 784739 - Switch from NULL to nullptr in gfx/2d/; r=Bas 2013-07-20 11:48:55 +03:00
BaseMargin.h Bug 843719: Reorder params in Margin constructors and SizeTo() methods to match CSS's top,right,bottom,left ordering. r=seth 2013-03-06 00:05:55 -08:00
BasePoint3D.h
BasePoint4D.h
BasePoint.h
BaseRect.h Bug 878032 - Part 2: Factor out partial bitmap uploading and scaling. r=jrmuizel 2013-06-19 22:48:40 +02:00
BaseSize.h
Blur.cpp Bug 829954 - Part 2: Check for allocation success inside AlphaBoxBlur::Blur. r=jrmuizel 2013-06-04 03:13:53 +02:00
Blur.h Bug 845125 - Add gfxImageSurface constructor that allocates more space than needed, change AlphaBoxBlur to not hold on to the data and let the callers manage it. r=jmuizelaar 2013-04-19 12:13:18 +02:00
BlurSSE2.cpp Bug 845125 - Add gfxImageSurface constructor that allocates more space than needed, change AlphaBoxBlur to not hold on to the data and let the callers manage it. r=jmuizelaar 2013-04-19 12:13:18 +02:00
convolver.cpp
convolver.h Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo 2013-07-18 13:59:53 -04:00
DrawEventRecorder.cpp Bug 784739 - Switch from NULL to nullptr in gfx/2d/; r=Bas 2013-07-20 11:48:55 +03:00
DrawEventRecorder.h
DrawTargetCairo.cpp Bug 889693 - Implement MaskSurface in DrawTargetCairo. r=Bas 2013-07-11 10:43:34 -04:00
DrawTargetCairo.h Bug 889693 - Implement MaskSurface in DrawTargetCairo. r=Bas 2013-07-11 10:43:34 -04:00
DrawTargetCG.cpp Bug 898267 - support font smoothing in Azure CG backend. r=jrmuizel 2013-07-30 05:00:53 +09:00
DrawTargetCG.h Back out 7160624804ff:69062da26093 (bug 892966) on suspicion of mochitest-4 test_bug767779.html bustage 2013-07-12 16:39:36 -07:00
DrawTargetD2D1.cpp Bug 883004 - GCC bustage fix 2013-07-20 12:37:04 +02:00
DrawTargetD2D1.h Bug 883004 - Part 3: Add Direct2D 1.1 backend to Moz2D. r=jrmuizel 2013-07-17 14:12:22 +02:00
DrawTargetD2D.cpp Bug 784739 - Switch from NULL to nullptr in gfx/2d/; r=Bas 2013-07-20 11:48:55 +03:00
DrawTargetD2D.h Bug 784739 - Switch from NULL to nullptr in gfx/2d/; r=Bas 2013-07-20 11:48:55 +03:00
DrawTargetDual.cpp Bug 880836. Fix a typo caught by joe. 2013-06-18 20:31:17 -04:00
DrawTargetDual.h Bug 892966 - Make gfxQuartzNativeDrawing support Moz2D surfaces. r=jrmuizel 2013-07-12 17:19:29 -04:00
DrawTargetRecording.cpp Bug 784739 - Switch from NULL to nullptr in gfx/2d/; r=Bas 2013-07-20 11:48:55 +03:00
DrawTargetRecording.h Bug 784739 - Switch from NULL to nullptr in gfx/2d/; r=Bas 2013-07-20 11:48:55 +03:00
DrawTargetSkia.cpp Bug 895036 - Lower the SkiaGL texture cache size r=gwright 2013-07-09 16:12:49 -04:00
DrawTargetSkia.h Bug 885632 - Always use soft clipping with SkiaGL r=mattwoodrow 2013-06-21 15:28:10 -04:00
Factory.cpp Bug 892505 - Implement gfx::Factory::CreateDataSourceSurface. r=bas 2013-07-17 16:07:44 +02:00
GenericRefCounted.h Bug 882561 - Add a GenericRefCounted base class to moz2d, will allow moz2d to hold strong references to external objects without adding a dependency r=jwalden 2013-06-16 22:05:14 -04:00
genshaders.sh Bug 883004 - Part 1: Add radial gradient effect code. r=jrmuizel 2013-06-21 05:53:23 +02:00
gfx2d.sln
gfx2d.vcxproj
GradientStopsD2D.h Bug 883004 - Part 3: Add Direct2D 1.1 backend to Moz2D. r=jrmuizel 2013-07-17 14:12:22 +02:00
Helpers.h
HelpersCairo.h
HelpersD2D.h Bug 883004 - Part 3: Add Direct2D 1.1 backend to Moz2D. r=jrmuizel 2013-07-17 14:12:22 +02:00
HelpersSkia.h Bug 848491 - Update DrawTarget and gfxPlatform to use the new Skia APIs r=mattwoodrow 2013-04-09 15:57:22 -04:00
image_operations.cpp
image_operations.h
ImageScaling.cpp
ImageScaling.h
ImageScalingSSE2.cpp
Logging.h
MacIOSurface.h Bug 875232 - Make alpha channel optional for MacIOSurface. r=BenWa 2013-07-17 23:24:14 -04:00
Makefile.in Bug 883004 - Part 3: Add Direct2D 1.1 backend to Moz2D. r=jrmuizel 2013-07-17 14:12:22 +02:00
Matrix.cpp
Matrix.h Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE 2013-04-10 09:20:52 +00:00
moz-d2d1-1.h
moz.build Bug 883004 - Part 3: Add Direct2D 1.1 backend to Moz2D. r=jrmuizel 2013-07-17 14:12:22 +02:00
PathCairo.cpp
PathCairo.h
PathCG.cpp Bug 891388. Implement Arc() in PathCG. r=joe 2013-07-08 14:28:21 -04:00
PathCG.h Bug 895078. Implement ScaledFontMac::CopyGlyphsToBuilder. r=mattwoodrow 2013-07-16 11:25:49 -04:00
PathD2D.cpp Bug 878032 - Part 1: Factor out some simle none-RenderTarget dependent functions. r=jrmuizel 2013-06-19 22:48:40 +02:00
PathD2D.h Bug 883004 - Part 3: Add Direct2D 1.1 backend to Moz2D. r=jrmuizel 2013-07-17 14:12:22 +02:00
PathHelpers.h
PathRecording.cpp
PathRecording.h Bug 839265: Remove unused enum value OP_ARCTO from the PathOp::OpType enum. r=Bas 2013-02-17 00:49:50 -08:00
PathSkia.cpp
PathSkia.h
Point.h Bug 880676 - Move the RoundToInt functions to be standalone in the gfx headers. r=BenWa 2013-06-14 16:11:31 -04:00
QuartzSupport.h Bug 884061 - Part 4: Remove nsAtomicRefcnt.h, r=jlebar 2013-07-11 15:21:45 -05:00
QuartzSupport.mm Bug 875232 - Make alpha channel optional for MacIOSurface. r=BenWa 2013-07-17 23:24:14 -04:00
RadialGradientEffectD2D1.cpp Bug 887821 - GCC compilation failure in RadialGradientEffectD2D1.cpp r=jmuizelaar 2013-06-29 12:13:42 +02:00
RadialGradientEffectD2D1.h Bug 887821 - GCC compilation failure in RadialGradientEffectD2D1.cpp r=jmuizelaar 2013-06-29 12:13:42 +02:00
RecordedEvent.cpp Bug 784739 - Switch from NULL to nullptr in gfx/2d/; r=Bas 2013-07-20 11:48:55 +03:00
RecordedEvent.h Bug 784739 - Switch from NULL to nullptr in gfx/2d/; r=Bas 2013-07-20 11:48:55 +03:00
RecordingTypes.h
Rect.h Bug 886298 - Add a typed-units Margin. r=kats 2013-07-22 09:50:11 +01:00
Scale.cpp
Scale.h
ScaledFontBase.cpp Bug 736276 - Ensure we can never double addref a cairo scaled font in ScaledFontBase r=mattwoodrow 2013-06-28 22:50:59 -04:00
ScaledFontBase.h Bug 736276 - Rename ScaledFontFreeType to ScaledFontCairo, and use Skia's API to create an SkTypeface from a cairo_scaled_font_t r=jrmuizel 2013-06-05 13:48:59 -04:00
ScaledFontCairo.cpp Bug 736276 - Ensure we can never double addref a cairo scaled font in ScaledFontBase r=mattwoodrow 2013-06-28 22:50:59 -04:00
ScaledFontCairo.h Bug 736276 - Only create the SkTypeface in ScaledFontCairo when necessary r=jrmuizel 2013-06-28 22:50:09 -04:00
ScaledFontDWrite.cpp Bug 784739 - Switch from NULL to nullptr in gfx/2d/; r=Bas 2013-07-20 11:48:55 +03:00
ScaledFontDWrite.h Bug 883004 - Part 3: Add Direct2D 1.1 backend to Moz2D. r=jrmuizel 2013-07-17 14:12:22 +02:00
ScaledFontMac.cpp Bug 895078. Implement ScaledFontMac::CopyGlyphsToBuilder. r=mattwoodrow 2013-07-16 11:25:49 -04:00
ScaledFontMac.h Bug 895078. Implement ScaledFontMac::CopyGlyphsToBuilder. r=mattwoodrow 2013-07-16 11:25:49 -04:00
ScaledFontWin.cpp
ScaledFontWin.h
ScaleFactor.h Bug 883646 - Propagate the ScaleFactor classes far and wide. r=kentuckyfriedtakahe 2013-06-21 17:03:56 -04:00
ShadersD2D1.h Bug 883004 - Part 1: Add radial gradient effect code. r=jrmuizel 2013-06-21 05:53:23 +02:00
ShadersD2D1.hlsl Bug 883004 - Part 1: Add radial gradient effect code. r=jrmuizel 2013-06-21 05:53:23 +02:00
ShadersD2D.fx
ShadersD2D.h Bug 883004 - Part 1: Add radial gradient effect code. r=jrmuizel 2013-06-21 05:53:23 +02:00
SourceSurfaceCairo.cpp
SourceSurfaceCairo.h
SourceSurfaceCG.cpp Back out 7160624804ff:69062da26093 (bug 892966) on suspicion of mochitest-4 test_bug767779.html bustage 2013-07-12 16:39:36 -07:00
SourceSurfaceCG.h Back out 7160624804ff:69062da26093 (bug 892966) on suspicion of mochitest-4 test_bug767779.html bustage 2013-07-12 16:39:36 -07:00
SourceSurfaceD2D1.cpp Bug 883004 - Part 3: Add Direct2D 1.1 backend to Moz2D. r=jrmuizel 2013-07-17 14:12:22 +02:00
SourceSurfaceD2D1.h Bug 883004 - Part 3: Add Direct2D 1.1 backend to Moz2D. r=jrmuizel 2013-07-17 14:12:22 +02:00
SourceSurfaceD2D.cpp Bug 890714 - Fix mixed line endings. r=joe, r=jesup 2013-07-08 16:33:15 -04:00
SourceSurfaceD2D.h
SourceSurfaceD2DTarget.cpp Bug 883352 - With OMTC enabled on Metro Firefox, we crash when scrolling. r=jmuizelaar 2013-06-19 08:57:59 -04:00
SourceSurfaceD2DTarget.h
SourceSurfaceDual.h
SourceSurfaceRawData.cpp Bug 892505 - Implement gfx::Factory::CreateDataSourceSurface. r=bas 2013-07-17 16:07:44 +02:00
SourceSurfaceRawData.h Bug 892505 - Implement gfx::Factory::CreateDataSourceSurface. r=bas 2013-07-17 16:07:44 +02:00
SourceSurfaceSkia.cpp Bug 887927 - Hold a ref to DrawTargetSkia within SourceSurfaceSkia r=mattwoodrow 2013-06-28 22:59:19 -04:00
SourceSurfaceSkia.h Bug 887927 - Hold a ref to DrawTargetSkia within SourceSurfaceSkia r=mattwoodrow 2013-06-28 22:59:19 -04:00
SSEHelpers.h
Tools.h Bug 892505 - Implement gfx::Factory::CreateDataSourceSurface. r=bas 2013-07-17 16:07:44 +02:00
Types.h Bug 872127 - Part 2: Replace mozilla/StandardInteger.h with stdint.h; r=Waldo,ted 2013-07-30 10:25:31 -04:00
UserData.h Bug 775459 - Implement hit testing on layer tree + tests. r=kats 2013-07-02 12:27:17 -04:00