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

Unified Diff: samplecode/SamplePictFile.cpp

Issue 845623002: Remove SkTileGrid (except for TileGridInfo). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: kill gridSupported Created 5 years, 11 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 | « include/core/SkBBHFactory.h ('k') | src/core/SkBBHFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SamplePictFile.cpp
diff --git a/samplecode/SamplePictFile.cpp b/samplecode/SamplePictFile.cpp
index 453624ec7421c55214eebdde3f415b0ded3d2278..bcbad9966c610c02a478cbc947f627519cada936 100644
--- a/samplecode/SamplePictFile.cpp
+++ b/samplecode/SamplePictFile.cpp
@@ -50,7 +50,6 @@ public:
virtual void onTileSizeChanged(const SkSize &tileSize) SK_OVERRIDE {
if (tileSize != fTileSize) {
fTileSize = tileSize;
- SkSafeSetNull(fPictures[kTileGrid_BBoxType]);
}
}
@@ -68,9 +67,6 @@ protected:
case kRTree_BBoxType:
name.append(" <bbox: R>");
break;
- case kTileGrid_BBoxType:
- name.append(" <bbox: T>");
- break;
default:
SkASSERT(false);
break;
@@ -105,9 +101,8 @@ private:
enum BBoxType {
kNo_BBoxType,
kRTree_BBoxType,
- kTileGrid_BBoxType,
- kLast_BBoxType = kTileGrid_BBoxType
+ kLast_BBoxType = kRTree_BBoxType,
};
static const int kBBoxTypeCount = kLast_BBoxType + 1;
@@ -123,8 +118,8 @@ private:
if (SkImageDecoder::DecodeFile(path, &bm)) {
bm.setImmutable();
SkPictureRecorder recorder;
- SkCanvas* can = recorder.beginRecording(SkIntToScalar(bm.width()),
- SkIntToScalar(bm.height()),
+ SkCanvas* can = recorder.beginRecording(SkIntToScalar(bm.width()),
+ SkIntToScalar(bm.height()),
NULL, 0);
can->drawBitmap(bm, 0, 0, NULL);
pic.reset(recorder.endRecording());
@@ -139,7 +134,7 @@ private:
if (false) { // re-record
SkPictureRecorder recorder;
pic->playback(recorder.beginRecording(pic->cullRect().width(),
- pic->cullRect().height(),
+ pic->cullRect().height(),
NULL, 0));
SkAutoTUnref<SkPicture> p2(recorder.endRecording());
@@ -162,22 +157,13 @@ private:
case kRTree_BBoxType:
factory.reset(SkNEW(SkRTreeFactory));
break;
- case kTileGrid_BBoxType: {
- SkASSERT(!fTileSize.isEmpty());
- SkTileGridFactory::TileGridInfo gridInfo;
- gridInfo.fMargin = SkISize::Make(0, 0);
- gridInfo.fOffset = SkIPoint::Make(0, 0);
- gridInfo.fTileInterval = fTileSize.toRound();
- factory.reset(SkNEW_ARGS(SkTileGridFactory, (gridInfo)));
- break;
- }
default:
SkASSERT(false);
}
SkPictureRecorder recorder;
pic->playback(recorder.beginRecording(pic->cullRect().width(),
- pic->cullRect().height(),
+ pic->cullRect().height(),
factory.get(), 0));
return recorder.endRecording();
}
« no previous file with comments | « include/core/SkBBHFactory.h ('k') | src/core/SkBBHFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698