| 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 "platform/graphics/paint/PaintController.h" | 5 #include "platform/graphics/paint/PaintController.h" |
| 6 | 6 |
| 7 #include "platform/graphics/GraphicsLayer.h" | 7 #include "platform/graphics/GraphicsLayer.h" |
| 8 #include "platform/graphics/paint/DrawingDisplayItem.h" | 8 #include "platform/graphics/paint/DrawingDisplayItem.h" |
| 9 #include "platform/instrumentation/tracing/TraceEvent.h" | 9 #include "platform/instrumentation/tracing/TraceEvent.h" |
| 10 #include "platform/wtf/AutoReset.h" | 10 #include "platform/wtf/AutoReset.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 void PaintController::addCachedSubsequence(const DisplayItemClient& client, | 142 void PaintController::addCachedSubsequence(const DisplayItemClient& client, |
| 143 unsigned start, | 143 unsigned start, |
| 144 unsigned end) { | 144 unsigned end) { |
| 145 DCHECK(start <= end); | 145 DCHECK(start <= end); |
| 146 DCHECK(end < m_newDisplayItemList.size()); | 146 DCHECK(end < m_newDisplayItemList.size()); |
| 147 if (isCheckingUnderInvalidation()) { | 147 if (isCheckingUnderInvalidation()) { |
| 148 SubsequenceMarkers* markers = getSubsequenceMarkers(client); | 148 SubsequenceMarkers* markers = getSubsequenceMarkers(client); |
| 149 if (!markers) { | 149 if (!markers) { |
| 150 showSequenceUnderInvalidationError( | 150 showSequenceUnderInvalidationError( |
| 151 "under-invalidation : unexpected subsequence", client, start, end); | 151 "under-invalidation : unexpected subsequence", client, start, end); |
| 152 DCHECK(false); | 152 CHECK(false); |
| 153 } | 153 } |
| 154 if (markers->end - markers->start != end - start) { | 154 if (markers->end - markers->start != end - start) { |
| 155 showSequenceUnderInvalidationError( | 155 showSequenceUnderInvalidationError( |
| 156 "under-invalidation: new subsequence wrong length", client, start, | 156 "under-invalidation: new subsequence wrong length", client, start, |
| 157 end); | 157 end); |
| 158 DCHECK(false); | 158 CHECK(false); |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 | 161 |
| 162 DCHECK(m_newCachedSubsequences.find(&client) == | 162 DCHECK(m_newCachedSubsequences.find(&client) == |
| 163 m_newCachedSubsequences.end()); | 163 m_newCachedSubsequences.end()); |
| 164 | 164 |
| 165 m_newCachedSubsequences.insert(&client, SubsequenceMarkers(start, end)); | 165 m_newCachedSubsequences.insert(&client, SubsequenceMarkers(start, end)); |
| 166 } | 166 } |
| 167 | 167 |
| 168 bool PaintController::lastDisplayItemIsNoopBegin() const { | 168 bool PaintController::lastDisplayItemIsNoopBegin() const { |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 showPaintRecords | 912 showPaintRecords |
| 913 ? (DisplayItemList::JsonOptions::ShowPaintRecords | | 913 ? (DisplayItemList::JsonOptions::ShowPaintRecords | |
| 914 DisplayItemList::JsonOptions::ShowClientDebugName) | 914 DisplayItemList::JsonOptions::ShowClientDebugName) |
| 915 : DisplayItemList::JsonOptions::ShowClientDebugName) | 915 : DisplayItemList::JsonOptions::ShowClientDebugName) |
| 916 ->toPrettyJSONString() | 916 ->toPrettyJSONString() |
| 917 .utf8() | 917 .utf8() |
| 918 .data()); | 918 .data()); |
| 919 } | 919 } |
| 920 | 920 |
| 921 } // namespace blink | 921 } // namespace blink |
| OLD | NEW |