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

Unified Diff: tests/PaintTest.cpp

Issue 15553005: add kBicubicFilterBitmap_Flag to paint, just for testing purposes. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | « include/core/SkPaint.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PaintTest.cpp
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp
index b08f22c082fd1f66e2f83184043e7e2a59ed4f17..0db34b6f09a5730e05fc6926f13a1ff4704c5183 100644
--- a/tests/PaintTest.cpp
+++ b/tests/PaintTest.cpp
@@ -11,6 +11,20 @@
#include "SkLayerDrawLooper.h"
#include "SkBlurMaskFilter.h"
+// temparary api for bicubic, just be sure we can set/clear it
+static void test_bicubic(skiatest::Reporter* reporter) {
+ SkPaint p0;
+ REPORTER_ASSERT(reporter, 0 == (p0.getFlags() & SkPaint::kBicubicFilterBitmap_Flag));
+ p0.setFlags(p0.getFlags() | SkPaint::kBicubicFilterBitmap_Flag);
+ REPORTER_ASSERT(reporter, 0 != (p0.getFlags() & SkPaint::kBicubicFilterBitmap_Flag));
+ SkPaint p1(p0);
+ REPORTER_ASSERT(reporter, 0 != (p1.getFlags() & SkPaint::kBicubicFilterBitmap_Flag));
+ p0.reset();
+ REPORTER_ASSERT(reporter, 0 == (p0.getFlags() & SkPaint::kBicubicFilterBitmap_Flag));
+ p0 = p1;
+ p0.setFlags(p0.getFlags() | SkPaint::kBicubicFilterBitmap_Flag);
+}
+
static void test_copy(skiatest::Reporter* reporter) {
SkPaint paint;
// set a few member variables
@@ -118,6 +132,8 @@ static void TestPaint(skiatest::Reporter* reporter) {
// regression tests
regression_cubic(reporter);
regression_measureText(reporter);
+
+ test_bicubic(reporter);
}
#include "TestClassDef.h"
« no previous file with comments | « include/core/SkPaint.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698