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

Unified Diff: tests/TileGridTest.cpp

Issue 238273012: Staged removal of SkPicture-derived classes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: have SkPicture only friend SkPictureRecorder once 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/SerializationTest.cpp ('k') | tools/PictureRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/TileGridTest.cpp
===================================================================
--- tests/TileGridTest.cpp (revision 14237)
+++ tests/TileGridTest.cpp (working copy)
@@ -34,7 +34,7 @@
static void verifyTileHits(skiatest::Reporter* reporter, SkIRect rect,
uint32_t tileMask, int borderPixels = 0) {
- SkTileGridPicture::TileGridInfo info;
+ SkTileGridFactory::TileGridInfo info;
info.fMargin.set(borderPixels, borderPixels);
info.fOffset.setZero();
info.fTileInterval.set(10 - 2 * borderPixels, 10 - 2 * borderPixels);
@@ -52,7 +52,7 @@
DEF_TEST(TileGrid_UnalignedQuery, reporter) {
// Use SkTileGridPicture to generate a SkTileGrid with a helper
- SkTileGridPicture::TileGridInfo info;
+ SkTileGridFactory::TileGridInfo info;
info.fMargin.setEmpty();
info.fOffset.setZero();
info.fTileInterval.set(10, 10);
@@ -60,9 +60,9 @@
SkIntToScalar(8), SkIntToScalar(8));
SkRect rect2 = SkRect::MakeXYWH(SkIntToScalar(11), SkIntToScalar(11),
SkIntToScalar(1), SkIntToScalar(1));
- SkAutoTUnref<SkPictureFactory> factory(SkNEW_ARGS(SkTileGridPictureFactory, (info)));
- SkPictureRecorder recorder(factory);
- SkCanvas* canvas = recorder.beginRecording(20, 20);
+ SkTileGridFactory factory(info);
+ SkPictureRecorder recorder;
+ SkCanvas* canvas = recorder.beginRecording(20, 20, &factory, 0);
SkPaint paint;
canvas->drawRect(rect1, paint);
canvas->drawRect(rect2, paint);
@@ -135,7 +135,7 @@
DEF_TEST(TileGrid_OverlapOffsetQueryAlignment, reporter) {
// Use SkTileGridPicture to generate a SkTileGrid with a helper
- SkTileGridPicture::TileGridInfo info;
+ SkTileGridFactory::TileGridInfo info;
info.fMargin.set(1, 1);
info.fOffset.set(-1, -1);
info.fTileInterval.set(8, 8);
@@ -149,9 +149,9 @@
// rect landing entirely in bottomright tile
SkRect rect3 = SkRect::MakeXYWH(SkIntToScalar(19), SkIntToScalar(19),
SkIntToScalar(1), SkIntToScalar(1));
- SkAutoTUnref<SkPictureFactory> factory(SkNEW_ARGS(SkTileGridPictureFactory, (info)));
- SkPictureRecorder recorder(factory);
- SkCanvas* canvas = recorder.beginRecording(20, 20);
+ SkTileGridFactory factory(info);
+ SkPictureRecorder recorder;
+ SkCanvas* canvas = recorder.beginRecording(20, 20, &factory, 0);
SkPaint paint;
canvas->drawRect(rect1, paint);
canvas->drawRect(rect2, paint);
« no previous file with comments | « tests/SerializationTest.cpp ('k') | tools/PictureRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698