Title: [121587] branches/chromium/1180/Source/WebCore/platform/graphics/chromium/cc/CCOverdrawMetrics.cpp
Revision
121587
Author
[email protected]
Date
2012-06-29 14:13:19 -0700 (Fri, 29 Jun 2012)

Log Message

Merge 121224 - [chromium] CCOverdrawMetrics should use the deviceViewportSize to count actual pixels
https://bugs.webkit.org/show_bug.cgi?id=89922

Reviewed by Adrienne Walker.

* platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
(WebCore::CCOverdrawMetrics::recordMetricsInternal):


[email protected]
Review URL: https://chromiumcodereview.appspot.com/10704050

Modified Paths

Diff

Modified: branches/chromium/1180/Source/WebCore/platform/graphics/chromium/cc/CCOverdrawMetrics.cpp (121586 => 121587)


--- branches/chromium/1180/Source/WebCore/platform/graphics/chromium/cc/CCOverdrawMetrics.cpp	2012-06-29 21:11:39 UTC (rev 121586)
+++ branches/chromium/1180/Source/WebCore/platform/graphics/chromium/cc/CCOverdrawMetrics.cpp	2012-06-29 21:13:19 UTC (rev 121587)
@@ -131,9 +131,9 @@
 void CCOverdrawMetrics::recordMetricsInternal(MetricsType metricsType, const LayerTreeHostType* layerTreeHost) const
 {
     // This gives approximately 10x the percentage of pixels to fill the viewport once.
-    float normalization = 1000.f / (layerTreeHost->viewportSize().width() * layerTreeHost->viewportSize().height());
+    float normalization = 1000.f / (layerTreeHost->deviceViewportSize().width() * layerTreeHost->deviceViewportSize().height());
     // This gives approximately 100x the percentage of tiles to fill the viewport once, if all tiles were 256x256.
-    float tileNormalization = 10000.f / (layerTreeHost->viewportSize().width() / 256.f * layerTreeHost->viewportSize().height() / 256.f);
+    float tileNormalization = 10000.f / (layerTreeHost->deviceViewportSize().width() / 256.f * layerTreeHost->deviceViewportSize().height() / 256.f);
 
     switch (metricsType) {
     case DrawingToScreen:
@@ -142,8 +142,8 @@
         WebKit::Platform::current()->histogramCustomCounts("Renderer4.pixelCountCulled_Draw", static_cast<int>(normalization * m_pixelsCulledForDrawing), 100, 1000000, 50);
 
         {
-            TRACE_COUNTER_ID1("webkit", "DrawPixelsCulled", layerTreeHost, m_pixelsCulledForDrawing);
-            TRACE_EVENT2("webkit", "CCOverdrawMetrics", "PixelsDrawnOpaque", m_pixelsDrawnOpaque, "PixelsDrawnTranslucent", m_pixelsDrawnTranslucent);
+            TRACE_COUNTER_ID1("cc", "DrawPixelsCulled", layerTreeHost, m_pixelsCulledForDrawing);
+            TRACE_EVENT2("cc", "CCOverdrawMetrics", "PixelsDrawnOpaque", m_pixelsDrawnOpaque, "PixelsDrawnTranslucent", m_pixelsDrawnTranslucent);
         }
         break;
     case UpdateAndCommit:
@@ -153,12 +153,12 @@
         WebKit::Platform::current()->histogramCustomCounts("Renderer4.tileCountCulled_Upload", static_cast<int>(tileNormalization * m_tilesCulledForUpload), 100, 10000000, 50);
 
         {
-            TRACE_COUNTER_ID1("webkit", "UploadTilesCulled", layerTreeHost, m_tilesCulledForUpload);
-            TRACE_EVENT2("webkit", "CCOverdrawMetrics", "PixelsUploadedOpaque", m_pixelsUploadedOpaque, "PixelsUploadedTranslucent", m_pixelsUploadedTranslucent);
+            TRACE_COUNTER_ID1("cc", "UploadTilesCulled", layerTreeHost, m_tilesCulledForUpload);
+            TRACE_EVENT2("cc", "CCOverdrawMetrics", "PixelsUploadedOpaque", m_pixelsUploadedOpaque, "PixelsUploadedTranslucent", m_pixelsUploadedTranslucent);
         }
         {
             // This must be in a different scope than the TRACE_EVENT2 above.
-            TRACE_EVENT1("webkit", "CCOverdrawPaintMetrics", "PixelsPainted", m_pixelsPainted);
+            TRACE_EVENT1("cc", "CCOverdrawPaintMetrics", "PixelsPainted", m_pixelsPainted);
         }
         break;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to