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

Side by Side Diff: tests/PictureBBHTest.cpp

Issue 845623002: Remove SkTileGrid (except for TileGridInfo). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: kill gridSupported Created 5 years, 11 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 | « src/core/SkTileGrid.cpp ('k') | tests/RecordingXfermodeTest.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 2014 Google Inc. 2 * Copyright 2014 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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkBBoxHierarchy.h" 9 #include "SkBBoxHierarchy.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 virtual ~PictureBBHTestBase() { } 26 virtual ~PictureBBHTestBase() { }
27 27
28 virtual void doTest(SkCanvas& playbackCanvas, SkCanvas& recordingCanvas) = 0 ; 28 virtual void doTest(SkCanvas& playbackCanvas, SkCanvas& recordingCanvas) = 0 ;
29 29
30 void run(skiatest::Reporter* reporter) { 30 void run(skiatest::Reporter* reporter) {
31 // No BBH 31 // No BBH
32 this->run(NULL, reporter); 32 this->run(NULL, reporter);
33 33
34 // With a Tile Grid
35 SkTileGridFactory::TileGridInfo gridInfo;
36 gridInfo.fMargin.setEmpty();
37 gridInfo.fOffset.setZero();
38 gridInfo.fTileInterval.set(1, 1);
39 SkTileGridFactory gridFactory(gridInfo);
40 this->run(&gridFactory, reporter);
41
42 // With an R-Tree 34 // With an R-Tree
43 SkRTreeFactory RTreeFactory; 35 SkRTreeFactory RTreeFactory;
44 this->run(&RTreeFactory, reporter); 36 this->run(&RTreeFactory, reporter);
45 } 37 }
46 38
47 private: 39 private:
48 void run(SkBBHFactory* factory, skiatest::Reporter* reporter) { 40 void run(SkBBHFactory* factory, skiatest::Reporter* reporter) {
49 SkCanvas playbackCanvas(fResultBitmap); 41 SkCanvas playbackCanvas(fResultBitmap);
50 playbackCanvas.clear(SK_ColorGREEN); 42 playbackCanvas.clear(SK_ColorGREEN);
51 SkPictureRecorder recorder; 43 SkPictureRecorder recorder;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 }; 86 };
95 87
96 DEF_TEST(PictureBBH, reporter) { 88 DEF_TEST(PictureBBH, reporter) {
97 89
98 DrawEmptyPictureBBHTest emptyPictureTest; 90 DrawEmptyPictureBBHTest emptyPictureTest;
99 emptyPictureTest.run(reporter); 91 emptyPictureTest.run(reporter);
100 92
101 EmptyClipPictureBBHTest emptyClipPictureTest; 93 EmptyClipPictureBBHTest emptyClipPictureTest;
102 emptyClipPictureTest.run(reporter); 94 emptyClipPictureTest.run(reporter);
103 } 95 }
OLDNEW
« no previous file with comments | « src/core/SkTileGrid.cpp ('k') | tests/RecordingXfermodeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698