Bug 1299485 - fix USE_SKIA_GPU ifdefs. r=mchang
authorLee Salzman <lsalzman@mozilla.com>
Thu, 01 Sep 2016 21:10:39 -0400
changeset 312368 78bf92d3a0f138ff39eeb20062f206eb48cc9b88
parent 312366 e3bc47928a98bf521be6d2a68d5789e8cae9f52d
child 312369 0cfb84806c0863af4facbdde2b37ac5fdd40567c
push id20447
push userkwierso@gmail.com
push dateFri, 02 Sep 2016 20:36:44 +0000
treeherderfx-team@969397f22187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmchang
bugs1299485
milestone51.0a1
Bug 1299485 - fix USE_SKIA_GPU ifdefs. r=mchang
dom/canvas/CanvasRenderingContext2D.cpp
gfx/2d/DrawTargetSkia.cpp
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -1733,17 +1733,17 @@ CanvasRenderingContext2D::TrySkiaGLTarge
 
   if (!layerManager) {
     return false;
   }
 
   DemoteOldestContextIfNecessary();
   mBufferProvider = nullptr;
 
-#if USE_SKIA_GPU
+#ifdef USE_SKIA_GPU
   SkiaGLGlue* glue = gfxPlatform::GetPlatform()->GetSkiaGLGlue();
   if (!glue || !glue->GetGrContext() || !glue->GetGLContext()) {
     return false;
   }
 
   SurfaceFormat format = GetSurfaceFormat();
   aOutDT = Factory::CreateDrawTargetSkiaWithGrContext(glue->GetGrContext(),
                                                       size, format);
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -1556,17 +1556,17 @@ DrawTargetSkia::OptimizeSourceSurface(So
   MOZ_ASSERT(VerifyRGBXFormat(dataSurface->GetData(), dataSurface->GetSize(),
                               dataSurface->Stride(), dataSurface->GetFormat()));
   return dataSurface.forget();
 }
 
 already_AddRefed<SourceSurface>
 DrawTargetSkia::CreateSourceSurfaceFromNativeSurface(const NativeSurface &aSurface) const
 {
-#if USE_SKIA_GPU
+#ifdef USE_SKIA_GPU
   if (aSurface.mType == NativeSurfaceType::OPENGL_TEXTURE && UsingSkiaGPU()) {
     // Wrap the OpenGL texture id in a Skia texture handle.
     GrBackendTextureDesc texDesc;
     texDesc.fWidth = aSurface.mSize.width;
     texDesc.fHeight = aSurface.mSize.height;
     texDesc.fOrigin = kTopLeft_GrSurfaceOrigin;
     texDesc.fConfig = GfxFormatToGrConfig(aSurface.mFormat);