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

Unified Diff: cc/nine_patch_layer_unittest.cc

Issue 11420021: Handle NinePatchLayer Resource Rebuilding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/nine_patch_layer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/nine_patch_layer_unittest.cc
diff --git a/cc/nine_patch_layer_unittest.cc b/cc/nine_patch_layer_unittest.cc
index 0481e61b58516af759e268a17aaeb2c6c99c423b..ead0d6021573fb0867b686b775e71e0b80318d72 100644
--- a/cc/nine_patch_layer_unittest.cc
+++ b/cc/nine_patch_layer_unittest.cc
@@ -131,6 +131,18 @@ TEST_F(NinePatchLayerTest, triggerFullUploadOnceWhenChangingBitmap)
testLayer->update(queue, &occlusionTracker, stats);
EXPECT_EQ(queue.fullUploadSize(), 1);
EXPECT_EQ(queue.partialUploadSize(), 0);
+
+ // PrioritizedResourceManager clearing
+ m_layerTreeHost->contentsTextureManager()->unregisterTexture(params.texture);
+ EXPECT_EQ(NULL, params.texture->resourceManager());
+ testLayer->setTexturePriorities(calculator);
+ ResourceUpdateQueue queue2;
+ testLayer->update(queue2, &occlusionTracker, stats);
+ EXPECT_EQ(queue2.fullUploadSize(), 1);
+ EXPECT_EQ(queue2.partialUploadSize(), 0);
+ params = queue2.takeFirstFullUpload();
+ EXPECT_TRUE(params.texture != NULL);
+ EXPECT_EQ(params.texture->resourceManager(), m_layerTreeHost->contentsTextureManager());
}
} // namespace
« no previous file with comments | « cc/nine_patch_layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698