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

Side by Side Diff: tests/PDFPrimitivesTest.cpp

Issue 805543002: DM warning-free on win64 (Closed) Base URL: https://skia.googlesource.com/skia.git@w64
Patch Set: Created 6 years 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/FlateTest.cpp ('k') | tests/PaintTest.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 2010 The Android Open Source Project 2 * Copyright 2010 The Android Open Source Project
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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 SkAutoDataUnref data(stream.copyToData()); 51 SkAutoDataUnref data(stream.copyToData());
52 if (offset + len > data->size()) { 52 if (offset + len > data->size()) {
53 return false; 53 return false;
54 } 54 }
55 return memcmp(data->bytes() + offset, buffer, len) == 0; 55 return memcmp(data->bytes() + offset, buffer, len) == 0;
56 } 56 }
57 57
58 static bool stream_contains(const SkDynamicMemoryWStream& stream, 58 static bool stream_contains(const SkDynamicMemoryWStream& stream,
59 const char* buffer) { 59 const char* buffer) {
60 SkAutoDataUnref data(stream.copyToData()); 60 SkAutoDataUnref data(stream.copyToData());
61 int len = strlen(buffer); // our buffer does not have EOSs. 61 size_t len = strlen(buffer); // our buffer does not have EOSs.
62 62
63 for (int offset = 0 ; offset < (int)data->size() - len; offset++) { 63 for (size_t offset = 0 ; offset < data->size() - len; offset++) {
64 if (memcmp(data->bytes() + offset, buffer, len) == 0) { 64 if (memcmp(data->bytes() + offset, buffer, len) == 0) {
65 return true; 65 return true;
66 } 66 }
67 } 67 }
68 68
69 return false; 69 return false;
70 } 70 }
71 71
72 static void CheckObjectOutput(skiatest::Reporter* reporter, SkPDFObject* obj, 72 static void CheckObjectOutput(skiatest::Reporter* reporter, SkPDFObject* obj,
73 const char* expectedData, size_t expectedSize, 73 const char* expectedData, size_t expectedSize,
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 468
469 // Filter just created; should be unvisited. 469 // Filter just created; should be unvisited.
470 REPORTER_ASSERT(reporter, !filter->visited()); 470 REPORTER_ASSERT(reporter, !filter->visited());
471 SkPaint paint; 471 SkPaint paint;
472 paint.setImageFilter(filter.get()); 472 paint.setImageFilter(filter.get());
473 canvas.drawRect(SkRect::MakeWH(100, 100), paint); 473 canvas.drawRect(SkRect::MakeWH(100, 100), paint);
474 474
475 // Filter was used in rendering; should be visited. 475 // Filter was used in rendering; should be visited.
476 REPORTER_ASSERT(reporter, filter->visited()); 476 REPORTER_ASSERT(reporter, filter->visited());
477 } 477 }
OLDNEW
« no previous file with comments | « tests/FlateTest.cpp ('k') | tests/PaintTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698