Title: [211229] trunk/Source
Revision
211229
Author
cdu...@apple.com
Date
2017-01-26 13:34:45 -0800 (Thu, 26 Jan 2017)

Log Message

Fix WebGL diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=167463
<rdar://problem/30216981>

Reviewed by Alex Christensen.

Fix WebGL diagnostic logging so that it no longer uses logDiagnosticMessageWithValue().
This is because the value apparently needs to be numeric on Mac.

Source/WebCore:

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::checkForContextLossHandling):
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::pageHandlesWebGLContextLossKey):
(WebCore::WebCore::DiagnosticLoggingKeys::webGLStateKey):
(WebCore::DiagnosticLoggingKeys::stateKey): Deleted.
(WebCore::DiagnosticLoggingKeys::handlesContextLossKey): Deleted.
(WebCore::WebCore::DiagnosticLoggingKeys::webGLKey): Deleted.
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

* UIProcess/HighPerformanceGraphicsUsageSampler.cpp:
(WebKit::HighPerformanceGraphicsUsageSampler::timerFired):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (211228 => 211229)


--- trunk/Source/WebCore/ChangeLog	2017-01-26 21:19:38 UTC (rev 211228)
+++ trunk/Source/WebCore/ChangeLog	2017-01-26 21:34:45 UTC (rev 211229)
@@ -1,3 +1,24 @@
+2017-01-26  Chris Dumez  <cdu...@apple.com>
+
+        Fix WebGL diagnostic logging
+        https://bugs.webkit.org/show_bug.cgi?id=167463
+        <rdar://problem/30216981>
+
+        Reviewed by Alex Christensen.
+
+        Fix WebGL diagnostic logging so that it no longer uses logDiagnosticMessageWithValue().
+        This is because the value apparently needs to be numeric on Mac.
+
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::WebGLRenderingContextBase::checkForContextLossHandling):
+        * page/DiagnosticLoggingKeys.cpp:
+        (WebCore::DiagnosticLoggingKeys::pageHandlesWebGLContextLossKey):
+        (WebCore::WebCore::DiagnosticLoggingKeys::webGLStateKey):
+        (WebCore::DiagnosticLoggingKeys::stateKey): Deleted.
+        (WebCore::DiagnosticLoggingKeys::handlesContextLossKey): Deleted.
+        (WebCore::WebCore::DiagnosticLoggingKeys::webGLKey): Deleted.
+        * page/DiagnosticLoggingKeys.h:
+
 2017-01-26  Zalan Bujtas  <za...@apple.com>
 
         Simple line layout: Add support for -webkit-hyphenate-limit-lines

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (211228 => 211229)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2017-01-26 21:19:38 UTC (rev 211228)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2017-01-26 21:34:45 UTC (rev 211229)
@@ -501,7 +501,7 @@
         return;
 
     bool handlesContextLoss = canvas().hasEventListeners(eventNames().webglcontextlostEvent) && canvas().hasEventListeners(eventNames().webglcontextrestoredEvent);
-    page->diagnosticLoggingClient().logDiagnosticMessageWithValue(DiagnosticLoggingKeys::webGLKey(), DiagnosticLoggingKeys::handlesContextLossKey(), handlesContextLoss ? DiagnosticLoggingKeys::yesKey() : DiagnosticLoggingKeys::noKey(), ShouldSample::No);
+    page->diagnosticLoggingClient().logDiagnosticMessage(DiagnosticLoggingKeys::pageHandlesWebGLContextLossKey(), handlesContextLoss ? DiagnosticLoggingKeys::yesKey() : DiagnosticLoggingKeys::noKey(), ShouldSample::No);
 }
 
 void WebGLRenderingContextBase::registerWithWebGLStateTracker()

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp (211228 => 211229)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2017-01-26 21:19:38 UTC (rev 211228)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2017-01-26 21:34:45 UTC (rev 211229)
@@ -58,6 +58,11 @@
     return ASCIILiteral("postPageBackgrounding");
 }
 
+String DiagnosticLoggingKeys::pageHandlesWebGLContextLossKey()
+{
+    return ASCIILiteral("pageHandlesWebGLContextLoss");
+}
+
 String DiagnosticLoggingKeys::postPageLoadKey()
 {
     return ASCIILiteral("postPageLoad");
@@ -483,11 +488,6 @@
     return ASCIILiteral("source");
 }
 
-String DiagnosticLoggingKeys::stateKey()
-{
-    return ASCIILiteral("state");
-}
-
 String DiagnosticLoggingKeys::streamingMedia()
 {
     return ASCIILiteral("streamingMedia");
@@ -658,11 +658,6 @@
     return ASCIILiteral("font");
 }
 
