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

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

Issue 2894093002: Don't access DisplayItemClient::VisualRect() for cached display items. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 disabled_mode = GraphicsContext::kFullyDisabled; 83 disabled_mode = GraphicsContext::kFullyDisabled;
84 84
85 // Anything other than PaintDefaultBehavior is for testing. In non-testing 85 // Anything other than PaintDefaultBehavior is for testing. In non-testing
86 // scenarios, it is an error to call GraphicsLayer::paint. Actual painting 86 // scenarios, it is an error to call GraphicsLayer::paint. Actual painting
87 // occurs in FrameView::paintTree(); this method merely copies the painted 87 // occurs in FrameView::paintTree(); this method merely copies the painted
88 // output to the WebDisplayItemList. 88 // output to the WebDisplayItemList.
89 if (painting_control != kPaintDefaultBehavior) 89 if (painting_control != kPaintDefaultBehavior)
90 graphics_layer_->Paint(nullptr, disabled_mode); 90 graphics_layer_->Paint(nullptr, disabled_mode);
91 91
92 paint_controller.GetPaintArtifact().AppendToWebDisplayItemList( 92 paint_controller.GetPaintArtifact().AppendToWebDisplayItemList(
93 graphics_layer_->OffsetFromLayoutObjectWithSubpixelAccumulation(),
wkorman 2017/05/19 00:55:08 Does this add some small overhead vs. ToT, as (I t
Xianzhu 2017/05/19 01:25:11 Good catch. The overhead happens when the Graphic
93 web_display_item_list); 94 web_display_item_list);
94 95
95 paint_controller.SetDisplayItemConstructionIsDisabled(false); 96 paint_controller.SetDisplayItemConstructionIsDisabled(false);
96 paint_controller.SetSubsequenceCachingIsDisabled(false); 97 paint_controller.SetSubsequenceCachingIsDisabled(false);
97 } 98 }
98 99
99 size_t ContentLayerDelegate::ApproximateUnsharedMemoryUsage() const { 100 size_t ContentLayerDelegate::ApproximateUnsharedMemoryUsage() const {
100 return graphics_layer_->GetPaintController().ApproximateUnsharedMemoryUsage(); 101 return graphics_layer_->GetPaintController().ApproximateUnsharedMemoryUsage();
101 } 102 }
102 103
103 } // namespace blink 104 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698