mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Remove all C++ Telemetry Accumulation calls.
This creates a number of stubs and leaves some surrounding code that may be irrelevant (eg. recorded time stamps, status variables). Stub resolution/removal should be a follow-up to this.
This commit is contained in:
parent
ac3468d5cc
commit
8c8145e620
186 changed files with 48 additions and 2957 deletions
|
|
@ -825,10 +825,6 @@ NS_IMETHODIMP
|
|||
WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
||||
{
|
||||
if (signedWidth < 0 || signedHeight < 0) {
|
||||
if (!gl) {
|
||||
Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_FAILURE_ID,
|
||||
NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_SIZE"));
|
||||
}
|
||||
GenerateWarning("Canvas size is too large (seems like a negative value wrapped)");
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
|
@ -884,12 +880,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCString failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_UNKOWN");
|
||||
auto autoTelemetry = mozilla::MakeScopeExit([&] {
|
||||
Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_FAILURE_ID,
|
||||
failureId);
|
||||
});
|
||||
|
||||
// End of early return cases.
|
||||
// At this point we know that we're not just resizing an existing context,
|
||||
// we are initializing a new context.
|
||||
|
|
@ -911,7 +901,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
|||
// resource handles created from older context generations.
|
||||
if (!(mGeneration + 1).isValid()) {
|
||||
// exit without changing the value of mGeneration
|
||||
failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_TOO_MANY");
|
||||
const nsLiteralCString text("Too many WebGL contexts created this run.");
|
||||
ThrowEvent_WebGLContextCreationError(text);
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
@ -928,11 +917,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
|||
disabled |= gfxPlatform::InSafeMode();
|
||||
|
||||
if (disabled) {
|
||||
if (gfxPlatform::InSafeMode()) {
|
||||
failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_SAFEMODE");
|
||||
} else {
|
||||
failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_DISABLED");
|
||||
}
|
||||
const nsLiteralCString text("WebGL is currently disabled.");
|
||||
ThrowEvent_WebGLContextCreationError(text);
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
@ -945,7 +929,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
|||
if (mOptions.failIfMajorPerformanceCaveat) {
|
||||
nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
|
||||
if (!HasAcceleratedLayers(gfxInfo)) {
|
||||
failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_PERF_CAVEAT");
|
||||
const nsLiteralCString text("failIfMajorPerformanceCaveat: Compositor is not"
|
||||
" hardware-accelerated.");
|
||||
ThrowEvent_WebGLContextCreationError(text);
|
||||
|
|
@ -961,12 +944,9 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
|||
if (!CreateAndInitGL(forceEnabled, &failReasons)) {
|
||||
nsCString text("WebGL creation failed: ");
|
||||
for (const auto& cur : failReasons) {
|
||||
Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_FAILURE_ID, cur.key);
|
||||
|
||||
text.AppendASCII("\n* ");
|
||||
text.Append(cur.info);
|
||||
}
|
||||
failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_REASON");
|
||||
ThrowEvent_WebGLContextCreationError(text);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
|
@ -978,7 +958,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
|||
DestroyResourcesAndContext();
|
||||
MOZ_ASSERT(!gl);
|
||||
|
||||
failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_PERF_WARP");
|
||||
const nsLiteralCString text("failIfMajorPerformanceCaveat: Driver is not"
|
||||
" hardware-accelerated.");
|
||||
ThrowEvent_WebGLContextCreationError(text);
|
||||
|
|
@ -992,7 +971,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
|||
DestroyResourcesAndContext();
|
||||
MOZ_ASSERT(!gl);
|
||||
|
||||
failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_DXGL_INTEROP2");
|
||||
const nsLiteralCString text("Caveat: WGL without DXGLInterop2.");
|
||||
ThrowEvent_WebGLContextCreationError(text);
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
@ -1001,7 +979,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
|||
}
|
||||
|
||||
if (!ResizeBackbuffer(width, height)) {
|
||||
failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_BACKBUFFER");
|
||||
const nsLiteralCString text("Initializing WebGL backbuffer failed.");
|
||||
ThrowEvent_WebGLContextCreationError(text);
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
@ -1085,7 +1062,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
|||
|
||||
//////
|
||||
|
||||
failureId = NS_LITERAL_CSTRING("SUCCESS");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue