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

Unified Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp

Issue 2658513002: sdf
Patch Set: sdf Created 3 years, 11 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/compositing/PaintArtifactCompositor.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
index 1d67a59f8e450ae002ebfa96c1c958956852c8ea..a0cf188bf95f9317db5009df8f151be0ecb51a7d 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
@@ -533,11 +533,21 @@ PaintArtifactCompositor::compositedLayerForPendingLayer(
paintChunk->rasterInvalidationRects.size());
if (storeDebugInfo) {
- contentLayerClient->addPaintChunkDebugData(
- paintArtifact.getDisplayItemList().subsequenceAsJSON(
+ std::unique_ptr<JSONArray> jsonArrayForChunk = paintArtifact.getDisplayItemList().subsequenceAsJSON(
paintChunk->beginIndex, paintChunk->endIndex,
DisplayItemList::SkipNonDrawings |
- DisplayItemList::ShownOnlyDisplayItemTypes));
+ DisplayItemList::ShownOnlyDisplayItemTypes);
+
+ std::unique_ptr<JSONObject> jsonForTransform = JSONObject::create();
+ jsonForTransform->setString("transform", paintChunk->properties.propertyTreeState.transform()->toString());
+ jsonArrayForChunk->pushObject(std::move(jsonForTransform));
+ std::unique_ptr<JSONObject> jsonForScroll = JSONObject::create();
+ jsonForScroll->setString("scroll", paintChunk->properties.propertyTreeState.scroll()->toString());
+ jsonArrayForChunk->pushObject(std::move(jsonForScroll));
+ std::unique_ptr<JSONObject> jsonForClip = JSONObject::create();
+ jsonForClip->setString("clip", paintChunk->properties.propertyTreeState.clip()->toString());
+ jsonArrayForChunk->pushObject(std::move(jsonForClip));
+ contentLayerClient->addPaintChunkDebugData(std::move(jsonArrayForChunk));
}
for (unsigned index = 0; index < paintChunk->rasterInvalidationRects.size();
@@ -585,8 +595,12 @@ bool PaintArtifactCompositor::canMergeInto(
for (const PropertyTreeState* currentState =
&newChunk.properties.propertyTreeState;
currentState; currentState = iterator.next()) {
- if (*currentState == candidatePendingLayer.propertyTreeState)
+ if (currentState->equivalentGeometry(candidatePendingLayer.propertyTreeState)) {
return true;
+ }
+// if (*currentState == candidatePendingLayer.propertyTreeState) {
+// return true;
+// }
if (currentState->hasDirectCompositingReasons())
return false;
}
@@ -744,6 +758,8 @@ void PaintArtifactCompositor::update(
PropertyTreeManager::kPropertyTreeSequenceNumber;
layerTree->property_trees()->needs_rebuild = false;
layerTree->property_trees()->ResetCachedData();
+
+ showDebugData();
}
#ifndef NDEBUG

Powered by Google App Engine
This is Rietveld 408576698