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

Side by Side Diff: tests/PictureTest.cpp

Issue 1300163002: unsigned -> int for counts and indices in picture-related code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 5 years, 4 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/GpuLayerCacheTest.cpp ('k') | tests/RTreeTest.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 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 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 REPORTER_ASSERT(reporter, replayBM.getColor(30, 30) == 0xff000080); 1240 REPORTER_ASSERT(reporter, replayBM.getColor(30, 30) == 0xff000080);
1241 REPORTER_ASSERT(reporter, replayBM.getColor(55, 55) == 0xff800000); 1241 REPORTER_ASSERT(reporter, replayBM.getColor(55, 55) == 0xff800000);
1242 } 1242 }
1243 1243
1244 struct CountingBBH : public SkBBoxHierarchy { 1244 struct CountingBBH : public SkBBoxHierarchy {
1245 mutable int searchCalls; 1245 mutable int searchCalls;
1246 SkRect rootBound; 1246 SkRect rootBound;
1247 1247
1248 CountingBBH(const SkRect& bound) : searchCalls(0), rootBound(bound) {} 1248 CountingBBH(const SkRect& bound) : searchCalls(0), rootBound(bound) {}
1249 1249
1250 void search(const SkRect& query, SkTDArray<unsigned>* results) const overrid e { 1250 void search(const SkRect& query, SkTDArray<int>* results) const override {
1251 this->searchCalls++; 1251 this->searchCalls++;
1252 } 1252 }
1253 1253
1254 void insert(const SkRect[], int) override {} 1254 void insert(const SkRect[], int) override {}
1255 virtual size_t bytesUsed() const override { return 0; } 1255 virtual size_t bytesUsed() const override { return 0; }
1256 SkRect getRootBound() const override { return rootBound; } 1256 SkRect getRootBound() const override { return rootBound; }
1257 }; 1257 };
1258 1258
1259 class SpoonFedBBHFactory : public SkBBHFactory { 1259 class SpoonFedBBHFactory : public SkBBHFactory {
1260 public: 1260 public:
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 1355
1356 SkAutoTDelete<SkStream> rstream(wstream.detachAsStream()); 1356 SkAutoTDelete<SkStream> rstream(wstream.detachAsStream());
1357 SkAutoTUnref<SkPicture> deserializedPicture(SkPicture::CreateFromStream(rstr eam)); 1357 SkAutoTUnref<SkPicture> deserializedPicture(SkPicture::CreateFromStream(rstr eam));
1358 1358
1359 REPORTER_ASSERT(r, SkToBool(deserializedPicture)); 1359 REPORTER_ASSERT(r, SkToBool(deserializedPicture));
1360 REPORTER_ASSERT(r, deserializedPicture->cullRect().left() == 1); 1360 REPORTER_ASSERT(r, deserializedPicture->cullRect().left() == 1);
1361 REPORTER_ASSERT(r, deserializedPicture->cullRect().top() == 2); 1361 REPORTER_ASSERT(r, deserializedPicture->cullRect().top() == 2);
1362 REPORTER_ASSERT(r, deserializedPicture->cullRect().right() == 3); 1362 REPORTER_ASSERT(r, deserializedPicture->cullRect().right() == 3);
1363 REPORTER_ASSERT(r, deserializedPicture->cullRect().bottom() == 4); 1363 REPORTER_ASSERT(r, deserializedPicture->cullRect().bottom() == 4);
1364 } 1364 }
OLDNEW
« no previous file with comments | « tests/GpuLayerCacheTest.cpp ('k') | tests/RTreeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698