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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 { CompositingReasonClipsCompositingDescendants, "clipsCompositingDescend
ants" }, | 304 { CompositingReasonClipsCompositingDescendants, "clipsCompositingDescend
ants" }, |
305 { CompositingReasonPerspective, "perspective" }, | 305 { CompositingReasonPerspective, "perspective" }, |
306 { CompositingReasonPreserve3D, "preserve3D" }, | 306 { CompositingReasonPreserve3D, "preserve3D" }, |
307 { CompositingReasonRoot, "root" }, | 307 { CompositingReasonRoot, "root" }, |
308 { CompositingReasonLayerForClip, "layerForClip" }, | 308 { CompositingReasonLayerForClip, "layerForClip" }, |
309 { CompositingReasonLayerForScrollbar, "layerForScrollbar" }, | 309 { CompositingReasonLayerForScrollbar, "layerForScrollbar" }, |
310 { CompositingReasonLayerForScrollingContainer, "layerForScrollingContain
er" }, | 310 { CompositingReasonLayerForScrollingContainer, "layerForScrollingContain
er" }, |
311 { CompositingReasonLayerForForeground, "layerForForeground" }, | 311 { CompositingReasonLayerForForeground, "layerForForeground" }, |
312 { CompositingReasonLayerForBackground, "layerForBackground" }, | 312 { CompositingReasonLayerForBackground, "layerForBackground" }, |
313 { CompositingReasonLayerForMask, "layerForMask" }, | 313 { CompositingReasonLayerForMask, "layerForMask" }, |
314 { CompositingReasonLayerForVideoOverlay, "layerForVideoOverlay" } | 314 { CompositingReasonLayerForVideoOverlay, "layerForVideoOverlay" }, |
| 315 { CompositingReasonIsolateCompositedDescendants, "isolateCompositedDesce
ndants"} |
315 }; | 316 }; |
316 | 317 |
317 const GraphicsLayer* graphicsLayer = layerById(errorString, layerId); | 318 const GraphicsLayer* graphicsLayer = layerById(errorString, layerId); |
318 if (!graphicsLayer) | 319 if (!graphicsLayer) |
319 return; | 320 return; |
320 WebKit::WebCompositingReasons reasonsBitmask = graphicsLayer->compositingRea
sons(); | 321 WebKit::WebCompositingReasons reasonsBitmask = graphicsLayer->compositingRea
sons(); |
321 reasonStrings = TypeBuilder::Array<String>::create(); | 322 reasonStrings = TypeBuilder::Array<String>::create(); |
322 for (size_t i = 0; i < WTF_ARRAY_LENGTH(compositingReasonNames); ++i) { | 323 for (size_t i = 0; i < WTF_ARRAY_LENGTH(compositingReasonNames); ++i) { |
323 if (!(reasonsBitmask & compositingReasonNames[i].mask)) | 324 if (!(reasonsBitmask & compositingReasonNames[i].mask)) |
324 continue; | 325 continue; |
325 reasonStrings->addItem(compositingReasonNames[i].protocolName); | 326 reasonStrings->addItem(compositingReasonNames[i].protocolName); |
326 #ifndef _NDEBUG | 327 #ifndef _NDEBUG |
327 reasonsBitmask &= ~compositingReasonNames[i].mask; | 328 reasonsBitmask &= ~compositingReasonNames[i].mask; |
328 #endif | 329 #endif |
329 } | 330 } |
330 ASSERT(!reasonsBitmask); | 331 ASSERT(!reasonsBitmask); |
331 } | 332 } |
332 | 333 |
333 } // namespace WebCore | 334 } // namespace WebCore |
OLD | NEW |