OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 { CompositingReasonClipsCompositingDescendants, "clipsCompositingDescend
ants" }, | 274 { CompositingReasonClipsCompositingDescendants, "clipsCompositingDescend
ants" }, |
275 { CompositingReasonPerspective, "perspective" }, | 275 { CompositingReasonPerspective, "perspective" }, |
276 { CompositingReasonPreserve3D, "preserve3D" }, | 276 { CompositingReasonPreserve3D, "preserve3D" }, |
277 { CompositingReasonRoot, "root" }, | 277 { CompositingReasonRoot, "root" }, |
278 { CompositingReasonLayerForClip, "layerForClip" }, | 278 { CompositingReasonLayerForClip, "layerForClip" }, |
279 { CompositingReasonLayerForScrollbar, "layerForScrollbar" }, | 279 { CompositingReasonLayerForScrollbar, "layerForScrollbar" }, |
280 { CompositingReasonLayerForScrollingContainer, "layerForScrollingContain
er" }, | 280 { CompositingReasonLayerForScrollingContainer, "layerForScrollingContain
er" }, |
281 { CompositingReasonLayerForForeground, "layerForForeground" }, | 281 { CompositingReasonLayerForForeground, "layerForForeground" }, |
282 { CompositingReasonLayerForBackground, "layerForBackground" }, | 282 { CompositingReasonLayerForBackground, "layerForBackground" }, |
283 { CompositingReasonLayerForMask, "layerForMask" }, | 283 { CompositingReasonLayerForMask, "layerForMask" }, |
284 { CompositingReasonLayerForVideoOverlay, "layerForVideoOverlay" } | 284 { CompositingReasonLayerForVideoOverlay, "layerForVideoOverlay" }, |
| 285 { CompositingReasonIsolateCompositedDescendants, "isolateCompositedDesce
ndants" } |
285 }; | 286 }; |
286 | 287 |
287 const GraphicsLayer* graphicsLayer = layerById(errorString, layerId); | 288 const GraphicsLayer* graphicsLayer = layerById(errorString, layerId); |
288 if (!graphicsLayer) | 289 if (!graphicsLayer) |
289 return; | 290 return; |
290 blink::WebCompositingReasons reasonsBitmask = graphicsLayer->compositingReas
ons(); | 291 blink::WebCompositingReasons reasonsBitmask = graphicsLayer->compositingReas
ons(); |
291 reasonStrings = TypeBuilder::Array<String>::create(); | 292 reasonStrings = TypeBuilder::Array<String>::create(); |
292 for (size_t i = 0; i < WTF_ARRAY_LENGTH(compositingReasonNames); ++i) { | 293 for (size_t i = 0; i < WTF_ARRAY_LENGTH(compositingReasonNames); ++i) { |
293 if (!(reasonsBitmask & compositingReasonNames[i].mask)) | 294 if (!(reasonsBitmask & compositingReasonNames[i].mask)) |
294 continue; | 295 continue; |
295 reasonStrings->addItem(compositingReasonNames[i].protocolName); | 296 reasonStrings->addItem(compositingReasonNames[i].protocolName); |
296 #ifndef _NDEBUG | 297 #ifndef _NDEBUG |
297 reasonsBitmask &= ~compositingReasonNames[i].mask; | 298 reasonsBitmask &= ~compositingReasonNames[i].mask; |
298 #endif | 299 #endif |
299 } | 300 } |
300 ASSERT(!reasonsBitmask); | 301 ASSERT(!reasonsBitmask); |
301 } | 302 } |
302 | 303 |
303 } // namespace WebCore | 304 } // namespace WebCore |
OLD | NEW |