| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "PictureRenderingFlags.h" | 8 #include "PictureRenderingFlags.h" |
| 9 | 9 |
| 10 #include "CopyTilesRenderer.h" | 10 #include "CopyTilesRenderer.h" |
| 11 #if SK_SUPPORT_GPU | 11 #if SK_SUPPORT_GPU |
| 12 #include "GrContextOptions.h" | 12 #include "GrContextOptions.h" |
| 13 #endif | 13 #endif |
| 14 #include "PictureRenderer.h" | 14 #include "PictureRenderer.h" |
| 15 #include "picture_utils.h" | 15 #include "picture_utils.h" |
| 16 #include "SkCommandLineFlags.h" | 16 #include "SkCommandLineFlags.h" |
| 17 #include "SkData.h" | 17 #include "SkData.h" |
| 18 #include "SkImage.h" | 18 #include "SkImage.h" |
| 19 #include "SkImageDecoder.h" | 19 #include "SkImageDecoder.h" |
| 20 #include "SkString.h" | 20 #include "SkString.h" |
| 21 | 21 |
| 22 #include <stdlib.h> |
| 23 |
| 22 // Alphabetized list of flags used by this file or bench_ and render_pictures. | 24 // Alphabetized list of flags used by this file or bench_ and render_pictures. |
| 23 DEFINE_string(bbh, "none", "bbhType [width height]: Set the bounding box hierarc
hy type to " | 25 DEFINE_string(bbh, "none", "bbhType [width height]: Set the bounding box hierarc
hy type to " |
| 24 "be used. Accepted values are: none, rtree, grid. " | 26 "be used. Accepted values are: none, rtree, grid. " |
| 25 "Not compatible with --pipe. With value " | 27 "Not compatible with --pipe. With value " |
| 26 "'grid', width and height must be specified. 'grid' can " | 28 "'grid', width and height must be specified. 'grid' can " |
| 27 "only be used with modes tile, record, and " | 29 "only be used with modes tile, record, and " |
| 28 "playbackCreation."); | 30 "playbackCreation."); |
| 29 | 31 |
| 30 | 32 |
| 31 #if SK_SUPPORT_GPU | 33 #if SK_SUPPORT_GPU |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 if (FLAGS_pipe && sk_tools::PictureRenderer::kNone_BBoxHierarchyType !=
bbhType) { | 354 if (FLAGS_pipe && sk_tools::PictureRenderer::kNone_BBoxHierarchyType !=
bbhType) { |
| 353 error.printf("--pipe and --bbh cannot be used together\n"); | 355 error.printf("--pipe and --bbh cannot be used together\n"); |
| 354 return NULL; | 356 return NULL; |
| 355 } | 357 } |
| 356 } | 358 } |
| 357 renderer->setBBoxHierarchyType(bbhType); | 359 renderer->setBBoxHierarchyType(bbhType); |
| 358 renderer->setScaleFactor(SkDoubleToScalar(FLAGS_scale)); | 360 renderer->setScaleFactor(SkDoubleToScalar(FLAGS_scale)); |
| 359 | 361 |
| 360 return renderer.detach(); | 362 return renderer.detach(); |
| 361 } | 363 } |
| OLD | NEW |