Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(976)

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp

Issue 2013723002: Consider ClipPathDisplayItems for GPU veto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test asserts Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
index 6b6db13c7262e445db7214c0a3864ac7277f0eb7..9816b91a2278b54b83212b22b4f617c8d5627161 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
@@ -312,8 +312,9 @@ void PaintController::commitNewDisplayItems(const LayoutSize& offsetFromLayoutOb
for (const auto& item : m_newDisplayItemList) {
m_newDisplayItemList.appendVisualRect(visualRectForDisplayItem(item, offsetFromLayoutObject));
- if (item.isDrawing())
- gpuAnalyzer.analyze(static_cast<const DrawingDisplayItem&>(item).picture());
+ // No reason to continue the analysis once we have a veto.
+ if (gpuAnalyzer.suitableForGpuRasterization())
+ item.analyzeForGpuRasterization(gpuAnalyzer);
}
m_currentPaintArtifact = PaintArtifact(std::move(m_newDisplayItemList), m_newPaintChunks.releasePaintChunks(), gpuAnalyzer.suitableForGpuRasterization());
m_newDisplayItemList = DisplayItemList(kInitialDisplayItemListCapacityBytes);

Powered by Google App Engine
This is Rietveld 408576698