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

Unified Diff: tests/RecordReplaceDrawTest.cpp

Issue 803183003: Fix layer hoisting image filter corner cases (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix unit test Created 6 years 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/GpuLayerCacheTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/RecordReplaceDrawTest.cpp
diff --git a/tests/RecordReplaceDrawTest.cpp b/tests/RecordReplaceDrawTest.cpp
index fd518fa177f9a82855903f241e4180ae2e121c56..b9c2f44e0f6111a3320b9a34d3a79b25bc30c1e3 100644
--- a/tests/RecordReplaceDrawTest.cpp
+++ b/tests/RecordReplaceDrawTest.cpp
@@ -114,6 +114,7 @@ void test_replacements(skiatest::Reporter* r, GrContext* context, bool useBBH) {
GrLayerCache* layerCache = context->getLayerCache();
GrCachedLayer* layer = layerCache->findLayerOrCreate(pic->uniqueID(), 0, 2,
SkIRect::MakeWH(kWidth, kHeight),
+ SkIRect::MakeWH(kWidth, kHeight),
SkMatrix::I(), key, 1, &paint);
GrSurfaceDesc desc;
@@ -133,20 +134,17 @@ void test_replacements(skiatest::Reporter* r, GrContext* context, bool useBBH) {
GrRecordReplaceDraw(pic, &canvas, layerCache, SkMatrix::I(), NULL/*callback*/);
int recount = rerecord.count();
- REPORTER_ASSERT(r, 5 == recount || 7 == recount);
+ REPORTER_ASSERT(r, 2 == recount || 4 == recount);
int index = 0;
- if (7 == recount) {
+ if (4 == recount) {
assert_type<SkRecords::Save>(r, rerecord, 0);
index += 1;
}
- assert_type<SkRecords::Save>(r, rerecord, index + 0);
- assert_type<SkRecords::SetMatrix>(r, rerecord, index + 1);
- assert_type<SkRecords::DrawBitmapRectToRect>(r, rerecord, index + 2);
- assert_type<SkRecords::Restore>(r, rerecord, index + 3);
- assert_type<SkRecords::DrawRect>(r, rerecord, index + 4);
- if (7 == recount) {
- assert_type<SkRecords::Restore>(r, rerecord, 6);
+ assert_type<SkRecords::DrawSprite>(r, rerecord, index + 0);
+ assert_type<SkRecords::DrawRect>(r, rerecord, index + 1);
+ if (4 == recount) {
+ assert_type<SkRecords::Restore>(r, rerecord, 3);
}
}
« no previous file with comments | « tests/GpuLayerCacheTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698