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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 { CompositingReasonClipsCompositingDescendants, "clipsCompositingDescend
ants" }, | 276 { CompositingReasonClipsCompositingDescendants, "clipsCompositingDescend
ants" }, |
277 { CompositingReasonPerspective, "perspective" }, | 277 { CompositingReasonPerspective, "perspective" }, |
278 { CompositingReasonPreserve3D, "preserve3D" }, | 278 { CompositingReasonPreserve3D, "preserve3D" }, |
279 { CompositingReasonRoot, "root" }, | 279 { CompositingReasonRoot, "root" }, |
280 { CompositingReasonLayerForClip, "layerForClip" }, | 280 { CompositingReasonLayerForClip, "layerForClip" }, |
281 { CompositingReasonLayerForScrollbar, "layerForScrollbar" }, | 281 { CompositingReasonLayerForScrollbar, "layerForScrollbar" }, |
282 { CompositingReasonLayerForScrollingContainer, "layerForScrollingContain
er" }, | 282 { CompositingReasonLayerForScrollingContainer, "layerForScrollingContain
er" }, |
283 { CompositingReasonLayerForForeground, "layerForForeground" }, | 283 { CompositingReasonLayerForForeground, "layerForForeground" }, |
284 { CompositingReasonLayerForBackground, "layerForBackground" }, | 284 { CompositingReasonLayerForBackground, "layerForBackground" }, |
285 { CompositingReasonLayerForMask, "layerForMask" }, | 285 { CompositingReasonLayerForMask, "layerForMask" }, |
286 { CompositingReasonLayerForVideoOverlay, "layerForVideoOverlay" } | 286 { CompositingReasonLayerForVideoOverlay, "layerForVideoOverlay" }, |
| 287 { CompositingReasonIsolateCompositedDescendants, "isolateCompositedDesce
ndants" } |
287 }; | 288 }; |
288 | 289 |
289 const GraphicsLayer* graphicsLayer = layerById(errorString, layerId); | 290 const GraphicsLayer* graphicsLayer = layerById(errorString, layerId); |
290 if (!graphicsLayer) | 291 if (!graphicsLayer) |
291 return; | 292 return; |
292 blink::WebCompositingReasons reasonsBitmask = graphicsLayer->compositingReas
ons(); | 293 blink::WebCompositingReasons reasonsBitmask = graphicsLayer->compositingReas
ons(); |
293 reasonStrings = TypeBuilder::Array<String>::create(); | 294 reasonStrings = TypeBuilder::Array<String>::create(); |
294 for (size_t i = 0; i < WTF_ARRAY_LENGTH(compositingReasonNames); ++i) { | 295 for (size_t i = 0; i < WTF_ARRAY_LENGTH(compositingReasonNames); ++i) { |
295 if (!(reasonsBitmask & compositingReasonNames[i].mask)) | 296 if (!(reasonsBitmask & compositingReasonNames[i].mask)) |
296 continue; | 297 continue; |
297 reasonStrings->addItem(compositingReasonNames[i].protocolName); | 298 reasonStrings->addItem(compositingReasonNames[i].protocolName); |
298 #ifndef _NDEBUG | 299 #ifndef _NDEBUG |
299 reasonsBitmask &= ~compositingReasonNames[i].mask; | 300 reasonsBitmask &= ~compositingReasonNames[i].mask; |
300 #endif | 301 #endif |
301 } | 302 } |
302 ASSERT(!reasonsBitmask); | 303 ASSERT(!reasonsBitmask); |
303 } | 304 } |
304 | 305 |
305 } // namespace WebCore | 306 } // namespace WebCore |
OLD | NEW |