| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * | 10 * |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "config.h" | 29 #include "config.h" |
| 30 #include "ContinuousPainter.h" | 30 #include "ContinuousPainter.h" |
| 31 | 31 |
| 32 #include "PageOverlayList.h" | 32 #include "PageOverlayList.h" |
| 33 #include "TraceEvent.h" | 33 #include "core/platform/chromium/TraceEvent.h" |
| 34 #include "core/platform/graphics/GraphicsLayer.h" | 34 #include "core/platform/graphics/GraphicsLayer.h" |
| 35 | 35 |
| 36 using namespace WebCore; | 36 using namespace WebCore; |
| 37 | 37 |
| 38 namespace WebKit { | 38 namespace WebKit { |
| 39 | 39 |
| 40 void ContinuousPainter::setNeedsDisplayRecursive(GraphicsLayer* layer, PageOverl
ayList* pageOverlays) | 40 void ContinuousPainter::setNeedsDisplayRecursive(GraphicsLayer* layer, PageOverl
ayList* pageOverlays) |
| 41 { | 41 { |
| 42 if (!layer) | 42 if (!layer) |
| 43 return; | 43 return; |
| 44 | 44 |
| 45 if (pageOverlays && pageOverlays->findGraphicsLayer(layer) != WTF::notFound) | 45 if (pageOverlays && pageOverlays->findGraphicsLayer(layer) != WTF::notFound) |
| 46 return; | 46 return; |
| 47 | 47 |
| 48 TRACE_EVENT0("webkit", "ContinuousPainter::setNeedsDisplayRecursive"); | 48 TRACE_EVENT0("webkit", "ContinuousPainter::setNeedsDisplayRecursive"); |
| 49 layer->setNeedsDisplay(); | 49 layer->setNeedsDisplay(); |
| 50 | 50 |
| 51 setNeedsDisplayRecursive(layer->maskLayer(), pageOverlays); | 51 setNeedsDisplayRecursive(layer->maskLayer(), pageOverlays); |
| 52 setNeedsDisplayRecursive(layer->replicaLayer(), pageOverlays); | 52 setNeedsDisplayRecursive(layer->replicaLayer(), pageOverlays); |
| 53 | 53 |
| 54 const Vector<GraphicsLayer*>& children = layer->children(); | 54 const Vector<GraphicsLayer*>& children = layer->children(); |
| 55 Vector<GraphicsLayer*>::const_iterator it; | 55 Vector<GraphicsLayer*>::const_iterator it; |
| 56 for (it = children.begin(); it != children.end(); ++it) | 56 for (it = children.begin(); it != children.end(); ++it) |
| 57 setNeedsDisplayRecursive(*it, pageOverlays); | 57 setNeedsDisplayRecursive(*it, pageOverlays); |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace WebKit | 60 } // namespace WebKit |
| OLD | NEW |