| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 if (!layoutView) { | 102 if (!layoutView) { |
| 103 DLOG(ERROR) << "called FramePainter::paint with nil layoutObject"; | 103 DLOG(ERROR) << "called FramePainter::paint with nil layoutObject"; |
| 104 return; | 104 return; |
| 105 } | 105 } |
| 106 | 106 |
| 107 frameView().checkDoesNotNeedLayout(); | 107 frameView().checkDoesNotNeedLayout(); |
| 108 // TODO(wangxianzhu): The following check should be stricter, but currently
this is blocked | 108 // TODO(wangxianzhu): The following check should be stricter, but currently
this is blocked |
| 109 // by the svg root issue (crbug.com/442939). | 109 // by the svg root issue (crbug.com/442939). |
| 110 ASSERT(document->lifecycle().state() >= DocumentLifecycle::CompositingClean)
; | 110 ASSERT(document->lifecycle().state() >= DocumentLifecycle::CompositingClean)
; |
| 111 | 111 |
| 112 TRACE_EVENT1("devtools.timeline", "Paint", "data", InspectorPaintEvent::data
(layoutView, LayoutRect(rect), 0)); | 112 TRACE_EVENT1("devtools.timeline,rail", "Paint", "data", InspectorPaintEvent:
:data(layoutView, LayoutRect(rect), 0)); |
| 113 | 113 |
| 114 bool isTopLevelPainter = !s_inPaintContents; | 114 bool isTopLevelPainter = !s_inPaintContents; |
| 115 s_inPaintContents = true; | 115 s_inPaintContents = true; |
| 116 | 116 |
| 117 FontCachePurgePreventer fontCachePurgePreventer; | 117 FontCachePurgePreventer fontCachePurgePreventer; |
| 118 | 118 |
| 119 // TODO(jchaffraix): GlobalPaintFlags should be const during a paint | 119 // TODO(jchaffraix): GlobalPaintFlags should be const during a paint |
| 120 // phase. Thus we should set this flag upfront (crbug.com/510280). | 120 // phase. Thus we should set this flag upfront (crbug.com/510280). |
| 121 GlobalPaintFlags localPaintFlags = globalPaintFlags; | 121 GlobalPaintFlags localPaintFlags = globalPaintFlags; |
| 122 if (document->printing()) | 122 if (document->printing()) |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 bar.paint(context, CullRect(rect)); | 194 bar.paint(context, CullRect(rect)); |
| 195 } | 195 } |
| 196 | 196 |
| 197 const FrameView& FramePainter::frameView() | 197 const FrameView& FramePainter::frameView() |
| 198 { | 198 { |
| 199 ASSERT(m_frameView); | 199 ASSERT(m_frameView); |
| 200 return *m_frameView; | 200 return *m_frameView; |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace blink | 203 } // namespace blink |
| OLD | NEW |