OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "Resources.h" | 8 #include "Resources.h" |
9 #include "SkAndroidCodec.h" | 9 #include "SkAndroidCodec.h" |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 // Now test an image which is too big. Any image with a larger header (i.e. | 965 // Now test an image which is too big. Any image with a larger header (i.e. |
966 // has bigger width/height) is also too big. | 966 // has bigger width/height) is also too big. |
967 const unsigned char tooBigWbmp[] = { 0x00, 0x00, // Header | 967 const unsigned char tooBigWbmp[] = { 0x00, 0x00, // Header |
968 0x84, 0x80, 0x00, // W: 65536 | 968 0x84, 0x80, 0x00, // W: 65536 |
969 0x84, 0x80, 0x00 }; // H: 65536 | 969 0x84, 0x80, 0x00 }; // H: 65536 |
970 stream.reset(new SkMemoryStream(tooBigWbmp, sizeof(tooBigWbmp), false)); | 970 stream.reset(new SkMemoryStream(tooBigWbmp, sizeof(tooBigWbmp), false)); |
971 codec.reset(SkCodec::NewFromStream(stream.release())); | 971 codec.reset(SkCodec::NewFromStream(stream.release())); |
972 | 972 |
973 REPORTER_ASSERT(r, !codec); | 973 REPORTER_ASSERT(r, !codec); |
974 } | 974 } |
OLD | NEW |