| 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" |
| 11 #include "core/inspector/InspectorTraceEvents.h" | 11 #include "core/inspector/InspectorTraceEvents.h" |
| 12 #include "core/layout/Layer.h" |
| 12 #include "core/page/Chrome.h" | 13 #include "core/page/Chrome.h" |
| 13 #include "core/page/ChromeClient.h" | 14 #include "core/page/ChromeClient.h" |
| 14 #include "core/page/Page.h" | 15 #include "core/page/Page.h" |
| 15 #include "core/paint/LayerPainter.h" | 16 #include "core/paint/LayerPainter.h" |
| 16 #include "core/paint/ScrollbarPainter.h" | 17 #include "core/paint/ScrollbarPainter.h" |
| 17 #include "core/paint/TransformRecorder.h" | 18 #include "core/paint/TransformRecorder.h" |
| 18 #include "core/rendering/RenderLayer.h" | |
| 19 #include "core/rendering/RenderView.h" | 19 #include "core/rendering/RenderView.h" |
| 20 #include "platform/fonts/FontCache.h" | 20 #include "platform/fonts/FontCache.h" |
| 21 #include "platform/graphics/GraphicsContext.h" | 21 #include "platform/graphics/GraphicsContext.h" |
| 22 #include "platform/graphics/paint/ClipRecorder.h" | 22 #include "platform/graphics/paint/ClipRecorder.h" |
| 23 #include "platform/graphics/paint/DrawingRecorder.h" | 23 #include "platform/graphics/paint/DrawingRecorder.h" |
| 24 #include "platform/scroll/ScrollbarTheme.h" | 24 #include "platform/scroll/ScrollbarTheme.h" |
| 25 | 25 |
| 26 namespace blink { | 26 namespace blink { |
| 27 | 27 |
| 28 bool FramePainter::s_inPaintContents = false; | 28 bool FramePainter::s_inPaintContents = false; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 RenderObject* renderer = m_frameView.nodeToDraw() ? m_frameView.nodeToDraw()
->renderer() : 0; |
| 133 RenderLayer* 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 RenderObject::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); |
| (...skipping 86 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 |