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

Side by Side Diff: tests/RecordReplaceDrawTest.cpp

Issue 610003002: Override SkCanvas::drawImage() in SkRecorder. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase master Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #if SK_SUPPORT_GPU 8 #if SK_SUPPORT_GPU
9 9
10 #include "Test.h" 10 #include "Test.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 SkAutoTUnref<SkBBoxHierarchy> bbh; 127 SkAutoTUnref<SkBBoxHierarchy> bbh;
128 128
129 SkRecord rerecord; 129 SkRecord rerecord;
130 SkRecorder canvas(&rerecord, kWidth, kHeight); 130 SkRecorder canvas(&rerecord, kWidth, kHeight);
131 GrRecordReplaceDraw(pic, &canvas, &replacements, SkMatrix::I(), NULL/*callba ck*/); 131 GrRecordReplaceDraw(pic, &canvas, &replacements, SkMatrix::I(), NULL/*callba ck*/);
132 132
133 REPORTER_ASSERT(r, 7 == rerecord.count()); 133 REPORTER_ASSERT(r, 7 == rerecord.count());
134 assert_type<SkRecords::Save>(r, rerecord, 0); 134 assert_type<SkRecords::Save>(r, rerecord, 0);
135 assert_type<SkRecords::Save>(r, rerecord, 1); 135 assert_type<SkRecords::Save>(r, rerecord, 1);
136 assert_type<SkRecords::SetMatrix>(r, rerecord, 2); 136 assert_type<SkRecords::SetMatrix>(r, rerecord, 2);
137 assert_type<SkRecords::DrawBitmapRectToRect>(r, rerecord, 3); 137 assert_type<SkRecords::DrawImageRect>(r, rerecord, 3);
138 assert_type<SkRecords::Restore>(r, rerecord, 4); 138 assert_type<SkRecords::Restore>(r, rerecord, 4);
139 assert_type<SkRecords::DrawRect>(r, rerecord, 5); 139 assert_type<SkRecords::DrawRect>(r, rerecord, 5);
140 assert_type<SkRecords::Restore>(r, rerecord, 6); 140 assert_type<SkRecords::Restore>(r, rerecord, 6);
141 } 141 }
142 142
143 DEF_TEST(RecordReplaceDraw_Replace, r) { test_replacements(r, false); } 143 DEF_TEST(RecordReplaceDraw_Replace, r) { test_replacements(r, false); }
144 DEF_TEST(RecordReplaceDraw_ReplaceWithBBH, r) { test_replacements(r, true); } 144 DEF_TEST(RecordReplaceDraw_ReplaceWithBBH, r) { test_replacements(r, true); }
145 145
146 #endif 146 #endif
OLDNEW
« tests/RecordDrawTest.cpp ('K') | « tests/RecordDrawTest.cpp ('k') | tests/RecorderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698