Index: tools/vulkan/viewer/GMSlide.cpp |
diff --git a/tools/vulkan/viewer/GMSlide.cpp b/tools/vulkan/viewer/GMSlide.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..59a00cfcbe8c72d3576582271c8eed8fd7ab860f |
--- /dev/null |
+++ b/tools/vulkan/viewer/GMSlide.cpp |
@@ -0,0 +1,28 @@ |
+/* |
+* Copyright 2016 Google Inc. |
+* |
+* Use of this source code is governed by a BSD-style license that can be |
+* found in the LICENSE file. |
+*/ |
+/* |
+* 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 "GMSlide.h" |
+#include "SkCanvas.h" |
+ |
+GMSlide::GMSlide(skiagm::GM* gm) : fGM(gm) { |
+ fName.printf("GM_%s", gm->getName()); |
+} |
+ |
+GMSlide::~GMSlide() { delete fGM; } |
+ |
+void GMSlide::draw(SkCanvas* canvas) { |
+ // Do we care about timing the draw of the background (once)? |
+ // Does the GM ever rely on drawBackground to lazily compute something? |
+ fGM->drawBackground(canvas); |
+ fGM->drawContent(canvas); |
+} |