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.
This commit is contained in:
Nathan Froyd 2015-09-07 17:53:36 -04:00
parent 03669088f3
commit 142ead6e35
23 changed files with 159 additions and 190 deletions

View File

@ -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"

View File

@ -22,7 +22,6 @@
#endif
#include <string.h> // 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.

View File

@ -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

View File

@ -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)

View File

@ -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',

View File

@ -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) {

View File

@ -8,7 +8,6 @@
#include <stddef.h> // for size_t
#include <stdint.h> // 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___ */

View File

@ -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);

View File

@ -8,7 +8,6 @@
#include <stdint.h> // for uint8_t, uint16_t
#include <sys/types.h> // 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;

View File

@ -8,7 +8,6 @@
#include "nsCoord.h"
#include "nsPoint.h"
#include "gfxCore.h"
#include "mozilla/gfx/BaseMargin.h"
struct nsMargin : public mozilla::gfx::BaseMargin<nscoord, nsMargin> {

View File

@ -10,7 +10,6 @@
#include <stdio.h> // for FILE
#include <stdint.h> // for int32_t, int64_t
#include <algorithm> // 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<nscoord, nsRect, nsPoint, nsSize, nsMargin> {
typedef mozilla::gfx::BaseRect<nscoord, nsRect, nsPoint, nsSize, nsMargin> 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 */

View File

@ -9,7 +9,6 @@
#include <stddef.h> // for size_t
#include <stdint.h> // for uint32_t, uint64_t
#include <sys/types.h> // 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 <typename Derived, typename Rect, typename Point, typename Margin>
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<nsIntRegion, mozilla::gfx::IntRect, nsIntPoint, nsIntMargin>
class nsIntRegion : public mozilla::gfx::BaseIntRegion<nsIntRegion, mozilla::gfx::IntRect, nsIntPoint, nsIntMargin>
{
public:
// Forward constructors.

View File

@ -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();

View File

@ -6,10 +6,9 @@
#ifndef nsTransform2D_h___
#define nsTransform2D_h___
#include "gfxCore.h"
#include "nsCoord.h"
class NS_GFX nsTransform2D
class nsTransform2D
{
private:
/**

View File

@ -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);
}
}

View File

@ -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,

View File

@ -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

View File

@ -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,

View File

@ -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,

View File

@ -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.

View File

@ -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

View File

@ -8,7 +8,6 @@
#include "nsIPrintSession.h"
#include "nsWeakReference.h"
#include "gfxCore.h"
//*****************************************************************************
//*** nsPrintSession

View File

@ -7,7 +7,6 @@
#ifndef nsPrintSettingsImpl_h__
#define nsPrintSettingsImpl_h__
#include "gfxCore.h"
#include "nsIPrintSettings.h"
#include "nsMargin.h"
#include "nsString.h"