@@ -135,7 +135,7 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface)
135135#endif
136136 , mAccumulatedInvalidRect (0 ,0 ,0 ,0 )
137137 , mIsTransparent (false )
138- , mSurfaceType (gfxASurface::SurfaceTypeMax )
138+ , mSurfaceType (gfxSurfaceTypeMax )
139139 , mCurrentInvalidateTask (nullptr )
140140 , mCurrentAsyncSetWindowTask (nullptr )
141141 , mPendingPluginCall (false )
@@ -2770,26 +2770,26 @@ GfxFromNsRect(const nsIntRect& aRect)
27702770bool
27712771PluginInstanceChild::CreateOptSurface (void )
27722772{
2773- NS_ABORT_IF_FALSE (mSurfaceType != gfxASurface::SurfaceTypeMax ,
2773+ NS_ABORT_IF_FALSE (mSurfaceType != gfxSurfaceTypeMax ,
27742774 " Need a valid surface type here" );
27752775 NS_ASSERTION (!mCurrentSurface , " mCurrentSurfaceActor can get out of sync." );
27762776
27772777 nsRefPtr<gfxASurface> retsurf;
27782778 // Use an opaque surface unless we're transparent and *don't* have
27792779 // a background to source from.
2780- gfxASurface:: gfxImageFormat format =
2781- (mIsTransparent && !mBackground ) ? gfxASurface::ImageFormatARGB32 :
2782- gfxASurface::ImageFormatRGB24 ;
2780+ gfxImageFormat format =
2781+ (mIsTransparent && !mBackground ) ? gfxImageFormatARGB32 :
2782+ gfxImageFormatRGB24 ;
27832783
27842784#ifdef MOZ_X11
27852785 Display* dpy = mWsInfo .display ;
27862786 Screen* screen = DefaultScreenOfDisplay (dpy);
2787- if (format == gfxASurface::ImageFormatRGB24 &&
2787+ if (format == gfxImageFormatRGB24 &&
27882788 DefaultDepth (dpy, DefaultScreen (dpy)) == 16 ) {
2789- format = gfxASurface::ImageFormatRGB16_565 ;
2789+ format = gfxImageFormatRGB16_565 ;
27902790 }
27912791
2792- if (mSurfaceType == gfxASurface::SurfaceTypeXlib ) {
2792+ if (mSurfaceType == gfxSurfaceTypeXlib ) {
27932793 if (!mIsTransparent || mBackground ) {
27942794 Visual* defaultVisual = DefaultVisualOfScreen (screen);
27952795 mCurrentSurface =
@@ -2813,8 +2813,8 @@ PluginInstanceChild::CreateOptSurface(void)
28132813#endif
28142814
28152815#ifdef XP_WIN
2816- if (mSurfaceType == gfxASurface::SurfaceTypeWin32 ||
2817- mSurfaceType == gfxASurface::SurfaceTypeD2D ) {
2816+ if (mSurfaceType == gfxSurfaceTypeWin32 ||
2817+ mSurfaceType == gfxSurfaceTypeD2D ) {
28182818 bool willHaveTransparentPixels = mIsTransparent && !mBackground ;
28192819
28202820 SharedDIBSurface* s = new SharedDIBSurface ();
@@ -2853,7 +2853,7 @@ PluginInstanceChild::MaybeCreatePlatformHelperSurface(void)
28532853 mDoAlphaExtraction = false ;
28542854 bool createHelperSurface = false ;
28552855
2856- if (mCurrentSurface ->GetType () == gfxASurface::SurfaceTypeXlib ) {
2856+ if (mCurrentSurface ->GetType () == gfxSurfaceTypeXlib ) {
28572857 static_cast <gfxXlibSurface*>(mCurrentSurface .get ())->
28582858 GetColormapAndVisual (&colormap, &visual);
28592859 // Create helper surface if layer surface visual not same as default
@@ -2863,7 +2863,7 @@ PluginInstanceChild::MaybeCreatePlatformHelperSurface(void)
28632863 visual = defaultVisual;
28642864 mDoAlphaExtraction = mIsTransparent ;
28652865 }
2866- } else if (mCurrentSurface ->GetType () == gfxASurface::SurfaceTypeImage ) {
2866+ } else if (mCurrentSurface ->GetType () == gfxSurfaceTypeImage ) {
28672867 // For image layer surface we should always create helper surface
28682868 createHelperSurface = true ;
28692869 // Check if we can create helper surface with non-default visual
@@ -2916,9 +2916,9 @@ PluginInstanceChild::EnsureCurrentBuffer(void)
29162916 if (winSize != surfSize ||
29172917 (mBackground && !CanPaintOnBackground ()) ||
29182918 (mBackground &&
2919- gfxASurface::CONTENT_COLOR != mCurrentSurface ->GetContentType ()) ||
2919+ GFX_CONTENT_COLOR != mCurrentSurface ->GetContentType ()) ||
29202920 (!mBackground && mIsTransparent &&
2921- gfxASurface::CONTENT_COLOR == mCurrentSurface ->GetContentType ())) {
2921+ GFX_CONTENT_COLOR == mCurrentSurface ->GetContentType ())) {
29222922 // Don't try to use an old, invalid DC.
29232923 mWindow .window = nullptr ;
29242924 ClearCurrentSurface ();
@@ -3011,7 +3011,7 @@ PluginInstanceChild::UpdateWindowAttributes(bool aForceSetWindow)
30113011#ifdef MOZ_X11
30123012 Visual* visual = nullptr ;
30133013 Colormap colormap = 0 ;
3014- if (curSurface && curSurface->GetType () == gfxASurface::SurfaceTypeXlib ) {
3014+ if (curSurface && curSurface->GetType () == gfxSurfaceTypeXlib ) {
30153015 static_cast <gfxXlibSurface*>(curSurface.get ())->
30163016 GetColormapAndVisual (&colormap, &visual);
30173017 if (visual != mWsInfo .visual || colormap != mWsInfo .colormap ) {
@@ -3103,7 +3103,7 @@ PluginInstanceChild::PaintRectToPlatformSurface(const nsIntRect& aRect,
31033103
31043104#ifdef MOZ_X11
31053105 {
3106- NS_ASSERTION (aSurface->GetType () == gfxASurface::SurfaceTypeXlib ,
3106+ NS_ASSERTION (aSurface->GetType () == gfxSurfaceTypeXlib ,
31073107 "Non supported platform surface type");
31083108
31093109 NPEvent pluginEvent;
@@ -3197,19 +3197,19 @@ void
31973197PluginInstanceChild::PaintRectWithAlphaExtraction (const nsIntRect& aRect,
31983198 gfxASurface* aSurface)
31993199{
3200- NS_ABORT_IF_FALSE (aSurface->GetContentType () == gfxASurface::CONTENT_COLOR_ALPHA ,
3200+ NS_ABORT_IF_FALSE (aSurface->GetContentType () == GFX_CONTENT_COLOR_ALPHA ,
32013201 "Refusing to pointlessly recover alpha");
32023202
32033203 nsIntRect rect (aRect);
32043204 // If |aSurface| can be used to paint and can have alpha values
32053205 // recovered directly to it, do that to save a tmp surface and
32063206 // copy.
32073207 bool useSurfaceSubimageForBlack = false ;
3208- if (gfxASurface::SurfaceTypeImage == aSurface->GetType ()) {
3208+ if (gfxSurfaceTypeImage == aSurface->GetType ()) {
32093209 gfxImageSurface* surfaceAsImage =
32103210 static_cast <gfxImageSurface*>(aSurface);
32113211 useSurfaceSubimageForBlack =
3212- (surfaceAsImage->Format () == gfxASurface::ImageFormatARGB32 );
3212+ (surfaceAsImage->Format () == gfxImageFormatARGB32 );
32133213 // If we're going to use a subimage, nudge the rect so that we
32143214 // can use optimal alpha recovery. If we're not using a
32153215 // subimage, the temporaries should automatically get
@@ -3228,7 +3228,7 @@ PluginInstanceChild::PaintRectWithAlphaExtraction(const nsIntRect& aRect,
32283228 gfxPoint deviceOffset = -targetRect.TopLeft();
32293229
32303230 // We always use a temporary "white image"
3231- whiteImage = new gfxImageSurface (targetSize, gfxASurface::ImageFormatRGB24 );
3231+ whiteImage = new gfxImageSurface (targetSize, gfxImageFormatRGB24 );
32323232 if (whiteImage->CairoStatus ()) {
32333233 return ;
32343234 }
@@ -3271,7 +3271,7 @@ PluginInstanceChild::PaintRectWithAlphaExtraction(const nsIntRect& aRect,
32713271 blackImage = surface->GetSubimage (targetRect);
32723272 } else {
32733273 blackImage = new gfxImageSurface (targetSize,
3274- gfxASurface::ImageFormatARGB32 );
3274+ gfxImageFormatARGB32 );
32753275 }
32763276
32773277 // Paint onto black background
@@ -3415,7 +3415,7 @@ PluginInstanceChild::ShowPluginFrame()
34153415 }
34163416
34173417 bool haveTransparentPixels =
3418- gfxASurface::CONTENT_COLOR_ALPHA == mCurrentSurface ->GetContentType ();
3418+ GFX_CONTENT_COLOR_ALPHA == mCurrentSurface ->GetContentType ();
34193419 PLUGIN_LOG_DEBUG (
34203420 (" [InstanceChild][%p] Painting%s <x=%d,y=%d, w=%d,h=%d> on surface <w=%d,h=%d>" ,
34213421 this , haveTransparentPixels ? " with alpha" : " " ,
@@ -3481,7 +3481,7 @@ PluginInstanceChild::ShowPluginFrame()
34813481 (uint16_t )rect.YMost (), (uint16_t )rect.XMost () };
34823482 SurfaceDescriptor currSurf;
34833483#ifdef MOZ_X11
3484- if (mCurrentSurface ->GetType () == gfxASurface::SurfaceTypeXlib ) {
3484+ if (mCurrentSurface ->GetType () == gfxSurfaceTypeXlib ) {
34853485 gfxXlibSurface *xsurf = static_cast <gfxXlibSurface*>(mCurrentSurface .get ());
34863486 currSurf = SurfaceDescriptorX11 (xsurf);
34873487 // Need to sync all pending x-paint requests
@@ -3533,7 +3533,7 @@ PluginInstanceChild::ReadbackDifferenceRect(const nsIntRect& rect)
35333533 // We can read safely from XSurface,SharedDIBSurface and Unsafe SharedMemory,
35343534 // because PluginHost is not able to modify that surface
35353535#if defined(MOZ_X11)
3536- if (mBackSurface ->GetType () != gfxASurface::SurfaceTypeXlib &&
3536+ if (mBackSurface ->GetType () != gfxSurfaceTypeXlib &&
35373537 !gfxSharedImageSurface::IsSharedImage (mBackSurface ))
35383538 return false ;
35393539#elif defined(XP_WIN)
0 commit comments