Bug 1298345 - Dead code warning fix. r=njn
authorNicolas Silva <nsilva@mozilla.com>
Tue, 06 Sep 2016 13:19:11 +0200
changeset 312822 8ef9025fbcd34dab99a1eb8a70089722cda93ae1
parent 312821 f5ba84cadbc99ef9cf6f508834da5ce4aa1eebbb
child 312823 0bb0f5bef1a61dca5203831e322b13cb051b4463
push id30661
push userkwierso@gmail.com
push dateWed, 07 Sep 2016 00:28:11 +0000
treeherdermozilla-central@3ba67e3bb588 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs1298345
milestone51.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 1298345 - Dead code warning fix. r=njn
dom/canvas/CanvasRenderingContext2D.cpp
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -1743,18 +1743,18 @@ CanvasRenderingContext2D::TrySkiaGLTarge
   if (!glue || !glue->GetGrContext() || !glue->GetGLContext()) {
     return false;
   }
 
   SurfaceFormat format = GetSurfaceFormat();
   aOutDT = Factory::CreateDrawTargetSkiaWithGrContext(glue->GetGrContext(),
                                                       size, format);
   if (!aOutDT) {
+    gfxCriticalNote << "Failed to create a SkiaGL DrawTarget, falling back to software\n";
     return false;
-    gfxCriticalNote << "Failed to create a SkiaGL DrawTarget, falling back to software\n";
   }
 
   MOZ_ASSERT(aOutDT->GetType() == DrawTargetType::HARDWARE_RASTER);
 
   AddDemotableContext(this);
   aOutProvider = new PersistentBufferProviderBasic(aOutDT);
   mIsSkiaGL = true;
   // Drop a note in the debug builds if we ever use accelerated Skia canvas.