| scroggo@google.com | 161e1ba | 2013-03-04 16:41:06 +0000 | [diff] [blame] | 1 | /* | 
 | 2 |  * Copyright 2013 Google Inc. | 
 | 3 |  * | 
 | 4 |  * Use of this source code is governed by a BSD-style license that can be | 
 | 5 |  * found in the LICENSE file. | 
 | 6 |  */ | 
 | 7 |  | 
 | 8 | #ifndef PICTURE_RENDERING_FLAGS | 
 | 9 | #define PICTURE_RENDERING_FLAGS | 
 | 10 |  | 
| scroggo@google.com | bb281f7 | 2013-03-18 21:37:39 +0000 | [diff] [blame] | 11 | class SkString; | 
| scroggo@google.com | 161e1ba | 2013-03-04 16:41:06 +0000 | [diff] [blame] | 12 |  | 
 | 13 | namespace sk_tools { | 
 | 14 |     class PictureRenderer; | 
 | 15 | } | 
 | 16 |  | 
 | 17 | enum PictureTool { | 
 | 18 |     kBench_PictureTool, | 
 | 19 |     kRender_PictureTool, | 
 | 20 | }; | 
 | 21 |  | 
 | 22 | /** | 
| scroggo@google.com | d9ba9a0 | 2013-03-21 19:43:15 +0000 | [diff] [blame] | 23 |  *  Uses SkCommandLineFlags to parse the command line, and returns a PictureRenderer | 
 | 24 |  *  reflecting the flags used. Assumes that SkCommandLineFlags::Parse has | 
| scroggo@google.com | 161e1ba | 2013-03-04 16:41:06 +0000 | [diff] [blame] | 25 |  *  been called. | 
 | 26 |  *  @param error If there is an error or warning, it will be stored in error. | 
 | 27 |  *  @param tool Which tool is being used. | 
 | 28 |  *  @return PictureRenderer A PictureRenderer with the settings specified | 
 | 29 |  *          on the command line, or NULL if the command line is invalid. | 
 | 30 |  */ | 
 | 31 | sk_tools::PictureRenderer* parseRenderer(SkString& error, PictureTool tool); | 
 | 32 |  | 
 | 33 | #endif // PICTURE_RENDERING_FLAGS |