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

Side by Side Diff: tests/PathTest.cpp

Issue 51033004: add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/Matrix44Test.cpp ('k') | tests/ShaderImageFilterTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Test.h" 8 #include "Test.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 strokePaint.setStyle(SkPaint::kStroke_Style); 1761 strokePaint.setStyle(SkPaint::kStroke_Style);
1762 strokePaint.setStrokeWidth(2); 1762 strokePaint.setStrokeWidth(2);
1763 strokePaint.getFillPath(src, &dst); 1763 strokePaint.getFillPath(src, &dst);
1764 REPORTER_ASSERT(reporter, dst.isNestedRects(NULL)); 1764 REPORTER_ASSERT(reporter, dst.isNestedRects(NULL));
1765 } 1765 }
1766 1766
1767 static void write_and_read_back(skiatest::Reporter* reporter, 1767 static void write_and_read_back(skiatest::Reporter* reporter,
1768 const SkPath& p) { 1768 const SkPath& p) {
1769 SkWriter32 writer(100); 1769 SkWriter32 writer(100);
1770 writer.writePath(p); 1770 writer.writePath(p);
1771 size_t size = writer.size(); 1771 size_t size = writer.bytesWritten();
1772 SkAutoMalloc storage(size); 1772 SkAutoMalloc storage(size);
1773 writer.flatten(storage.get()); 1773 writer.flatten(storage.get());
1774 SkReader32 reader(storage.get(), size); 1774 SkReader32 reader(storage.get(), size);
1775 1775
1776 SkPath readBack; 1776 SkPath readBack;
1777 REPORTER_ASSERT(reporter, readBack != p); 1777 REPORTER_ASSERT(reporter, readBack != p);
1778 reader.readPath(&readBack); 1778 reader.readPath(&readBack);
1779 REPORTER_ASSERT(reporter, readBack == p); 1779 REPORTER_ASSERT(reporter, readBack == p);
1780 1780
1781 REPORTER_ASSERT(reporter, readBack.getConvexityOrUnknown() == 1781 REPORTER_ASSERT(reporter, readBack.getConvexityOrUnknown() ==
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
2670 test_bad_cubic_crbug229478(); 2670 test_bad_cubic_crbug229478();
2671 test_bad_cubic_crbug234190(); 2671 test_bad_cubic_crbug234190();
2672 test_android_specific_behavior(reporter); 2672 test_android_specific_behavior(reporter);
2673 test_gen_id(reporter); 2673 test_gen_id(reporter);
2674 test_path_close_issue1474(reporter); 2674 test_path_close_issue1474(reporter);
2675 test_path_to_region(reporter); 2675 test_path_to_region(reporter);
2676 } 2676 }
2677 2677
2678 #include "TestClassDef.h" 2678 #include "TestClassDef.h"
2679 DEFINE_TESTCLASS("Path", PathTestClass, TestPath) 2679 DEFINE_TESTCLASS("Path", PathTestClass, TestPath)
OLDNEW
« no previous file with comments | « tests/Matrix44Test.cpp ('k') | tests/ShaderImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698