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

Side by Side Diff: tests/RecordDrawTest.cpp

Issue 977413003: Revert of Update SkPicture cull rects with RTree information (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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/PictureTest.cpp ('k') | no next file » | 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 "Test.h" 8 #include "Test.h"
9 #include "RecordTestUtils.h" 9 #include "RecordTestUtils.h"
10 10
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void insert(const SkRect boundsArray[], int N) SK_OVERRIDE { 126 void insert(const SkRect boundsArray[], int N) SK_OVERRIDE {
127 fEntries.setCount(N); 127 fEntries.setCount(N);
128 for (int i = 0; i < N; i++) { 128 for (int i = 0; i < N; i++) {
129 Entry e = { (unsigned)i, boundsArray[i] }; 129 Entry e = { (unsigned)i, boundsArray[i] };
130 fEntries[i] = e; 130 fEntries[i] = e;
131 } 131 }
132 } 132 }
133 133
134 void search(const SkRect& query, SkTDArray<unsigned>* results) const SK_OVER RIDE {} 134 void search(const SkRect& query, SkTDArray<unsigned>* results) const SK_OVER RIDE {}
135 size_t bytesUsed() const SK_OVERRIDE { return 0; } 135 size_t bytesUsed() const SK_OVERRIDE { return 0; }
136 SkRect getRootBound() const SK_OVERRIDE { return SkRect::MakeEmpty(); }
137 136
138 struct Entry { 137 struct Entry {
139 unsigned opIndex; 138 unsigned opIndex;
140 SkRect bounds; 139 SkRect bounds;
141 }; 140 };
142 SkTDArray<Entry> fEntries; 141 SkTDArray<Entry> fEntries;
143 }; 142 };
144 143
145 // Like a==b, with a little slop recognizing that float equality can be weird. 144 // Like a==b, with a little slop recognizing that float equality can be weird.
146 static bool sloppy_rect_eq(SkRect a, SkRect b) { 145 static bool sloppy_rect_eq(SkRect a, SkRect b) {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 323
325 { 324 {
326 SkRecord record; 325 SkRecord record;
327 SkRecorder recorder(&record, 10, 10); 326 SkRecorder recorder(&record, 10, 10);
328 recorder.drawImageRect(image, 0, SkRect::MakeWH(10, 10)); 327 recorder.drawImageRect(image, 0, SkRect::MakeWH(10, 10));
329 SkRecordDraw(record, &canvas, NULL, NULL, 0, NULL, 0); 328 SkRecordDraw(record, &canvas, NULL, NULL, 0, NULL, 0);
330 } 329 }
331 REPORTER_ASSERT(r, canvas.fDrawImageRectCalled); 330 REPORTER_ASSERT(r, canvas.fDrawImageRectCalled);
332 331
333 } 332 }
OLDNEW
« no previous file with comments | « tests/PictureTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698