| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/paint/FramePainter.h" | 6 #include "core/paint/FramePainter.h" |
| 7 | 7 |
| 8 #include "core/dom/DocumentMarkerController.h" | 8 #include "core/dom/DocumentMarkerController.h" |
| 9 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
| 10 #include "core/inspector/InspectorInstrumentation.h" | 10 #include "core/inspector/InspectorInstrumentation.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 if (m_frameView.paintBehavior() == PaintBehaviorNormal) | 122 if (m_frameView.paintBehavior() == PaintBehaviorNormal) |
| 123 document->markers().invalidateRenderedRectsForMarkersInRect(rect); | 123 document->markers().invalidateRenderedRectsForMarkersInRect(rect); |
| 124 | 124 |
| 125 if (document->printing()) | 125 if (document->printing()) |
| 126 m_frameView.setPaintBehavior(m_frameView.paintBehavior() | PaintBehavior
FlattenCompositingLayers); | 126 m_frameView.setPaintBehavior(m_frameView.paintBehavior() | PaintBehavior
FlattenCompositingLayers); |
| 127 | 127 |
| 128 ASSERT(!m_frameView.isPainting()); | 128 ASSERT(!m_frameView.isPainting()); |
| 129 m_frameView.setIsPainting(true); | 129 m_frameView.setIsPainting(true); |
| 130 | 130 |
| 131 // m_frameView.nodeToDraw() is used to draw only one element (and its descen
dants) | 131 // m_frameView.nodeToDraw() is used to draw only one element (and its descen
dants) |
| 132 RenderObject* renderer = m_frameView.nodeToDraw() ? m_frameView.nodeToDraw()
->renderer() : 0; | 132 LayoutObject* renderer = m_frameView.nodeToDraw() ? m_frameView.nodeToDraw()
->renderer() : 0; |
| 133 Layer* rootLayer = renderView->layer(); | 133 Layer* rootLayer = renderView->layer(); |
| 134 | 134 |
| 135 #if ENABLE(ASSERT) | 135 #if ENABLE(ASSERT) |
| 136 renderView->assertSubtreeIsLaidOut(); | 136 renderView->assertSubtreeIsLaidOut(); |
| 137 RenderObject::SetLayoutNeededForbiddenScope forbidSetNeedsLayout(*rootLayer-
>renderer()); | 137 LayoutObject::SetLayoutNeededForbiddenScope forbidSetNeedsLayout(*rootLayer-
>renderer()); |
| 138 #endif | 138 #endif |
| 139 | 139 |
| 140 LayerPainter layerPainter(*rootLayer); | 140 LayerPainter layerPainter(*rootLayer); |
| 141 | 141 |
| 142 float deviceScaleFactor = blink::deviceScaleFactor(rootLayer->renderer()->fr
ame()); | 142 float deviceScaleFactor = blink::deviceScaleFactor(rootLayer->renderer()->fr
ame()); |
| 143 context->setDeviceScaleFactor(deviceScaleFactor); | 143 context->setDeviceScaleFactor(deviceScaleFactor); |
| 144 | 144 |
| 145 layerPainter.paint(context, rect, m_frameView.paintBehavior(), renderer); | 145 layerPainter.paint(context, rect, m_frameView.paintBehavior(), renderer); |
| 146 | 146 |
| 147 if (rootLayer->containsDirtyOverlayScrollbars()) | 147 if (rootLayer->containsDirtyOverlayScrollbars()) |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 { | 230 { |
| 231 IntRect horizontalOverhangRect; | 231 IntRect horizontalOverhangRect; |
| 232 IntRect verticalOverhangRect; | 232 IntRect verticalOverhangRect; |
| 233 m_frameView.calculateOverhangAreasForPainting(horizontalOverhangRect, vertic
alOverhangRect); | 233 m_frameView.calculateOverhangAreasForPainting(horizontalOverhangRect, vertic
alOverhangRect); |
| 234 | 234 |
| 235 if (dirtyRect.intersects(horizontalOverhangRect) || dirtyRect.intersects(ver
ticalOverhangRect)) | 235 if (dirtyRect.intersects(horizontalOverhangRect) || dirtyRect.intersects(ver
ticalOverhangRect)) |
| 236 paintOverhangAreas(context, horizontalOverhangRect, verticalOverhangRect
, dirtyRect); | 236 paintOverhangAreas(context, horizontalOverhangRect, verticalOverhangRect
, dirtyRect); |
| 237 } | 237 } |
| 238 | 238 |
| 239 } // namespace blink | 239 } // namespace blink |
| OLD | NEW |