aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-01-09 06:41:48 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-09 06:41:48 -0800
commit703dd2ed187b9788c5bb0f2d313f2d07695603d6 (patch)
treee2314099eb0729896a8c919556852413f209aaeb /gm
parent9250543c559bb756e7749a13bdea6c3be3861f2b (diff)
Remove SkTileGrid (except for TileGridInfo).
TBR=reed@google.com BUG=skia:3085 Review URL: https://codereview.chromium.org/845623002
Diffstat (limited to 'gm')
-rw-r--r--gm/gmmain.cpp48
1 files changed, 3 insertions, 45 deletions
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 1652e61f7c..6201950657 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -142,7 +142,6 @@ enum Backend {
enum BbhType {
kNone_BbhType,
kRTree_BbhType,
- kTileGrid_BbhType,
};
enum ConfigFlags {
@@ -1039,13 +1038,7 @@ public:
SkScalar height = SkScalarMul(SkIntToScalar(gm->getISize().height()), scale);
SkAutoTDelete<SkBBHFactory> factory;
- if (kTileGrid_BbhType == bbhType) {
- SkTileGridFactory::TileGridInfo info;
- info.fMargin.setEmpty();
- info.fOffset.setZero();
- info.fTileInterval.set(16, 16);
- factory.reset(SkNEW_ARGS(SkTileGridFactory, (info)));
- } else if (kRTree_BbhType == bbhType) {
+ if (kRTree_BbhType == bbhType) {
factory.reset(SkNEW(SkRTreeFactory));
}
SkPictureRecorder recorder;
@@ -1175,7 +1168,7 @@ public:
const SkISize& size,
GrSurface* gpuTarget) {
if (config.fBackend == kRaster_Backend) {
- SkImageInfo ii = SkImageInfo::Make(size.width(), size.height(),
+ SkImageInfo ii = SkImageInfo::Make(size.width(), size.height(),
config.fColorType, kPremul_SkAlphaType);
return SkSurface::NewRaster(ii);
@@ -1725,41 +1718,6 @@ ErrorCombination run_multiple_modes(GMMain &gmmain, GM *gm,
}
}
- if (FLAGS_tileGrid) {
- for(int scaleIndex = 0; scaleIndex < tileGridReplayScales.count(); ++scaleIndex) {
- SkScalar replayScale = tileGridReplayScales[scaleIndex];
- SkString renderModeDescriptor("-tilegrid");
- if (SK_Scalar1 != replayScale) {
- renderModeDescriptor += "-scale-";
- renderModeDescriptor.appendScalar(replayScale);
- }
-
- if ((gmFlags & GM::kSkipPicture_Flag) ||
- (gmFlags & GM::kSkipTiled_Flag) ||
- ((gmFlags & GM::kSkipScaledReplay_Flag) && replayScale != 1)) {
- gmmain.RecordTestResults(kIntentionallySkipped_ErrorType, shortNamePlusConfig,
- renderModeDescriptor.c_str());
- errorsForAllModes.add(kIntentionallySkipped_ErrorType);
- } else {
- // We record with the reciprocal scale to obtain a replay
- // result that can be validated against comparisonBitmap.
- SkScalar recordScale = SkScalarInvert(replayScale);
- SkPicture* pict = gmmain.generate_new_picture(
- gm, kTileGrid_BbhType, 0, recordScale);
- SkAutoTUnref<SkPicture> aur(pict);
- SkBitmap bitmap;
- // We cannot yet pass 'true' to generate_image_from_picture to
- // perform actual tiled rendering (see Issue 1198 -
- // https://code.google.com/p/skia/issues/detail?id=1198)
- gmmain.generate_image_from_picture(gm, compareConfig, gpuTarget, pict, &bitmap,
- replayScale /*, true */);
- errorsForAllModes.add(gmmain.compare_test_results_to_reference_bitmap(
- gm->getName(), compareConfig.fName, renderModeDescriptor.c_str(), bitmap,
- &comparisonBitmap));
- }
- }
- }
-
// run the pipe centric GM steps
if (FLAGS_pipe) {
errorsForAllModes.add(gmmain.test_pipe_playback(gm, compareConfig, comparisonBitmap,
@@ -1909,7 +1867,7 @@ ErrorCombination run_multiple_configs(GMMain &gmmain, GM *gm,
config.fBackend);
errorsForThisConfig.add(kIntentionallySkipped_ErrorType);
} else if (!(gmFlags & GM::kGPUOnly_Flag)) {
- errorsForThisConfig.add(gmmain.testMPDDrawing(gm, config,
+ errorsForThisConfig.add(gmmain.testMPDDrawing(gm, config,
writePath, gpuTarget,
comparisonBitmap));
}