| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 if (frameView().shouldThrottleRendering() || !document->isActive()) | 98 if (frameView().shouldThrottleRendering() || !document->isActive()) |
| 99 return; | 99 return; |
| 100 | 100 |
| 101 LayoutView* layoutView = frameView().layoutView(); | 101 LayoutView* layoutView = frameView().layoutView(); |
| 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 // TODO(crbug.com/590856): It's still broken when we choose not to crash whe
n the check fails. |
| 108 if (!frameView().checkDoesNotNeedLayout()) |
| 109 return; |
| 110 |
| 108 // TODO(wangxianzhu): The following check should be stricter, but currently
this is blocked | 111 // TODO(wangxianzhu): The following check should be stricter, but currently
this is blocked |
| 109 // by the svg root issue (crbug.com/442939). | 112 // by the svg root issue (crbug.com/442939). |
| 110 ASSERT(document->lifecycle().state() >= DocumentLifecycle::CompositingClean)
; | 113 ASSERT(document->lifecycle().state() >= DocumentLifecycle::CompositingClean)
; |
| 111 | 114 |
| 112 TRACE_EVENT1("devtools.timeline,rail", "Paint", "data", InspectorPaintEvent:
:data(layoutView, LayoutRect(rect), 0)); | 115 TRACE_EVENT1("devtools.timeline,rail", "Paint", "data", InspectorPaintEvent:
:data(layoutView, LayoutRect(rect), 0)); |
| 113 | 116 |
| 114 bool isTopLevelPainter = !s_inPaintContents; | 117 bool isTopLevelPainter = !s_inPaintContents; |
| 115 s_inPaintContents = true; | 118 s_inPaintContents = true; |
| 116 | 119 |
| 117 FontCachePurgePreventer fontCachePurgePreventer; | 120 FontCachePurgePreventer fontCachePurgePreventer; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 bar.paint(context, CullRect(rect)); | 197 bar.paint(context, CullRect(rect)); |
| 195 } | 198 } |
| 196 | 199 |
| 197 const FrameView& FramePainter::frameView() | 200 const FrameView& FramePainter::frameView() |
| 198 { | 201 { |
| 199 ASSERT(m_frameView); | 202 ASSERT(m_frameView); |
| 200 return *m_frameView; | 203 return *m_frameView; |
| 201 } | 204 } |
| 202 | 205 |
| 203 } // namespace blink | 206 } // namespace blink |
| OLD | NEW |