2013-03-04 16:41:06 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2013 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PICTURE_RENDERING_FLAGS
|
|
|
|
#define PICTURE_RENDERING_FLAGS
|
|
|
|
|
2013-03-18 21:37:39 +00:00
|
|
|
class SkString;
|
2013-03-04 16:41:06 +00:00
|
|
|
|
|
|
|
namespace sk_tools {
|
|
|
|
class PictureRenderer;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum PictureTool {
|
|
|
|
kBench_PictureTool,
|
|
|
|
kRender_PictureTool,
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-03-21 19:43:15 +00:00
|
|
|
* Uses SkCommandLineFlags to parse the command line, and returns a PictureRenderer
|
|
|
|
* reflecting the flags used. Assumes that SkCommandLineFlags::Parse has
|
2013-03-04 16:41:06 +00:00
|
|
|
* been called.
|
|
|
|
* @param error If there is an error or warning, it will be stored in error.
|
|
|
|
* @param tool Which tool is being used.
|
|
|
|
* @return PictureRenderer A PictureRenderer with the settings specified
|
|
|
|
* on the command line, or NULL if the command line is invalid.
|
|
|
|
*/
|
|
|
|
sk_tools::PictureRenderer* parseRenderer(SkString& error, PictureTool tool);
|
|
|
|
|
|
|
|
#endif // PICTURE_RENDERING_FLAGS
|