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

Side by Side Diff: tests/PictureTest.cpp

Issue 500373005: Remove SkQuadTree. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « tests/BBoxHierarchyTest.cpp ('k') | tools/PictureRenderer.h » ('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 2012 Google Inc. 2 * Copyright 2012 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 "SkBBoxHierarchy.h" 8 #include "SkBBoxHierarchy.h"
9 #include "SkBlurImageFilter.h" 9 #include "SkBlurImageFilter.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 1466
1467 { 1467 {
1468 // RTree 1468 // RTree
1469 SkRTreeFactory factory; 1469 SkRTreeFactory factory;
1470 SkPictureRecorder recorder; 1470 SkPictureRecorder recorder;
1471 recorder.beginRecording(1, 1, &factory); 1471 recorder.beginRecording(1, 1, &factory);
1472 SkAutoTUnref<SkPicture> picture(recorder.endRecording()); 1472 SkAutoTUnref<SkPicture> picture(recorder.endRecording());
1473 1473
1474 canvas.drawPicture(picture); 1474 canvas.drawPicture(picture);
1475 } 1475 }
1476
1477 {
1478 // quad tree
1479 SkQuadTreeFactory factory;
1480 SkPictureRecorder recorder;
1481 recorder.beginRecording(1, 1, &factory);
1482 SkAutoTUnref<SkPicture> picture(recorder.endRecording());
1483
1484 canvas.drawPicture(picture);
1485 }
1486 } 1476 }
1487 1477
1488 static void test_clip_bound_opt(skiatest::Reporter* reporter) { 1478 static void test_clip_bound_opt(skiatest::Reporter* reporter) {
1489 // Test for crbug.com/229011 1479 // Test for crbug.com/229011
1490 SkRect rect1 = SkRect::MakeXYWH(SkIntToScalar(4), SkIntToScalar(4), 1480 SkRect rect1 = SkRect::MakeXYWH(SkIntToScalar(4), SkIntToScalar(4),
1491 SkIntToScalar(2), SkIntToScalar(2)); 1481 SkIntToScalar(2), SkIntToScalar(2));
1492 SkRect rect2 = SkRect::MakeXYWH(SkIntToScalar(7), SkIntToScalar(7), 1482 SkRect rect2 = SkRect::MakeXYWH(SkIntToScalar(7), SkIntToScalar(7),
1493 SkIntToScalar(1), SkIntToScalar(1)); 1483 SkIntToScalar(1), SkIntToScalar(1));
1494 SkRect rect3 = SkRect::MakeXYWH(SkIntToScalar(6), SkIntToScalar(6), 1484 SkRect rect3 = SkRect::MakeXYWH(SkIntToScalar(6), SkIntToScalar(6),
1495 SkIntToScalar(1), SkIntToScalar(1)); 1485 SkIntToScalar(1), SkIntToScalar(1));
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 SkAutoTUnref<const SkPicture> picture(recorder.endRecording()); 1841 SkAutoTUnref<const SkPicture> picture(recorder.endRecording());
1852 1842
1853 SkCanvas big(640, 480), small(300, 200); 1843 SkCanvas big(640, 480), small(300, 200);
1854 1844
1855 picture->draw(&big); 1845 picture->draw(&big);
1856 REPORTER_ASSERT(r, bbh.searchCalls == 0); 1846 REPORTER_ASSERT(r, bbh.searchCalls == 0);
1857 1847
1858 picture->draw(&small); 1848 picture->draw(&small);
1859 REPORTER_ASSERT(r, bbh.searchCalls == 1); 1849 REPORTER_ASSERT(r, bbh.searchCalls == 1);
1860 } 1850 }
OLDNEW
« no previous file with comments | « tests/BBoxHierarchyTest.cpp ('k') | tools/PictureRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698