Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: tools/VisualBench/VisualSKPBench.cpp

Issue 2018603003: Remove VisualBench and its Android implementation. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/VisualBench/VisualSKPBench.h ('k') | tools/VisualBench/VisualStreamTimingModule.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/VisualBench/VisualSKPBench.cpp
diff --git a/tools/VisualBench/VisualSKPBench.cpp b/tools/VisualBench/VisualSKPBench.cpp
deleted file mode 100644
index 5d15d7ef2071c6ea7d35ccd027ff423d598e12b2..0000000000000000000000000000000000000000
--- a/tools/VisualBench/VisualSKPBench.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- *
- */
-
-#include "VisualSKPBench.h"
-
-#if SK_SUPPORT_GPU
-#include "GrContext.h"
-#endif
-
-VisualSKPBench::VisualSKPBench(const char* name, const SkPicture* pic)
- : fPic(SkRef(pic))
- , fCullRect(fPic->cullRect().roundOut())
- , fName(name) {
- fUniqueName.printf("%s", name);
-}
-
-const char* VisualSKPBench::onGetName() {
- return fName.c_str();
-}
-
-const char* VisualSKPBench::onGetUniqueName() {
- return fUniqueName.c_str();
-}
-
-bool VisualSKPBench::isSuitableFor(Backend backend) {
- return backend != kNonRendering_Backend;
-}
-
-SkIPoint VisualSKPBench::onGetSize() {
- return SkIPoint::Make(fCullRect.width(), fCullRect.height());
-}
-
-void VisualSKPBench::onDraw(int loops, SkCanvas* canvas) {
- bool isOffset = SkToBool(fCullRect.left() | fCullRect.top());
- if (isOffset) {
- canvas->save();
- canvas->translate(SkIntToScalar(-fCullRect.left()), SkIntToScalar(-fCullRect.top()));
- }
-
- for (int i = 0; i < loops; i++) {
- canvas->drawPicture(fPic);
-#if SK_SUPPORT_GPU
- // Ensure the GrContext doesn't batch across draw loops.
- if (GrContext* context = canvas->getGrContext()) {
- context->flush();
- }
-#endif
- }
-
- if (isOffset) {
- canvas->restore();
- }
-}
« no previous file with comments | « tools/VisualBench/VisualSKPBench.h ('k') | tools/VisualBench/VisualStreamTimingModule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698