skia2/tools/PictureRenderingFlags.h
scroggo@google.com d9ba9a05d6 Change the name of SkFlags to SkCommandLineFlags.
This name is more specific to what it actually does.

Also move the code into tools/flags, to (slightly) better organize
the massive tools folder.

Update the programs that use it to use the new names.

No functionality changes.

BUG=https://code.google.com/p/skia/issues/detail?id=1173

Review URL: https://codereview.chromium.org/12440067

git-svn-id: http://skia.googlecode.com/svn/trunk@8304 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-21 19:43:15 +00:00

34 lines
913 B
C++

/*
* 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
class SkString;
namespace sk_tools {
class PictureRenderer;
}
enum PictureTool {
kBench_PictureTool,
kRender_PictureTool,
};
/**
* Uses SkCommandLineFlags to parse the command line, and returns a PictureRenderer
* reflecting the flags used. Assumes that SkCommandLineFlags::Parse has
* 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