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

Unified Diff: cc/trees/layer_tree_host_pixeltest_tiles.cc

Issue 2822143003: Remove ForceReclaimResources (Closed)
Patch Set: Change to RunLoop. Created 3 years, 8 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
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_pixeltest_tiles.cc
diff --git a/cc/trees/layer_tree_host_pixeltest_tiles.cc b/cc/trees/layer_tree_host_pixeltest_tiles.cc
index d6145d577c858a1fcfbc68a48b0bf808602cfdc5..a5c02acf4d7a92228abd3b885108c2b81deb51c2 100644
--- a/cc/trees/layer_tree_host_pixeltest_tiles.cc
+++ b/cc/trees/layer_tree_host_pixeltest_tiles.cc
@@ -157,11 +157,17 @@ class LayerTreeHostTilesTestPartialInvalidation
void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->SourceFrameNumber()) {
case 1:
- // We have done one frame, so the layer's content has been rastered.
- // Now we change the picture behind it to record something completely
- // different, but we give a smaller invalidation rect. The layer should
- // only re-raster the stuff in the rect. If it doesn't do partial raster
- // it would re-raster the whole thing instead.
+ // We have done one frame, but the resource may not be available for
+ // partial raster yet. Force a second frame.
+ picture_layer_->SetNeedsDisplayRect(gfx::Rect(50, 50, 100, 100));
+ break;
+ case 2:
+ // We have done two frames, so the layer's content has been rastered
+ // twice and the first frame's resource is available for partial
+ // raster. Now we change the picture behind it to record something
+ // completely different, but we give a smaller invalidation rect. The
+ // layer should only re-raster the stuff in the rect. If it doesn't do
+ // partial raster it would re-raster the whole thing instead.
client_.set_blue_top(false);
Finish();
picture_layer_->SetNeedsDisplayRect(gfx::Rect(50, 50, 100, 100));
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698