Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / tools / bbh_shootout.cpp
index 64fc6d8..2a827fd 100644 (file)
@@ -23,7 +23,7 @@ static const int kBBoxTypeCount = sk_tools::PictureRenderer::kLast_BBoxHierarchy
 
 DEFINE_string2(skps, r, "", "The list of SKPs to benchmark.");
 DEFINE_string(bb_types, "", "The set of bbox types to test. If empty, all are tested. "
-                       "Should be one or more of none, quadtree, rtree, tilegrid.");
+                       "Should be one or more of none, rtree, tilegrid.");
 DEFINE_int32(record, 100, "Number of times to record each SKP.");
 DEFINE_int32(playback, 1, "Number of times to playback each SKP.");
 DEFINE_int32(tilesize, 256, "The size of a tile.");
@@ -36,7 +36,6 @@ struct Measurement {
 
 const char* kBBoxHierarchyTypeNames[kBBoxTypeCount] = {
     "none", // kNone_BBoxHierarchyType
-    "quadtree", // kQuadTree_BBoxHierarchyType
     "rtree", // kRTree_BBoxHierarchyType
     "tilegrid", // kTileGrid_BBoxHierarchyType
 };
@@ -105,14 +104,24 @@ int tool_main(int argc, char** argv) {
         for (int bBoxType = 0; bBoxType < kBBoxTypeCount; ++bBoxType) {
             if (!includeBBoxType[bBoxType]) { continue; }
             if (FLAGS_playback > 0) {
+#if SK_SUPPORT_GPU
+                GrContext::Options grContextOpts;
+                sk_tools::TiledPictureRenderer playbackRenderer(grContextOpts);
+#else
                 sk_tools::TiledPictureRenderer playbackRenderer;
+#endif
                 Timer playbackTimer;
                 do_benchmark_work(&playbackRenderer, (BBoxType)bBoxType,
                                   picture, FLAGS_playback, &playbackTimer);
                 measurement.fPlaybackAverage[bBoxType] = playbackTimer.fCpu;
             }
             if (FLAGS_record > 0) {
+#if SK_SUPPORT_GPU
+                GrContext::Options grContextOpts;
+                sk_tools::RecordPictureRenderer recordRenderer(grContextOpts);
+#else
                 sk_tools::RecordPictureRenderer recordRenderer;
+#endif
                 Timer recordTimer;
                 do_benchmark_work(&recordRenderer, (BBoxType)bBoxType,
                                   picture, FLAGS_record, &recordTimer);