From 142ead6e351d64505bc1382a13c69808f5b9b94a Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Mon, 7 Sep 2015 17:53:36 -0400 Subject: [PATCH] Bug 1202430 - remove NS_GFX and related macros; r=jrmuizel NS_GFX last meant something prior to bug 648911, which removed support for non-libxul builds. Now that it's meaningless, let's get rid of it. --- gfx/src/DriverCrashGuard.h | 1 - gfx/src/X11Util.h | 3 +- gfx/src/gfxCore.h | 15 ----- gfx/src/gfxCrashReporterUtils.h | 3 +- gfx/src/moz.build | 1 - gfx/src/nsColor.cpp | 15 +++-- gfx/src/nsColor.h | 15 +++-- gfx/src/nsColorNames.h | 3 +- gfx/src/nsFont.h | 3 +- gfx/src/nsMargin.h | 1 - gfx/src/nsRect.h | 5 +- gfx/src/nsRegion.h | 9 ++- gfx/src/nsScriptableRegion.h | 3 +- gfx/src/nsTransform2D.h | 3 +- gfx/ycbcr/QuellGccWarnings.patch | 2 +- gfx/ycbcr/TypeFromSize.patch | 36 +++++------ gfx/ycbcr/convert.patch | 104 +++++++++++++++---------------- gfx/ycbcr/ycbcr_to_rgb565.cpp | 8 +-- gfx/ycbcr/ycbcr_to_rgb565.h | 8 +-- gfx/ycbcr/yuv_convert.cpp | 54 ++++++++-------- gfx/ycbcr/yuv_convert.h | 55 ++++++++-------- widget/nsPrintSession.h | 1 - widget/nsPrintSettingsImpl.h | 1 - 23 files changed, 159 insertions(+), 190 deletions(-) delete mode 100644 gfx/src/gfxCore.h diff --git a/gfx/src/DriverCrashGuard.h b/gfx/src/DriverCrashGuard.h index 8aeb9eb9cdc..977ff04b38b 100644 --- a/gfx/src/DriverCrashGuard.h +++ b/gfx/src/DriverCrashGuard.h @@ -5,7 +5,6 @@ #ifndef gfx_src_DriverCrashGuard_h__ #define gfx_src_DriverCrashGuard_h__ -#include "gfxCore.h" #include "nsCOMPtr.h" #include "nsIGfxInfo.h" #include "nsIFile.h" diff --git a/gfx/src/X11Util.h b/gfx/src/X11Util.h index a4501fba2f6..328cb29645c 100644 --- a/gfx/src/X11Util.h +++ b/gfx/src/X11Util.h @@ -22,7 +22,6 @@ #endif #include // for memset -#include "gfxCore.h" // for NS_GFX #include "mozilla/Scoped.h" // for SCOPED_TEMPLATE namespace mozilla { @@ -91,7 +90,7 @@ SCOPED_TEMPLATE(ScopedXFree, ScopedXFreePtrTraits) * This class is not thread-safe at all. It is assumed that only one thread is using any ScopedXErrorHandler's. Given that it's * not used on Mac, it should be easy to make it thread-safe by using thread-local storage with __thread. */ -class NS_GFX ScopedXErrorHandler +class ScopedXErrorHandler { public: // trivial wrapper around XErrorEvent, just adding ctor initializing by zero. diff --git a/gfx/src/gfxCore.h b/gfx/src/gfxCore.h deleted file mode 100644 index e6c2be081a0..00000000000 --- a/gfx/src/gfxCore.h +++ /dev/null @@ -1,15 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -#ifndef gfxCore_h__ -#define gfxCore_h__ - -#include "nscore.h" - -#define NS_GFX -#define NS_GFX_(type) type -#define NS_GFX_STATIC_MEMBER_(type) type - -#endif diff --git a/gfx/src/gfxCrashReporterUtils.h b/gfx/src/gfxCrashReporterUtils.h index f67139a79a4..a11b661f038 100644 --- a/gfx/src/gfxCrashReporterUtils.h +++ b/gfx/src/gfxCrashReporterUtils.h @@ -6,7 +6,6 @@ #ifndef gfxCrashReporterUtils_h__ #define gfxCrashReporterUtils_h__ -#include "gfxCore.h" namespace mozilla { @@ -21,7 +20,7 @@ namespace mozilla { * have many exit points. We don't want to encourage having function with many exit points. * It just happens that our graphics features initialization functions are like that. */ -class NS_GFX ScopedGfxFeatureReporter +class ScopedGfxFeatureReporter { public: explicit ScopedGfxFeatureReporter(const char *aFeature, bool force = false) diff --git a/gfx/src/moz.build b/gfx/src/moz.build index ed98b3d6fcb..eacb6e6b716 100644 --- a/gfx/src/moz.build +++ b/gfx/src/moz.build @@ -16,7 +16,6 @@ DEFINES['MOZ_APP_VERSION'] = '"%s"' % CONFIG['MOZ_APP_VERSION'] EXPORTS += [ 'DriverCrashGuard.h', 'FilterSupport.h', - 'gfxCore.h', 'gfxCrashReporterUtils.h', 'gfxTelemetry.h', 'nsBoundingMetrics.h', diff --git a/gfx/src/nsColor.cpp b/gfx/src/nsColor.cpp index 4b8613e5057..909bddb0f77 100644 --- a/gfx/src/nsColor.cpp +++ b/gfx/src/nsColor.cpp @@ -75,8 +75,7 @@ static int ComponentValue(const char16_t* aColorSpec, int aLen, int color, int d return component; } -NS_GFX_(bool) NS_HexToRGB(const nsAString& aColorSpec, - nscolor* aResult) +bool NS_HexToRGB(const nsAString& aColorSpec, nscolor* aResult) { const char16_t* buffer = aColorSpec.BeginReading(); @@ -121,7 +120,7 @@ NS_GFX_(bool) NS_HexToRGB(const nsAString& aColorSpec, // This implements part of the algorithm for legacy behavior described in // http://www.whatwg.org/specs/web-apps/current-work/complete/common-microsyntaxes.html#rules-for-parsing-a-legacy-color-value -NS_GFX_(bool) NS_LooseHexToRGB(const nsString& aColorSpec, nscolor* aResult) +bool NS_LooseHexToRGB(const nsString& aColorSpec, nscolor* aResult) { if (aColorSpec.EqualsLiteral("transparent")) { return false; @@ -185,7 +184,7 @@ NS_GFX_(bool) NS_LooseHexToRGB(const nsString& aColorSpec, nscolor* aResult) return true; } -NS_GFX_(bool) NS_ColorNameToRGB(const nsAString& aColorName, nscolor* aResult) +bool NS_ColorNameToRGB(const nsAString& aColorName, nscolor* aResult) { if (!gColorTable) return false; @@ -203,7 +202,7 @@ NS_GFX_(bool) NS_ColorNameToRGB(const nsAString& aColorName, nscolor* aResult) // Returns kColorNames, an array of all possible color names, and sets // *aSizeArray to the size of that array. Do NOT call free() on this array. -NS_GFX_(const char * const *) NS_AllColorNames(size_t *aSizeArray) +const char * const * NS_AllColorNames(size_t *aSizeArray) { *aSizeArray = ArrayLength(kColorNames); return kColorNames; @@ -215,7 +214,7 @@ NS_GFX_(const char * const *) NS_AllColorNames(size_t *aSizeArray) #define MOZ_BLEND(target, bg, fg, fgalpha) \ FAST_DIVIDE_BY_255(target, (bg)*(255-fgalpha) + (fg)*(fgalpha)) -NS_GFX_(nscolor) +nscolor NS_ComposeColors(nscolor aBG, nscolor aFG) { // This function uses colors that are non premultiplied alpha. @@ -264,7 +263,7 @@ HSL_HueToRGB(float m1, float m2, float h) } // The float parameters are all expected to be in the range 0-1 -NS_GFX_(nscolor) +nscolor NS_HSL2RGB(float h, float s, float l) { uint8_t r, g, b; @@ -281,7 +280,7 @@ NS_HSL2RGB(float h, float s, float l) return NS_RGB(r, g, b); } -NS_GFX_(const char*) +const char* NS_RGBToColorName(nscolor aColor) { for (size_t idx = 0; idx < ArrayLength(kColors); ++idx) { diff --git a/gfx/src/nsColor.h b/gfx/src/nsColor.h index 24769542e73..b03263da21a 100644 --- a/gfx/src/nsColor.h +++ b/gfx/src/nsColor.h @@ -8,7 +8,6 @@ #include // for size_t #include // for uint8_t, uint32_t -#include "gfxCore.h" // for NS_GFX_ #include "nscore.h" // for nsAString class nsAString; @@ -53,37 +52,37 @@ typedef uint32_t nscolor; // Translate a hex string to a color. Return true if it parses ok, // otherwise return false. // This accepts only 3 or 6 digits -NS_GFX_(bool) NS_HexToRGB(const nsAString& aBuf, nscolor* aResult); +bool NS_HexToRGB(const nsAString& aBuf, nscolor* aResult); // Compose one NS_RGB color onto another. The result is what // you get if you draw aFG on top of aBG with operator OVER. -NS_GFX_(nscolor) NS_ComposeColors(nscolor aBG, nscolor aFG); +nscolor NS_ComposeColors(nscolor aBG, nscolor aFG); // Translate a hex string to a color. Return true if it parses ok, // otherwise return false. // This version accepts 1 to 9 digits (missing digits are 0) -NS_GFX_(bool) NS_LooseHexToRGB(const nsString& aBuf, nscolor* aResult); +bool NS_LooseHexToRGB(const nsString& aBuf, nscolor* aResult); // There is no function to translate a color to a hex string, because // the hex-string syntax does not support transparency. // Translate a color name to a color. Return true if it parses ok, // otherwise return false. -NS_GFX_(bool) NS_ColorNameToRGB(const nsAString& aBuf, nscolor* aResult); +bool NS_ColorNameToRGB(const nsAString& aBuf, nscolor* aResult); // Returns an array of all possible color names, and sets // *aSizeArray to the size of that array. Do NOT call |free()| on this array. -NS_GFX_(const char * const *) NS_AllColorNames(size_t *aSizeArray); +const char * const * NS_AllColorNames(size_t *aSizeArray); // function to convert from HSL color space to RGB color space // the float parameters are all expected to be in the range 0-1 -NS_GFX_(nscolor) NS_HSL2RGB(float h, float s, float l); +nscolor NS_HSL2RGB(float h, float s, float l); // Return a color name for the given nscolor. If there is no color // name for it, returns null. If there are multiple possible color // names for the given color, the first one in nsColorNameList.h // (which is generally the first one in alphabetical order) will be // returned. -NS_GFX_(const char*) NS_RGBToColorName(nscolor aColor); +const char* NS_RGBToColorName(nscolor aColor); #endif /* nsColor_h___ */ diff --git a/gfx/src/nsColorNames.h b/gfx/src/nsColorNames.h index 55f73af48e1..38878971090 100644 --- a/gfx/src/nsColorNames.h +++ b/gfx/src/nsColorNames.h @@ -6,9 +6,8 @@ #ifndef nsColorNames_h___ #define nsColorNames_h___ -#include "gfxCore.h" -class NS_GFX nsColorNames { +class nsColorNames { public: static void AddRefTable(void); static void ReleaseTable(void); diff --git a/gfx/src/nsFont.h b/gfx/src/nsFont.h index 0f41357da72..753d4ecf377 100644 --- a/gfx/src/nsFont.h +++ b/gfx/src/nsFont.h @@ -8,7 +8,6 @@ #include // for uint8_t, uint16_t #include // for int16_t -#include "gfxCore.h" // for NS_GFX #include "gfxFontFamilyList.h" #include "gfxFontFeatures.h" #include "nsAutoPtr.h" // for nsRefPtr @@ -40,7 +39,7 @@ const uint8_t kGenericFont_cursive = 0x10; const uint8_t kGenericFont_fantasy = 0x20; // Font structure. -struct NS_GFX nsFont { +struct nsFont { // list of font families, either named or generic mozilla::FontFamilyList fontlist; diff --git a/gfx/src/nsMargin.h b/gfx/src/nsMargin.h index 6e526196ab8..cf824cc9e09 100644 --- a/gfx/src/nsMargin.h +++ b/gfx/src/nsMargin.h @@ -8,7 +8,6 @@ #include "nsCoord.h" #include "nsPoint.h" -#include "gfxCore.h" #include "mozilla/gfx/BaseMargin.h" struct nsMargin : public mozilla::gfx::BaseMargin { diff --git a/gfx/src/nsRect.h b/gfx/src/nsRect.h index 5bcb7cfc720..9b986e8bf5a 100644 --- a/gfx/src/nsRect.h +++ b/gfx/src/nsRect.h @@ -10,7 +10,6 @@ #include // for FILE #include // for int32_t, int64_t #include // for min/max -#include "gfxCore.h" // for NS_GFX #include "mozilla/Likely.h" // for MOZ_UNLIKELY #include "mozilla/gfx/Rect.h" #include "nsCoord.h" // for nscoord, etc @@ -24,7 +23,7 @@ struct nsIntMargin; typedef mozilla::gfx::IntRect nsIntRect; -struct NS_GFX nsRect : +struct nsRect : public mozilla::gfx::BaseRect { typedef mozilla::gfx::BaseRect Super; @@ -290,7 +289,7 @@ ToAppUnits(const mozilla::gfx::IntRect& aRect, nscoord aAppUnitsPerPixel); #ifdef DEBUG // Diagnostics -extern NS_GFX FILE* operator<<(FILE* out, const nsRect& rect); +extern FILE* operator<<(FILE* out, const nsRect& rect); #endif // DEBUG #endif /* NSRECT_H */ diff --git a/gfx/src/nsRegion.h b/gfx/src/nsRegion.h index 6453013e689..315db6d78e3 100644 --- a/gfx/src/nsRegion.h +++ b/gfx/src/nsRegion.h @@ -9,7 +9,6 @@ #include // for size_t #include // for uint32_t, uint64_t #include // for int32_t -#include "gfxCore.h" // for NS_GFX #include "mozilla/ToString.h" // for mozilla::ToString #include "nsCoord.h" // for nscoord #include "nsError.h" // for nsresult @@ -420,7 +419,7 @@ private: }; -class NS_GFX nsRegionRectIterator +class nsRegionRectIterator { const nsRegion* mRegion; int i; @@ -474,7 +473,7 @@ namespace gfx { * BaseIntRegions use int32_t coordinates. */ template -class NS_GFX BaseIntRegion +class BaseIntRegion { friend class ::nsRegion; @@ -763,7 +762,7 @@ public: nsCString ToString() const { return mImpl.ToString(); } - class NS_GFX RectIterator + class RectIterator { nsRegionRectIterator mImpl; Rect mTmp; @@ -825,7 +824,7 @@ private: } // namespace gfx } // namespace mozilla -class NS_GFX nsIntRegion : public mozilla::gfx::BaseIntRegion +class nsIntRegion : public mozilla::gfx::BaseIntRegion { public: // Forward constructors. diff --git a/gfx/src/nsScriptableRegion.h b/gfx/src/nsScriptableRegion.h index 18f9f9652ba..094093c754d 100644 --- a/gfx/src/nsScriptableRegion.h +++ b/gfx/src/nsScriptableRegion.h @@ -8,12 +8,11 @@ #define nsScriptableRegion_h #include "nsIScriptableRegion.h" -#include "gfxCore.h" #include "nsISupports.h" #include "nsRegion.h" #include "mozilla/Attributes.h" -class NS_GFX nsScriptableRegion final : public nsIScriptableRegion { +class nsScriptableRegion final : public nsIScriptableRegion { public: nsScriptableRegion(); diff --git a/gfx/src/nsTransform2D.h b/gfx/src/nsTransform2D.h index 21bcefe262f..8999b2cf3b5 100644 --- a/gfx/src/nsTransform2D.h +++ b/gfx/src/nsTransform2D.h @@ -6,10 +6,9 @@ #ifndef nsTransform2D_h___ #define nsTransform2D_h___ -#include "gfxCore.h" #include "nsCoord.h" -class NS_GFX nsTransform2D +class nsTransform2D { private: /** diff --git a/gfx/ycbcr/QuellGccWarnings.patch b/gfx/ycbcr/QuellGccWarnings.patch index 82482205df8..d580ac98177 100644 --- a/gfx/ycbcr/QuellGccWarnings.patch +++ b/gfx/ycbcr/QuellGccWarnings.patch @@ -1,7 +1,7 @@ diff --git a/gfx/ycbcr/yuv_convert.cpp b/gfx/ycbcr/yuv_convert.cpp --- a/gfx/ycbcr/yuv_convert.cpp +++ b/gfx/ycbcr/yuv_convert.cpp -@@ -337,16 +337,17 @@ NS_GFX_(void) ScaleYCbCrToRGB32(const ui +@@ -337,16 +337,17 @@ void ScaleYCbCrToRGB32(const uint* yplan source_dx_uv >> kFractionBits); } } diff --git a/gfx/ycbcr/TypeFromSize.patch b/gfx/ycbcr/TypeFromSize.patch index e523cf71dc5..d08a19690a8 100644 --- a/gfx/ycbcr/TypeFromSize.patch +++ b/gfx/ycbcr/TypeFromSize.patch @@ -10,10 +10,10 @@ diff --git a/gfx/ycbcr/yuv_convert.cpp b/gfx/ycbcr/yuv_convert.cpp const int kFractionMax = 1 << kFractionBits; const int kFractionMask = ((1 << kFractionBits) - 1); -+NS_GFX_(YUVType) TypeFromSize(int ywidth, -+ int yheight, -+ int cbcrwidth, -+ int cbcrheight) ++YUVType TypeFromSize(int ywidth, ++ int yheight, ++ int cbcrwidth, ++ int cbcrheight) +{ + if (ywidth == cbcrwidth && yheight == cbcrheight) { + return YV24; @@ -27,13 +27,13 @@ diff --git a/gfx/ycbcr/yuv_convert.cpp b/gfx/ycbcr/yuv_convert.cpp +} + // Convert a frame of YUV to 32 bit ARGB. - NS_GFX_(void) ConvertYCbCrToRGB32(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - uint8* rgb_buf, - int pic_x, - int pic_y, - int pic_width, + void ConvertYCbCrToRGB32(const uint8* y_buf, + const uint8* u_buf, + const uint8* v_buf, + uint8* rgb_buf, + int pic_x, + int pic_y, + int pic_width, diff --git a/gfx/ycbcr/yuv_convert.h b/gfx/ycbcr/yuv_convert.h --- a/gfx/ycbcr/yuv_convert.h +++ b/gfx/ycbcr/yuv_convert.h @@ -46,13 +46,13 @@ diff --git a/gfx/ycbcr/yuv_convert.h b/gfx/ycbcr/yuv_convert.h FILTER_BILINEAR = 3 // Bilinear filter. }; -+NS_GFX_(YUVType) TypeFromSize(int ywidth, int yheight, int cbcrwidth, int cbcrheight); ++YUVType TypeFromSize(int ywidth, int yheight, int cbcrwidth, int cbcrheight); + // Convert a frame of YUV to 32 bit ARGB. // Pass in YV16/YV12 depending on source format - NS_GFX_(void) ConvertYCbCrToRGB32(const uint8* yplane, - const uint8* uplane, - const uint8* vplane, - uint8* rgbframe, - int pic_x, - int pic_y, + void ConvertYCbCrToRGB32(const uint8* yplane, + const uint8* uplane, + const uint8* vplane, + uint8* rgbframe, + int pic_x, + int pic_y, diff --git a/gfx/ycbcr/convert.patch b/gfx/ycbcr/convert.patch index ebf6c3525db..e39f923b3c7 100644 --- a/gfx/ycbcr/convert.patch +++ b/gfx/ycbcr/convert.patch @@ -71,18 +71,18 @@ diff --git a/gfx/ycbcr/yuv_convert.cpp b/gfx/ycbcr/yuv_convert.cpp - rgb_row, - width); - } -+NS_GFX_(void) ConvertYCbCrToRGB32(const uint8* y_buf, -+ const uint8* u_buf, -+ const uint8* v_buf, -+ uint8* rgb_buf, -+ int pic_x, -+ int pic_y, -+ int pic_width, -+ int pic_height, -+ int y_pitch, -+ int uv_pitch, -+ int rgb_pitch, -+ YUVType yuv_type) { ++void ConvertYCbCrToRGB32(const uint8* y_buf, ++ const uint8* u_buf, ++ const uint8* v_buf, ++ uint8* rgb_buf, ++ int pic_x, ++ int pic_y, ++ int pic_width, ++ int pic_height, ++ int y_pitch, ++ int uv_pitch, ++ int rgb_pitch, ++ YUVType yuv_type) { + unsigned int y_shift = yuv_type == YV12 ? 1 : 0; + unsigned int x_shift = yuv_type == YV24 ? 0 : 1; + // Test for SSE because the optimized code uses movntq, which is not part of MMX. @@ -275,20 +275,20 @@ diff --git a/gfx/ycbcr/yuv_convert.cpp b/gfx/ycbcr/yuv_convert.cpp - YUVType yuv_type, - Rotate view_rotate, - ScaleFilter filter) { -+NS_GFX_(void) ScaleYCbCrToRGB32(const uint8* y_buf, -+ const uint8* u_buf, -+ const uint8* v_buf, -+ uint8* rgb_buf, -+ int source_width, -+ int source_height, -+ int width, -+ int height, -+ int y_pitch, -+ int uv_pitch, -+ int rgb_pitch, -+ YUVType yuv_type, -+ Rotate view_rotate, -+ ScaleFilter filter) { ++void ScaleYCbCrToRGB32(const uint8* y_buf, ++ const uint8* u_buf, ++ const uint8* v_buf, ++ uint8* rgb_buf, ++ int source_width, ++ int source_height, ++ int width, ++ int height, ++ int y_pitch, ++ int uv_pitch, ++ int rgb_pitch, ++ YUVType yuv_type, ++ Rotate view_rotate, ++ ScaleFilter filter) { + bool has_mmx = supports_mmx(); + // 4096 allows 3 buffers to fit in 12k. @@ -469,18 +469,18 @@ diff --git a/gfx/ycbcr/yuv_convert.h b/gfx/ycbcr/yuv_convert.h - int uvstride, - int rgbstride, - YUVType yuv_type); -+NS_GFX_(void) ConvertYCbCrToRGB32(const uint8* yplane, -+ const uint8* uplane, -+ const uint8* vplane, -+ uint8* rgbframe, -+ int pic_x, -+ int pic_y, -+ int pic_width, -+ int pic_height, -+ int ystride, -+ int uvstride, -+ int rgbstride, -+ YUVType yuv_type); ++void ConvertYCbCrToRGB32(const uint8* yplane, ++ const uint8* uplane, ++ const uint8* vplane, ++ uint8* rgbframe, ++ int pic_x, ++ int pic_y, ++ int pic_width, ++ int pic_height, ++ int ystride, ++ int uvstride, ++ int rgbstride, ++ YUVType yuv_type); // Scale a frame of YUV to 32 bit ARGB. // Supports rotation and mirroring. @@ -501,20 +501,20 @@ diff --git a/gfx/ycbcr/yuv_convert.h b/gfx/ycbcr/yuv_convert.h - -} // namespace media - -+NS_GFX_(void) ScaleYCbCrToRGB32(const uint8* yplane, -+ const uint8* uplane, -+ const uint8* vplane, -+ uint8* rgbframe, -+ int source_width, -+ int source_height, -+ int width, -+ int height, -+ int ystride, -+ int uvstride, -+ int rgbstride, -+ YUVType yuv_type, -+ Rotate view_rotate, -+ ScaleFilter filter); ++void ScaleYCbCrToRGB32(const uint8* yplane, ++ const uint8* uplane, ++ const uint8* vplane, ++ uint8* rgbframe, ++ int source_width, ++ int source_height, ++ int width, ++ int height, ++ int ystride, ++ int uvstride, ++ int rgbstride, ++ YUVType yuv_type, ++ Rotate view_rotate, ++ ScaleFilter filter); + +} // namespace gfx +} // namespace mozilla diff --git a/gfx/ycbcr/ycbcr_to_rgb565.cpp b/gfx/ycbcr/ycbcr_to_rgb565.cpp index 698f321f73c..0572e3e094a 100644 --- a/gfx/ycbcr/ycbcr_to_rgb565.cpp +++ b/gfx/ycbcr/ycbcr_to_rgb565.cpp @@ -281,7 +281,7 @@ static void ScaleYCbCr444ToRGB565_Nearest_Row_C( } } -NS_GFX_(void) ScaleYCbCrToRGB565(const uint8_t *y_buf, +void ScaleYCbCrToRGB565(const uint8_t *y_buf, const uint8_t *u_buf, const uint8_t *v_buf, uint8_t *rgb_buf, @@ -537,7 +537,7 @@ NS_GFX_(void) ScaleYCbCrToRGB565(const uint8_t *y_buf, } } -NS_GFX_(bool) IsScaleYCbCrToRGB565Fast(int source_x0, +bool IsScaleYCbCrToRGB565Fast(int source_x0, int source_y0, int source_width, int source_height, @@ -599,7 +599,7 @@ void yuv_to_rgb565_row_c(uint16 *dst, } } -NS_GFX_(void) ConvertYCbCrToRGB565(const uint8* y_buf, +void ConvertYCbCrToRGB565(const uint8* y_buf, const uint8* u_buf, const uint8* v_buf, uint8* rgb_buf, @@ -652,7 +652,7 @@ NS_GFX_(void) ConvertYCbCrToRGB565(const uint8* y_buf, } } -NS_GFX_(bool) IsConvertYCbCrToRGB565Fast(int pic_x, +bool IsConvertYCbCrToRGB565Fast(int pic_x, int pic_y, int pic_width, int pic_height, diff --git a/gfx/ycbcr/ycbcr_to_rgb565.h b/gfx/ycbcr/ycbcr_to_rgb565.h index d630e0e9843..41272223be2 100644 --- a/gfx/ycbcr/ycbcr_to_rgb565.h +++ b/gfx/ycbcr/ycbcr_to_rgb565.h @@ -17,7 +17,7 @@ namespace gfx { #ifdef HAVE_YCBCR_TO_RGB565 // Convert a frame of YUV to 16 bit RGB565. -NS_GFX_(void) ConvertYCbCrToRGB565(const uint8* yplane, +void ConvertYCbCrToRGB565(const uint8* yplane, const uint8* uplane, const uint8* vplane, uint8* rgbframe, @@ -31,14 +31,14 @@ NS_GFX_(void) ConvertYCbCrToRGB565(const uint8* yplane, YUVType yuv_type); // Used to test if we have an accelerated version. -NS_GFX_(bool) IsConvertYCbCrToRGB565Fast(int pic_x, +bool IsConvertYCbCrToRGB565Fast(int pic_x, int pic_y, int pic_width, int pic_height, YUVType yuv_type); // Scale a frame of YUV to 16 bit RGB565. -NS_GFX_(void) ScaleYCbCrToRGB565(const uint8_t *yplane, +void ScaleYCbCrToRGB565(const uint8_t *yplane, const uint8_t *uplane, const uint8_t *vplane, uint8_t *rgbframe, @@ -55,7 +55,7 @@ NS_GFX_(void) ScaleYCbCrToRGB565(const uint8_t *yplane, ScaleFilter filter); // Used to test if we have an accelerated version. -NS_GFX_(bool) IsScaleYCbCrToRGB565Fast(int source_x0, +bool IsScaleYCbCrToRGB565Fast(int source_x0, int source_y0, int source_width, int source_height, diff --git a/gfx/ycbcr/yuv_convert.cpp b/gfx/ycbcr/yuv_convert.cpp index 14d64c3754b..93932f1adda 100644 --- a/gfx/ycbcr/yuv_convert.cpp +++ b/gfx/ycbcr/yuv_convert.cpp @@ -31,7 +31,7 @@ const int kFractionBits = 16; const int kFractionMax = 1 << kFractionBits; const int kFractionMask = ((1 << kFractionBits) - 1); -NS_GFX_(YUVType) TypeFromSize(int ywidth, +YUVType TypeFromSize(int ywidth, int yheight, int cbcrwidth, int cbcrheight) @@ -48,18 +48,18 @@ NS_GFX_(YUVType) TypeFromSize(int ywidth, } // Convert a frame of YUV to 32 bit ARGB. -NS_GFX_(void) ConvertYCbCrToRGB32(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - uint8* rgb_buf, - int pic_x, - int pic_y, - int pic_width, - int pic_height, - int y_pitch, - int uv_pitch, - int rgb_pitch, - YUVType yuv_type) { +void ConvertYCbCrToRGB32(const uint8* y_buf, + const uint8* u_buf, + const uint8* v_buf, + uint8* rgb_buf, + int pic_x, + int pic_y, + int pic_width, + int pic_height, + int y_pitch, + int uv_pitch, + int rgb_pitch, + YUVType yuv_type) { unsigned int y_shift = yuv_type == YV12 ? 1 : 0; unsigned int x_shift = yuv_type == YV24 ? 0 : 1; // Test for SSE because the optimized code uses movntq, which is not part of MMX. @@ -163,20 +163,20 @@ static inline void FilterRows(uint8* ybuf, const uint8* y0_ptr, // Scale a frame of YUV to 32 bit ARGB. -NS_GFX_(void) ScaleYCbCrToRGB32(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - uint8* rgb_buf, - int source_width, - int source_height, - int width, - int height, - int y_pitch, - int uv_pitch, - int rgb_pitch, - YUVType yuv_type, - Rotate view_rotate, - ScaleFilter filter) { +void ScaleYCbCrToRGB32(const uint8* y_buf, + const uint8* u_buf, + const uint8* v_buf, + uint8* rgb_buf, + int source_width, + int source_height, + int width, + int height, + int y_pitch, + int uv_pitch, + int rgb_pitch, + YUVType yuv_type, + Rotate view_rotate, + ScaleFilter filter) { bool has_mmx = supports_mmx(); // 4096 allows 3 buffers to fit in 12k. diff --git a/gfx/ycbcr/yuv_convert.h b/gfx/ycbcr/yuv_convert.h index b041fed8853..25bb753f103 100644 --- a/gfx/ycbcr/yuv_convert.h +++ b/gfx/ycbcr/yuv_convert.h @@ -6,7 +6,6 @@ #define MEDIA_BASE_YUV_CONVERT_H_ #include "chromium_types.h" -#include "gfxCore.h" namespace mozilla { @@ -41,39 +40,39 @@ enum ScaleFilter { FILTER_BILINEAR = 3 // Bilinear filter. }; -NS_GFX_(YUVType) TypeFromSize(int ywidth, int yheight, int cbcrwidth, int cbcrheight); +YUVType TypeFromSize(int ywidth, int yheight, int cbcrwidth, int cbcrheight); // Convert a frame of YUV to 32 bit ARGB. // Pass in YV16/YV12 depending on source format -NS_GFX_(void) ConvertYCbCrToRGB32(const uint8* yplane, - const uint8* uplane, - const uint8* vplane, - uint8* rgbframe, - int pic_x, - int pic_y, - int pic_width, - int pic_height, - int ystride, - int uvstride, - int rgbstride, - YUVType yuv_type); +void ConvertYCbCrToRGB32(const uint8* yplane, + const uint8* uplane, + const uint8* vplane, + uint8* rgbframe, + int pic_x, + int pic_y, + int pic_width, + int pic_height, + int ystride, + int uvstride, + int rgbstride, + YUVType yuv_type); // Scale a frame of YUV to 32 bit ARGB. // Supports rotation and mirroring. -NS_GFX_(void) ScaleYCbCrToRGB32(const uint8* yplane, - const uint8* uplane, - const uint8* vplane, - uint8* rgbframe, - int source_width, - int source_height, - int width, - int height, - int ystride, - int uvstride, - int rgbstride, - YUVType yuv_type, - Rotate view_rotate, - ScaleFilter filter); +void ScaleYCbCrToRGB32(const uint8* yplane, + const uint8* uplane, + const uint8* vplane, + uint8* rgbframe, + int source_width, + int source_height, + int width, + int height, + int ystride, + int uvstride, + int rgbstride, + YUVType yuv_type, + Rotate view_rotate, + ScaleFilter filter); } // namespace gfx } // namespace mozilla diff --git a/widget/nsPrintSession.h b/widget/nsPrintSession.h index d7545b2f3e9..c7585adb942 100644 --- a/widget/nsPrintSession.h +++ b/widget/nsPrintSession.h @@ -8,7 +8,6 @@ #include "nsIPrintSession.h" #include "nsWeakReference.h" -#include "gfxCore.h" //***************************************************************************** //*** nsPrintSession diff --git a/widget/nsPrintSettingsImpl.h b/widget/nsPrintSettingsImpl.h index 60ff7a95451..d1e46904f78 100644 --- a/widget/nsPrintSettingsImpl.h +++ b/widget/nsPrintSettingsImpl.h @@ -7,7 +7,6 @@ #ifndef nsPrintSettingsImpl_h__ #define nsPrintSettingsImpl_h__ -#include "gfxCore.h" #include "nsIPrintSettings.h" #include "nsMargin.h" #include "nsString.h"