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 Bug 817846 - Add BaseSize::IsEmpty() member function. r=cjones 2013-01-24 18:10:27 -05:00
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 Bug 827946. GCC 4.5 with PGO miscompiles the ConvolveHorizontally function, so add an annotation to tone down the optmization on that function with GCC 4.5 only. r=joe 2013-02-08 14:01:19 -06:00
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 Bug 792207 - Part 4: Add Azure recording code. r=jrmuizel 2012-09-24 15:02:50 +00:00
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 Bug 811850: Fix gfx 2d recording to be 64-bit neutral. r=jrmuizel 2012-11-14 20:55:02 +00:00
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 Bug 748433: Adds support for blending to the canvas globalCompositeOperator. r=jrmuizel 2012-12-12 21:28:17 +01:00
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 Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed. r=ehsan 2013-01-15 13:22:03 +01:00
image_operations.h Bug 813090 - Fix license block on imported Chromium code. r=gerv 2012-12-03 18:04:22 -05:00
ImageScaling.cpp
ImageScaling.h Back out 98d2c24ce932 for failing to build r=moron 2012-08-15 12:51:33 -04:00
ImageScalingSSE2.cpp Bug 509052: Add new, faster blurring code. r=derf 2012-11-07 09:29:54 +01:00
Logging.h Bug 806618 - rewrite PR_NewLogModule calls to not generate static initializers; r=ehsan 2012-10-29 19:32:10 -04:00
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 Bug 772726. Part 8: Add Rect::NudgeToIntegers and share improved nudging code among all nudging APIs. r=bas 2012-09-12 17:24:09 +12:00
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 Bug 784382 - Part 2: Use new ID2D1DeviceContext interface in Azure. r=jrmuizel 2012-10-07 01:43:16 +02:00
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 Bug 803124 - Implement mozIsPointInStroke. r=jmuizelaar 2012-10-29 16:54:53 +01:00
PathCairo.h Bug 803124 - Implement mozIsPointInStroke. r=jmuizelaar 2012-10-29 16:54:53 +01:00
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 Bug 793201 - Fix compiler warnings in Azure with MSVC r=bas 2012-09-28 13:21:40 -04:00
PathRecording.cpp Bug 792207 - Part 4: Add Azure recording code. r=jrmuizel 2012-09-24 15:02:50 +00:00
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 Bug 831529 - Stop using SkPath::contains for now since it doesn't match the canvas spec. r=jrmuizel 2013-02-08 10:54:59 +13:00
PathSkia.h Bug 803124 - Implement mozIsPointInStroke. r=jmuizelaar 2012-10-29 16:54:53 +01:00
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 Bug 792207 - Part 4: Add Azure recording code. r=jrmuizel 2012-09-24 15:02:50 +00:00
Rect.h Bug 886298 - Add a typed-units Margin. r=kats 2013-07-22 09:50:11 +01:00
Scale.cpp Bug 798053 - Do a more accurate test for the return value of Scale(). r=gw280 2012-10-10 11:35:23 -04:00
Scale.h Bug 795862 - Back out bug 486918 for build bustage in unreviewed code. 2012-10-01 14:16:03 +02:00
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 Bug 809927: Add new blend modes and implement them for Direct2D. r=bas 2012-12-12 21:28:17 +01:00
ShadersD2D.h Bug 883004 - Part 1: Add radial gradient effect code. r=jrmuizel 2013-06-21 05:53:23 +02:00
SourceSurfaceCairo.cpp Bug 722217; keep only a single snapshot. r=jrmuizel 2012-09-06 16:07:53 +12:00
SourceSurfaceCairo.h Bug 722217; keep only a single snapshot. r=jrmuizel 2012-09-06 16:07:53 +12:00
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 Bug 801465; DataSourceSurfaceD2D; r=Bas 2012-10-31 12:30:25 +13:00
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 Bug 738189: Add memory reporting for Azure VRAM usage. r=jrmuizel 2012-06-20 23:41:16 +02:00
SourceSurfaceDual.h Back out 98d2c24ce932 for failing to build r=moron 2012-08-15 12:51:33 -04:00
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 Bug 509052: Add new, faster blurring code. r=derf 2012-11-07 09:29:54 +01:00
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