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

Unified Diff: cc/nine_patch_layer_unittest.cc

Issue 12095053: cc: Avoid expensive RenderingStats collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 11 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/nine_patch_layer.cc ('k') | cc/picture.h » ('j') | 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 b1738dde0d77210d349146d0917513f15fcba9c5..b7a5bb9aa0d7c069184784830d983b77ebf3b7f4 100644
--- a/cc/nine_patch_layer_unittest.cc
+++ b/cc/nine_patch_layer_unittest.cc
@@ -8,7 +8,6 @@
#include "cc/occlusion_tracker.h"
#include "cc/overdraw_metrics.h"
#include "cc/prioritized_resource_manager.h"
-#include "cc/rendering_stats.h"
#include "cc/resource_provider.h"
#include "cc/resource_update_queue.h"
#include "cc/single_thread_proxy.h"
@@ -80,11 +79,10 @@ TEST_F(NinePatchLayerTest, triggerFullUploadOnceWhenChangingBitmap)
PriorityCalculator calculator;
ResourceUpdateQueue queue;
OcclusionTracker occlusionTracker(gfx::Rect(), false);
- RenderingStats stats;
// No bitmap set should not trigger any uploads.
testLayer->setTexturePriorities(calculator);
- testLayer->update(queue, &occlusionTracker, stats);
+ testLayer->update(queue, &occlusionTracker, NULL);
EXPECT_EQ(queue.fullUploadSize(), 0);
EXPECT_EQ(queue.partialUploadSize(), 0);
@@ -94,7 +92,7 @@ TEST_F(NinePatchLayerTest, triggerFullUploadOnceWhenChangingBitmap)
bitmap.allocPixels();
testLayer->setBitmap(bitmap, gfx::Rect(5, 5, 1, 1));
testLayer->setTexturePriorities(calculator);
- testLayer->update(queue, &occlusionTracker, stats);
+ testLayer->update(queue, &occlusionTracker, NULL);
EXPECT_EQ(queue.fullUploadSize(), 1);
EXPECT_EQ(queue.partialUploadSize(), 0);
ResourceUpdate params = queue.takeFirstFullUpload();
@@ -117,7 +115,7 @@ TEST_F(NinePatchLayerTest, triggerFullUploadOnceWhenChangingBitmap)
// Nothing changed, so no repeated upload.
testLayer->setTexturePriorities(calculator);
- testLayer->update(queue, &occlusionTracker, stats);
+ testLayer->update(queue, &occlusionTracker, NULL);
EXPECT_EQ(queue.fullUploadSize(), 0);
EXPECT_EQ(queue.partialUploadSize(), 0);
@@ -129,7 +127,7 @@ TEST_F(NinePatchLayerTest, triggerFullUploadOnceWhenChangingBitmap)
// Reupload after eviction
testLayer->setTexturePriorities(calculator);
- testLayer->update(queue, &occlusionTracker, stats);
+ testLayer->update(queue, &occlusionTracker, NULL);
EXPECT_EQ(queue.fullUploadSize(), 1);
EXPECT_EQ(queue.partialUploadSize(), 0);
@@ -138,7 +136,7 @@ TEST_F(NinePatchLayerTest, triggerFullUploadOnceWhenChangingBitmap)
EXPECT_EQ(NULL, params.texture->resourceManager());
testLayer->setTexturePriorities(calculator);
ResourceUpdateQueue queue2;
- testLayer->update(queue2, &occlusionTracker, stats);
+ testLayer->update(queue2, &occlusionTracker, NULL);
EXPECT_EQ(queue2.fullUploadSize(), 1);
EXPECT_EQ(queue2.partialUploadSize(), 0);
params = queue2.takeFirstFullUpload();
« no previous file with comments | « cc/nine_patch_layer.cc ('k') | cc/picture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698