Bug 1300757 - log error message if SkiaGL DrawTarget fails. r=baku
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 06 Sep 2016 15:31:08 +0300
changeset 312816 eff773a2ba3e6475f3cf5d940c650e5824a19f63
parent 312815 d28195b44f260dc1cf6c787516260f33b46763fb
child 312817 0788fe67e9ae4254553d3f308cc2c3ee061023f1
push id30660
push userkwierso@gmail.com
push dateTue, 06 Sep 2016 20:10:08 +0000
treeherdermozilla-central@4ee5ddeeee28 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1300757
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 1300757 - log error message if SkiaGL DrawTarget fails. r=baku MozReview-Commit-ID: EQqXFp3W79X
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.