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

Unified Diff: gm/gmmain.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 | « gm/distantclip.cpp ('k') | gm/optimizations.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gmmain.cpp
===================================================================
--- gm/gmmain.cpp (revision 14237)
+++ gm/gmmain.cpp (working copy)
@@ -1014,20 +1014,20 @@
int width = SkScalarCeilToInt(SkScalarMul(SkIntToScalar(gm->getISize().width()), scale));
int height = SkScalarCeilToInt(SkScalarMul(SkIntToScalar(gm->getISize().height()), scale));
- SkAutoTUnref<SkPictureFactory> factory;
+ SkAutoTDelete<SkBBHFactory> factory;
if (kTileGrid_BbhType == bbhType) {
- SkTileGridPicture::TileGridInfo info;
+ SkTileGridFactory::TileGridInfo info;
info.fMargin.setEmpty();
info.fOffset.setZero();
info.fTileInterval.set(16, 16);
- factory.reset(SkNEW_ARGS(SkTileGridPictureFactory, (info)));
+ factory.reset(SkNEW_ARGS(SkTileGridFactory, (info)));
} else if (kQuadTree_BbhType == bbhType) {
- factory.reset(SkNEW(SkQuadTreePictureFactory));
+ factory.reset(SkNEW(SkQuadTreeFactory));
} else if (kRTree_BbhType == bbhType) {
- factory.reset(SkNEW(SkRTreePictureFactory));
+ factory.reset(SkNEW(SkRTreeFactory));
}
- SkPictureRecorder recorder(factory);
- SkCanvas* cv = recorder.beginRecording(width, height, recordFlags);
+ SkPictureRecorder recorder;
+ SkCanvas* cv = recorder.beginRecording(width, height, factory.get(), recordFlags);
cv->scale(scale, scale);
invokeGM(gm, cv, false, false);
return recorder.endRecording();
« no previous file with comments | « gm/distantclip.cpp ('k') | gm/optimizations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698