Changeset 137913 in webkit


Ignore:
Timestamp:
Dec 17, 2012 8:57:16 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Provide the paint count of layers through the LayerTreeAgent
https://bugs.webkit.org/show_bug.cgi?id=105024

Patch by Antoine Quint <Antoine Quint> on 2012-12-17
Reviewed by Pavel Feldman.

Source/WebCore:

We add a new optional .paintCount property to the Layer object, passing through the
relevant information from GraphicsLayer.

  • inspector/Inspector.json:
  • inspector/InspectorLayerTreeAgent.cpp:

(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):

LayoutTests:

Add the paintCount property to the expected output of the LayerTreeAgent test.

  • inspector-protocol/layer-tree-expected.txt:
  • inspector-protocol/layer-tree.html:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r137910 r137913  
     12012-12-17  Antoine Quint  <graouts@apple.com>
     2
     3        Web Inspector: Provide the paint count of layers through the LayerTreeAgent
     4        https://bugs.webkit.org/show_bug.cgi?id=105024
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Add the paintCount property to the expected output of the LayerTreeAgent test.
     9
     10        * inspector-protocol/layer-tree-expected.txt:
     11        * inspector-protocol/layer-tree.html:
     12
    1132012-12-17  Csaba Osztrogonác  <ossy@webkit.org>
    214
  • trunk/LayoutTests/inspector-protocol/layer-tree-expected.txt

    r136959 r137913  
    2828        "height": "number"
    2929    },
     30    "paintCount": "number",
    3031    "childLayers": [
    3132        {
     
    6667                        "height": 50
    6768                    },
     69                    "paintCount": "number",
    6870                    "childLayers": [
    6971                        {
     
    8385                                "height": 50
    8486                            },
     87                            "paintCount": "number",
    8588                            "childLayers": []
    8689                        }
     
    103106                        "height": 100
    104107                    },
     108                    "paintCount": "number",
    105109                    "childLayers": [
    106110                        {
     
    120124                                "height": 50
    121125                            },
     126                            "paintCount": "number",
    122127                            "childLayers": []
    123128                        }
     
    162167                        "height": "number"
    163168                    },
     169                    "paintCount": "number",
    164170                    "childLayers": []
    165171                }
     
    193199        "height": "number"
    194200    },
     201    "paintCount": "number",
    195202    "childLayers": [
    196203        {
     
    231238                        "height": 50
    232239                    },
     240                    "paintCount": "number",
    233241                    "childLayers": [
    234242                        {
     
    248256                                "height": 50
    249257                            },
     258                            "paintCount": "number",
    250259                            "childLayers": []
    251260                        }
     
    268277                        "height": 100
    269278                    },
     279                    "paintCount": "number",
    270280                    "childLayers": [
    271281                        {
     
    285295                                "height": 50
    286296                            },
     297                            "paintCount": "number",
    287298                            "childLayers": []
    288299                        }
     
    327338                        "height": "number"
    328339                    },
    329                     "childLayers": []
    330                 },
    331                 {
    332                     "layerId": "string",
    333                     "bounds": {
    334                         "x": 0,
    335                         "y": 0,
    336                         "width": 50,
    337                         "height": 50
    338                     },
    339                     "isComposited": true,
    340                     "memory": "number",
    341                     "compositedBounds": {
    342                         "x": 0,
    343                         "y": 0,
    344                         "width": 50,
    345                         "height": 50
    346                     },
     340                    "paintCount": "number",
     341                    "childLayers": []
     342                },
     343                {
     344                    "layerId": "string",
     345                    "bounds": {
     346                        "x": 0,
     347                        "y": 0,
     348                        "width": 50,
     349                        "height": 50
     350                    },
     351                    "isComposited": true,
     352                    "memory": "number",
     353                    "compositedBounds": {
     354                        "x": 0,
     355                        "y": 0,
     356                        "width": 50,
     357                        "height": 50
     358                    },
     359                    "paintCount": "number",
    347360                    "childLayers": []
    348361                }
  • trunk/LayoutTests/inspector-protocol/layer-tree.html

    r136959 r137913  
    169169        function replacer(key, value)
    170170        {
    171             if (key === "layerId" || key === "memory")
     171            if (key === "layerId" || key === "memory" || key === "paintCount")
    172172                return typeof(value);
    173173
  • trunk/Source/WebCore/ChangeLog

    r137912 r137913  
     12012-12-17  Antoine Quint  <graouts@apple.com>
     2
     3        Web Inspector: Provide the paint count of layers through the LayerTreeAgent
     4        https://bugs.webkit.org/show_bug.cgi?id=105024
     5
     6        Reviewed by Pavel Feldman.
     7
     8        We add a new optional .paintCount property to the Layer object, passing through the
     9        relevant information from GraphicsLayer.
     10
     11        * inspector/Inspector.json:
     12        * inspector/InspectorLayerTreeAgent.cpp:
     13        (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
     14
    1152012-12-17  Pavel Feldman  <pfeldman@chromium.org>
    216
  • trunk/Source/WebCore/inspector/Inspector.json

    r137751 r137913  
    33323332                    { "name": "bounds", "$ref": "IntRect", "description": "Bounds of the layer." },
    33333333                    { "name": "isComposited", "type": "boolean", "description": "Indicates whether this layer is composited." },
     3334                    { "name": "paintCount", "type": "integer", "optional": true, "description": "Indicates how many time this layer has painted." },
    33343335                    { "name": "memory", "type": "integer", "optional": true, "description": "Estimated memory used by this layer." },
    33353336                    { "name": "compositedBounds", "$ref": "IntRect", "optional": true, "description": "The bounds of the composited layer." },
  • trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp

    r137730 r137913  
    138138        layerObject->setMemory(backing->backingStoreMemoryEstimate());
    139139        layerObject->setCompositedBounds(buildObjectForIntRect(backing->compositedBounds()));
     140        layerObject->setPaintCount(backing->graphicsLayer()->repaintCount());
    140141    }
    141142
Note: See TracChangeset for help on using the changeset viewer.