Bug 846360 - Fix build error on older clang versions on mac. r=jrmuizel
authorRaul <raul.tabacu@gmail.com>
Wed, 03 Apr 2013 13:14:00 +0200
changeset 129669 35f98c472fb1
parent 129668 22b4a153b3c5
child 129670 55f750590259
push id24585
push userryanvm@gmail.com
push dateWed, 24 Apr 2013 00:49:33 +0000
treeherdermozilla-central@fef5f202b2dc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs846360
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 846360 - Fix build error on older clang versions on mac. r=jrmuizel
gfx/thebes/gfxPlatformMac.cpp
--- a/gfx/thebes/gfxPlatformMac.cpp
+++ b/gfx/thebes/gfxPlatformMac.cpp
@@ -382,18 +382,18 @@ gfxPlatformMac::CreateThebesSurfaceAlias
 {
   if (aTarget->GetType() == BACKEND_COREGRAPHICS) {
     CGContextRef cg = static_cast<CGContextRef>(aTarget->GetNativeSurface(NATIVE_SURFACE_CGCONTEXT));
     unsigned char* data = (unsigned char*)CGBitmapContextGetData(cg);
     size_t bpp = CGBitmapContextGetBitsPerPixel(cg);
     size_t stride = CGBitmapContextGetBytesPerRow(cg);
     gfxIntSize size(aTarget->GetSize().width, aTarget->GetSize().height);
     nsRefPtr<gfxImageSurface> imageSurface = new gfxImageSurface(data, size, stride, bpp == 2
-                                                                                     ? gfxImageFormat::ImageFormatRGB16_565
-                                                                                     : gfxImageFormat::ImageFormatARGB32);
+                                                                                     ? gfxASurface::ImageFormatRGB16_565
+                                                                                     : gfxASurface::ImageFormatARGB32);
     // Here we should return a gfxQuartzImageSurface but quartz will assumes that image surfaces
     // don't change which wont create a proper alias to the draw target, therefore we have to
     // return a plain image surface.
     return imageSurface.forget();
   } else {
     return GetThebesSurfaceForDrawTarget(aTarget);
   }
 }