Index: tools/PictureRenderer.cpp |
=================================================================== |
--- tools/PictureRenderer.cpp (revision 14237) |
+++ tools/PictureRenderer.cpp (working copy) |
@@ -274,9 +274,10 @@ |
void PictureRenderer::buildBBoxHierarchy() { |
SkASSERT(NULL != fPicture); |
if (kNone_BBoxHierarchyType != fBBoxHierarchyType && NULL != fPicture) { |
- SkAutoTUnref<SkPictureFactory> factory(this->getFactory()); |
- SkPictureRecorder recorder(factory); |
+ SkAutoTDelete<SkBBHFactory> factory(this->getFactory()); |
+ SkPictureRecorder recorder; |
SkCanvas* canvas = recorder.beginRecording(fPicture->width(), fPicture->height(), |
+ factory.get(), |
this->recordFlags()); |
fPicture->draw(canvas); |
fPicture.reset(recorder.endRecording()); |
@@ -435,9 +436,10 @@ |
} |
bool RecordPictureRenderer::render(SkBitmap** out) { |
- SkAutoTUnref<SkPictureFactory> factory(this->getFactory()); |
- SkPictureRecorder recorder(factory); |
+ SkAutoTDelete<SkBBHFactory> factory(this->getFactory()); |
+ SkPictureRecorder recorder; |
SkCanvas* canvas = recorder.beginRecording(this->getViewWidth(), this->getViewHeight(), |
+ factory.get(), |
this->recordFlags()); |
this->scaleToScaleFactor(canvas); |
fPicture->draw(canvas); |
@@ -954,9 +956,10 @@ |
/////////////////////////////////////////////////////////////////////////////////////////////// |
void PlaybackCreationRenderer::setup() { |
- SkAutoTUnref<SkPictureFactory> factory(this->getFactory()); |
- fRecorder.reset(SkNEW_ARGS(SkPictureRecorder, (factory))); |
+ SkAutoTDelete<SkBBHFactory> factory(this->getFactory()); |
+ fRecorder.reset(SkNEW(SkPictureRecorder)); |
SkCanvas* canvas = fRecorder->beginRecording(this->getViewWidth(), this->getViewHeight(), |
+ factory.get(), |
this->recordFlags()); |
this->scaleToScaleFactor(canvas); |
canvas->drawPicture(*fPicture); |
@@ -975,16 +978,16 @@ |
/////////////////////////////////////////////////////////////////////////////////////////////// |
// SkPicture variants for each BBoxHierarchy type |
-SkPictureFactory* PictureRenderer::getFactory() { |
+SkBBHFactory* PictureRenderer::getFactory() { |
switch (fBBoxHierarchyType) { |
case kNone_BBoxHierarchyType: |
return NULL; |
case kQuadTree_BBoxHierarchyType: |
- return SkNEW(SkQuadTreePictureFactory); |
+ return SkNEW(SkQuadTreeFactory); |
case kRTree_BBoxHierarchyType: |
- return SkNEW(SkRTreePictureFactory); |
+ return SkNEW(SkRTreeFactory); |
case kTileGrid_BBoxHierarchyType: |
- return new SkTileGridPictureFactory(fGridInfo); |
+ return SkNEW_ARGS(SkTileGridFactory, (fGridInfo)); |
} |
SkASSERT(0); // invalid bbhType |
return NULL; |