Bug 1278302 - Add failureid for WARP failIfMajorPerformanceCaveat. r=jrmuizel draft
authorBenoit Girard <b56girard@gmail.com>
Mon, 06 Jun 2016 13:33:13 -0400
changeset 375762 cdb3cfc40bd85a1bc1e8943c2f60b5d9f08b1b2e
parent 375756 1eaf4e281b2415f0adcae7e9585a29d912685358
child 522966 c69ad30637c92dbb6d93b02e2f5a3a77ea702218
push id20379
push userb56girard@gmail.com
push dateMon, 06 Jun 2016 17:33:26 +0000
reviewersjrmuizel
bugs1278302
milestone49.0a1
Bug 1278302 - Add failureid for WARP failIfMajorPerformanceCaveat. r=jrmuizel MozReview-Commit-ID: 2Ieeaqp4Sgj
dom/canvas/WebGLContext.cpp
--- a/dom/canvas/WebGLContext.cpp
+++ b/dom/canvas/WebGLContext.cpp
@@ -933,16 +933,18 @@ WebGLContext::SetDimensions(int32_t sign
         ThrowEvent_WebGLContextCreationError(text);
         return NS_ERROR_FAILURE;
     }
     MOZ_ASSERT(gl);
     MOZ_ASSERT_IF(mOptions.alpha, gl->Caps().alpha);
 
     if (mOptions.failIfMajorPerformanceCaveat) {
         if (gl->IsWARP()) {
+            Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_FAILURE_ID,
+                                  NS_LITERAL_CSTRING("FEATURE_FAILURE_PERF_WARP"));
             const nsLiteralCString text("failIfMajorPerformanceCaveat: Driver is not"
                                         " hardware-accelerated.");
             ThrowEvent_WebGLContextCreationError(text);
             return NS_ERROR_FAILURE;
         }
     }
 
     if (!ResizeBackbuffer(width, height)) {