| 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 "core/paint/FramePainter.h" | 5 #include "core/paint/FramePainter.h" |
| 6 | 6 |
| 7 #include "core/editing/markers/DocumentMarkerController.h" | 7 #include "core/editing/markers/DocumentMarkerController.h" |
| 8 #include "core/fetch/MemoryCache.h" | 8 #include "core/fetch/MemoryCache.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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 // TODO(jchaffraix): GlobalPaintFlags should be const during a paint | 160 // TODO(jchaffraix): GlobalPaintFlags should be const during a paint |
| 161 // phase. Thus we should set this flag upfront (crbug.com/510280). | 161 // phase. Thus we should set this flag upfront (crbug.com/510280). |
| 162 GlobalPaintFlags localPaintFlags = globalPaintFlags; | 162 GlobalPaintFlags localPaintFlags = globalPaintFlags; |
| 163 if (document->printing()) | 163 if (document->printing()) |
| 164 localPaintFlags |= | 164 localPaintFlags |= |
| 165 GlobalPaintFlattenCompositingLayers | GlobalPaintPrinting; | 165 GlobalPaintFlattenCompositingLayers | GlobalPaintPrinting; |
| 166 | 166 |
| 167 PaintLayer* rootLayer = layoutView->layer(); | 167 PaintLayer* rootLayer = layoutView->layer(); |
| 168 | 168 |
| 169 #if ENABLE(ASSERT) | 169 #if DCHECK_IS_ON() |
| 170 layoutView->assertSubtreeIsLaidOut(); | 170 layoutView->assertSubtreeIsLaidOut(); |
| 171 LayoutObject::SetLayoutNeededForbiddenScope forbidSetNeedsLayout( | 171 LayoutObject::SetLayoutNeededForbiddenScope forbidSetNeedsLayout( |
| 172 *rootLayer->layoutObject()); | 172 *rootLayer->layoutObject()); |
| 173 #endif | 173 #endif |
| 174 | 174 |
| 175 PaintLayerPainter layerPainter(*rootLayer); | 175 PaintLayerPainter layerPainter(*rootLayer); |
| 176 | 176 |
| 177 float deviceScaleFactor = | 177 float deviceScaleFactor = |
| 178 blink::deviceScaleFactor(rootLayer->layoutObject()->frame()); | 178 blink::deviceScaleFactor(rootLayer->layoutObject()->frame()); |
| 179 context.setDeviceScaleFactor(deviceScaleFactor); | 179 context.setDeviceScaleFactor(deviceScaleFactor); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 251 |
| 252 bar.paint(context, CullRect(rect)); | 252 bar.paint(context, CullRect(rect)); |
| 253 } | 253 } |
| 254 | 254 |
| 255 const FrameView& FramePainter::frameView() { | 255 const FrameView& FramePainter::frameView() { |
| 256 DCHECK(m_frameView); | 256 DCHECK(m_frameView); |
| 257 return *m_frameView; | 257 return *m_frameView; |
| 258 } | 258 } |
| 259 | 259 |
| 260 } // namespace blink | 260 } // namespace blink |
| OLD | NEW |