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

Unified Diff: tests/RecordTest.cpp

Issue 245853002: Refactor SkRecord opts, converting playback optimizations where possible. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: notes Created 6 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 | « tests/RecordCullingTest.cpp ('k') | tests/RecorderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/RecordTest.cpp
diff --git a/tests/RecordTest.cpp b/tests/RecordTest.cpp
index 315f15b700a1c1dcd065e51b9b6838d01993fa74..1bfdfdda43b7fe4060e6f3a377226168a16b2cb4 100644
--- a/tests/RecordTest.cpp
+++ b/tests/RecordTest.cpp
@@ -46,14 +46,20 @@ DEF_TEST(Record, r) {
// Its area should be 100.
AreaSummer summer;
- record.visit(summer);
+ for (unsigned i = 0; i < record.count(); i++) {
f(malita) 2014/04/22 12:16:10 This loop appears quite common - can we set up a h
mtklein 2014/04/22 15:36:27 Added apply() to AreaSummer, Stretch, and the othe
+ record.visit(i, summer);
+ }
REPORTER_ASSERT(r, summer.area() == 100);
// Scale 2x.
Stretch stretch;
- record.mutate(stretch);
+ for (unsigned i = 0; i < record.count(); i++) {
+ record.mutate(i, stretch);
+ }
// Now its area should be 100 + 400.
- record.visit(summer);
+ for (unsigned i = 0; i < record.count(); i++) {
+ record.visit(i, summer);
+ }
REPORTER_ASSERT(r, summer.area() == 500);
}
« no previous file with comments | « tests/RecordCullingTest.cpp ('k') | tests/RecorderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698