diff options
author | 2017-12-20 15:03:08 -0500 | |
---|---|---|
committer | 2017-12-20 20:27:06 +0000 | |
commit | b60c5ebf045df23f9a15f85c37825b15adff9d8d (patch) | |
tree | 59ddc5aea96dd7fef64b8e738ff9e20feed5db4f /tools | |
parent | 297d6efe852ebb98a324a71c79df8f7bbdcc3b94 (diff) |
remove unused willPlayBackBitmaps from picture
and SkPictureAnalyzer
Bug: skia:
Change-Id: I394eca648234b1a69e6f9a0a88c407366a33d079
Reviewed-on: https://skia-review.googlesource.com/87791
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gpuveto.cpp | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/tools/gpuveto.cpp b/tools/gpuveto.cpp deleted file mode 100644 index cc33721770..0000000000 --- a/tools/gpuveto.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2014 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "SkCommandLineFlags.h" -#include "SkPicture.h" -#include "SkPictureAnalyzer.h" -#include "SkPictureRecorder.h" -#include "SkStream.h" - -DEFINE_string2(readFile, r, "", "skp file to process."); -DEFINE_bool2(quiet, q, false, "quiet"); - -// This tool just loads a single skp, replays into a new SkPicture (to -// regenerate the GPU-specific tracking information) and reports -// the value of the suitableForGpuRasterization method. -// Return codes: -static const int kSuccess = 0; -static const int kError = 1; - -int main(int argc, char** argv) { -#if SK_SUPPORT_GPU - SkCommandLineFlags::SetUsage("Reports on an skp file's suitability for GPU rasterization"); - SkCommandLineFlags::Parse(argc, argv); - - if (FLAGS_readFile.count() != 1) { - if (!FLAGS_quiet) { - SkDebugf("Missing input file\n"); - } - return kError; - } - - SkFILEStream inputStream(FLAGS_readFile[0]); - if (!inputStream.isValid()) { - if (!FLAGS_quiet) { - SkDebugf("Couldn't open file\n"); - } - return kError; - } - - sk_sp<SkPicture> picture(SkPicture::MakeFromStream(&inputStream)); - if (nullptr == picture) { - if (!FLAGS_quiet) { - SkDebugf("Could not read the SkPicture\n"); - } - return kError; - } - - // The SkPicture tracking information is only generated during recording - // an isn't serialized. Replay the picture to regenerated the tracking data. - SkPictureRecorder recorder; - picture->playback(recorder.beginRecording(picture->cullRect().width(), - picture->cullRect().height(), - nullptr, 0)); - sk_sp<SkPicture> recorded(recorder.finishRecordingAsPicture()); - - if (SkPictureGpuAnalyzer(recorded).suitableForGpuRasterization(nullptr)) { - SkDebugf("suitable\n"); - } else { - SkDebugf("unsuitable\n"); - } - - return kSuccess; -#else - SkDebugf("gpuveto is only useful when GPU rendering is enabled\n"); - return kError; -#endif -} |