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

Unified Diff: cc/trees/property_tree.cc

Issue 2655233006: cc : Clean up cc clip tree (Closed)
Patch Set: blink_tests Created 3 years, 9 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: cc/trees/property_tree.cc
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc
index af6e451a922933eaa1d66b458e59543d8fe6b343..f99a3a7ac32fcef753135c51bb80d294b4080262 100644
--- a/cc/trees/property_tree.cc
+++ b/cc/trees/property_tree.cc
@@ -2036,6 +2036,17 @@ DrawTransformData& PropertyTrees::FetchDrawTransformsDataFromCache(
return data;
}
+ClipRectData& PropertyTrees::FetchClipRectFromCache(int clip_id,
weiliangc 2017/03/14 22:04:30 Could we return pointer here to make cache miss mo
jaydasika 2017/03/16 20:33:31 I haven't tried it, so I don't know if it effects
+ int target_id) {
+ ClipNode* clip_node = clip_tree.Node(clip_id);
+ for (auto& data : clip_node->cached_clip_rects) {
+ if (data.target_id == target_id || data.target_id == -1)
+ return data;
+ }
+ clip_node->cached_clip_rects.push_back(ClipRectData());
+ return clip_node->cached_clip_rects.back();
+}
+
DrawTransforms& PropertyTrees::GetDrawTransforms(int transform_id,
int effect_id) const {
const EffectNode* effect_node = effect_tree.Node(effect_id);

Powered by Google App Engine
This is Rietveld 408576698