-String DiagnosticLoggingKeys::handlesContextLossKey()
-{
-    return ASCIILiteral("handlesContextLoss");
-}
-
 String DiagnosticLoggingKeys::prunedDueToMemoryPressureKey()
 {
     return ASCIILiteral("pruned.memoryPressure");
@@ -688,9 +683,9 @@
     return ASCIILiteral("notInCache");
 }
 
-String WebCore::DiagnosticLoggingKeys::webGLKey()
+String WebCore::DiagnosticLoggingKeys::webGLStateKey()
 {
-    return ASCIILiteral("webGL");
+    return ASCIILiteral("webGLState");
 }
 
 String DiagnosticLoggingKeys::memoryUsageToDiagnosticLoggingKey(uint64_t memoryUsage)

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.h (211228 => 211229)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2017-01-26 21:19:38 UTC (rev 211228)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2017-01-26 21:34:45 UTC (rev 211229)
@@ -56,7 +56,6 @@
     WEBCORE_EXPORT static String entryWronglyNotWarmedUpKey();
     static String expiredKey();
     static String fontKey();
-    static String handlesContextLossKey();
     static String hasPluginsKey();
     static String httpsNoStoreKey();
     static String imageKey();
@@ -101,6 +100,7 @@
     static String pageContainsAtLeastOnePluginKey();
     static String pageContainsMediaEngineKey();
     static String pageContainsPluginKey();
+    static String pageHandlesWebGLContextLossKey();
     static String pageLoadedKey();
     static String playedKey();
     static String pluginLoadedKey();
@@ -128,7 +128,6 @@
     static String sameLoadKey();
     static String scriptKey();
     static String sourceKey();
-    WEBCORE_EXPORT static String stateKey();
     WEBCORE_EXPORT static String streamingMedia();
     static String styleSheetKey();
     WEBCORE_EXPORT static String successfulSpeculativeWarmupWithRevalidationKey();
@@ -158,7 +157,7 @@
     WEBCORE_EXPORT static String visibleAndActiveStateKey();
     WEBCORE_EXPORT static String wastedSpeculativeWarmupWithRevalidationKey();
     WEBCORE_EXPORT static String wastedSpeculativeWarmupWithoutRevalidationKey();
-    WEBCORE_EXPORT static String webGLKey();
+    WEBCORE_EXPORT static String webGLStateKey();
     WEBCORE_EXPORT static String webViewKey();
     static String yesKey();
     WEBCORE_EXPORT static String zoomedKey();

Modified: trunk/Source/WebKit2/ChangeLog (211228 => 211229)


--- trunk/Source/WebKit2/ChangeLog	2017-01-26 21:19:38 UTC (rev 211228)
+++ trunk/Source/WebKit2/ChangeLog	2017-01-26 21:34:45 UTC (rev 211229)
@@ -1,3 +1,17 @@
+2017-01-26  Chris Dumez  <cdu...@apple.com>
+
+        Fix WebGL diagnostic logging
+        https://bugs.webkit.org/show_bug.cgi?id=167463
+        <rdar://problem/30216981>
+
+        Reviewed by Alex Christensen.
+
+        Fix WebGL diagnostic logging so that it no longer uses logDiagnosticMessageWithValue().
+        This is because the value apparently needs to be numeric on Mac.
+
+        * UIProcess/HighPerformanceGraphicsUsageSampler.cpp:
+        (WebKit::HighPerformanceGraphicsUsageSampler::timerFired):
+
 2017-01-26  Wenson Hsieh  <wenson_hs...@apple.com>
 
         Add support for recognizing data interaction gestures in WebKit2

Modified: trunk/Source/WebKit2/UIProcess/HighPerformanceGraphicsUsageSampler.cpp (211228 => 211229)


--- trunk/Source/WebKit2/UIProcess/HighPerformanceGraphicsUsageSampler.cpp	2017-01-26 21:19:38 UTC (rev 211228)
+++ trunk/Source/WebKit2/UIProcess/HighPerformanceGraphicsUsageSampler.cpp	2017-01-26 21:34:45 UTC (rev 211229)
@@ -72,7 +72,7 @@
     else if (isUsingHighPerformanceWebGL)
         state = DiagnosticLoggingKeys::activeInBackgroundTabOnlyKey();
 
-    firstPage->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::webGLKey(), DiagnosticLoggingKeys::stateKey(), state, false);
+    firstPage->logDiagnosticMessage(DiagnosticLoggingKeys::webGLStateKey(), state, false);
 }
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to