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

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

Issue 1415143005: Preparation for enabling slimming paint synchronized painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments for the loop finding real root GraphicsLayer Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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 "config.h" 5 #include "config.h"
6 #include "platform/graphics/paint/PaintController.h" 6 #include "platform/graphics/paint/PaintController.h"
7 7
8 #include "platform/NotImplemented.h" 8 #include "platform/NotImplemented.h"
9 #include "platform/TraceEvent.h" 9 #include "platform/TraceEvent.h"
10 #include "platform/graphics/GraphicsLayer.h" 10 #include "platform/graphics/GraphicsLayer.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 invalidateClient(client); 117 invalidateClient(client);
118 118
119 if (visualRect) { 119 if (visualRect) {
120 // TODO(wkorman): cache visualRect for the client. 120 // TODO(wkorman): cache visualRect for the client.
121 } 121 }
122 } 122 }
123 123
124 void PaintController::invalidateClient(const DisplayItemClientWrapper& client) 124 void PaintController::invalidateClient(const DisplayItemClientWrapper& client)
125 { 125 {
126 #if ENABLE(ASSERT) 126 #if ENABLE(ASSERT)
127 m_invalidations.append(client.debugName()); 127 // Slimming paint v1 CompositedLayerMapping may invalidate client on extra l ayers.
128 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() || clientCacheIsValid(c lient.displayItemClient()))
129 m_invalidations.append(client.debugName());
128 #endif 130 #endif
129 131
130 invalidateUntracked(client.displayItemClient()); 132 invalidateUntracked(client.displayItemClient());
131 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && m_trackedPaintInvali dationObjects) 133 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && m_trackedPaintInvali dationObjects)
132 m_trackedPaintInvalidationObjects->append(client.debugName()); 134 m_trackedPaintInvalidationObjects->append(client.debugName());
133 } 135 }
134 136
135 void PaintController::invalidateUntracked(DisplayItemClient client) 137 void PaintController::invalidateUntracked(DisplayItemClient client)
136 { 138 {
137 // This can be called during painting, but we can't invalidate already paint ed clients. 139 // This can be called during painting, but we can't invalidate already paint ed clients.
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 564
563 void PaintController::showDebugData() const 565 void PaintController::showDebugData() const
564 { 566 {
565 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri ng(m_currentPaintArtifact.displayItemList()).utf8().data()); 567 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri ng(m_currentPaintArtifact.displayItemList()).utf8().data());
566 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m _newDisplayItemList).utf8().data()); 568 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m _newDisplayItemList).utf8().data());
567 } 569 }
568 570
569 #endif // ifndef NDEBUG 571 #endif // ifndef NDEBUG
570 572
571 } // namespace blink 573 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698