| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 | 27 |
| 28 #include "core/rendering/compositing/CompositedLayerMapping.h" | 28 #include "core/rendering/compositing/CompositedLayerMapping.h" |
| 29 | 29 |
| 30 #include "core/fetch/ImageResource.h" | 30 #include "core/fetch/ImageResource.h" |
| 31 #include "core/frame/FrameView.h" | 31 #include "core/frame/FrameView.h" |
| 32 #include "core/html/HTMLCanvasElement.h" | 32 #include "core/html/HTMLCanvasElement.h" |
| 33 #include "core/html/HTMLMediaElement.h" | |
| 34 #include "core/html/canvas/CanvasRenderingContext.h" | 33 #include "core/html/canvas/CanvasRenderingContext.h" |
| 35 #include "core/inspector/InspectorNodeIds.h" | 34 #include "core/inspector/InspectorNodeIds.h" |
| 36 #include "core/inspector/InspectorTraceEvents.h" | 35 #include "core/inspector/InspectorTraceEvents.h" |
| 37 #include "core/page/Chrome.h" | 36 #include "core/page/Chrome.h" |
| 38 #include "core/page/ChromeClient.h" | 37 #include "core/page/ChromeClient.h" |
| 39 #include "core/page/Page.h" | 38 #include "core/page/Page.h" |
| 40 #include "core/page/scrolling/ScrollingCoordinator.h" | 39 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 41 #include "core/rendering/FilterEffectRenderer.h" | 40 #include "core/rendering/FilterEffectRenderer.h" |
| 42 #include "core/rendering/RenderImage.h" | 41 #include "core/rendering/RenderImage.h" |
| 43 #include "core/rendering/RenderLayerStackingNodeIterator.h" | 42 #include "core/rendering/RenderLayerStackingNodeIterator.h" |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 updateBackgroundColor(); | 422 updateBackgroundColor(); |
| 424 | 423 |
| 425 if (renderer->isImage()) { | 424 if (renderer->isImage()) { |
| 426 if (isDirectlyCompositedImage()) { | 425 if (isDirectlyCompositedImage()) { |
| 427 updateImageContents(); | 426 updateImageContents(); |
| 428 } else if (m_graphicsLayer->hasContentsLayer()) { | 427 } else if (m_graphicsLayer->hasContentsLayer()) { |
| 429 m_graphicsLayer->setContentsToImage(0); | 428 m_graphicsLayer->setContentsToImage(0); |
| 430 } | 429 } |
| 431 } | 430 } |
| 432 | 431 |
| 433 if (renderer->isVideo()) { | 432 if (isAcceleratedCanvas(renderer)) { |
| 434 HTMLMediaElement* mediaElement = toHTMLMediaElement(renderer->node()); | |
| 435 m_graphicsLayer->setContentsToPlatformLayer(mediaElement->platformLayer(
)); | |
| 436 } else if (isAcceleratedCanvas(renderer)) { | |
| 437 HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer->node()); | 433 HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer->node()); |
| 438 if (CanvasRenderingContext* context = canvas->renderingContext()) | 434 if (CanvasRenderingContext* context = canvas->renderingContext()) |
| 439 m_graphicsLayer->setContentsToPlatformLayer(context->platformLayer()
); | 435 m_graphicsLayer->setContentsToPlatformLayer(context->platformLayer()
); |
| 440 layerConfigChanged = true; | 436 layerConfigChanged = true; |
| 441 } | 437 } |
| 442 | 438 |
| 443 // Changes to either the internal hierarchy or the mask layer have an impact | 439 // Changes to either the internal hierarchy or the mask layer have an impact |
| 444 // on painting phases, so we need to update when either are updated. | 440 // on painting phases, so we need to update when either are updated. |
| 445 if (layerConfigChanged || maskLayerChanged) | 441 if (layerConfigChanged || maskLayerChanged) |
| 446 updatePaintingPhases(); | 442 updatePaintingPhases(); |
| (...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2203 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2199 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2204 name = "Scrolling Block Selection Layer"; | 2200 name = "Scrolling Block Selection Layer"; |
| 2205 } else { | 2201 } else { |
| 2206 ASSERT_NOT_REACHED(); | 2202 ASSERT_NOT_REACHED(); |
| 2207 } | 2203 } |
| 2208 | 2204 |
| 2209 return name; | 2205 return name; |
| 2210 } | 2206 } |
| 2211 | 2207 |
| 2212 } // namespace blink | 2208 } // namespace blink |
| OLD | NEW |