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

Unified Diff: tests/ImageGeneratorTest.cpp

Issue 374743003: Skia side RGB to YUV gpu conversion (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Ported a minimal set of blink side changes for YUV decoding tests Created 6 years, 5 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
Index: tests/ImageGeneratorTest.cpp
diff --git a/tests/ImageGeneratorTest.cpp b/tests/ImageGeneratorTest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..90adbb6bdef4cbd465fc531687c0df788b8a5167
--- /dev/null
+++ b/tests/ImageGeneratorTest.cpp
@@ -0,0 +1,32 @@
+/*
+ * 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 "Resources.h"
scroggo 2014/07/18 21:52:41 Unused?
sugoi1 2014/07/21 16:51:45 Removed
+#include "SkImageGenerator.h"
+#include "Test.h"
+
+DEF_TEST(ImageGenerator, reporter) {
+ SkImageGenerator ig;
+ SkISize sizes[3];
+ sizes[0] = SkISize::Make(200, 200);
+ sizes[1] = SkISize::Make(100, 100);
+ sizes[2] = SkISize::Make( 50, 50);
+ void* planes[3] = { NULL };
+ size_t rowBytes[3] = { 0 };
+
+ // Check that the YUV decoding API does not cause any crashes
+ ig.getYUV8Planes(sizes, NULL, NULL);
scroggo 2014/07/18 21:52:41 Should we REPORTER_ASSERT that these return the va
sugoi1 2014/07/21 16:51:44 This test is just to make sure that no valid combi
+ ig.getYUV8Planes(sizes, planes, NULL);
+ ig.getYUV8Planes(sizes, NULL, rowBytes);
+ ig.getYUV8Planes(sizes, planes, rowBytes);
+
+ int dummy;
+ planes[0] = planes[1] = planes[2] = &dummy;
+ rowBytes[0] = rowBytes[1] = rowBytes[2] = 250;
+
+ ig.getYUV8Planes(sizes, planes, rowBytes);
+}

Powered by Google App Engine
This is Rietveld 408576698