OLD | NEW |
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 "Test.h" | |
9 #include "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
10 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
11 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
12 #include "SkData.h" | 11 #include "SkData.h" |
13 #include "SkDecodingImageGenerator.h" | 12 #include "SkDecodingImageGenerator.h" |
14 #include "SkError.h" | 13 #include "SkError.h" |
15 #include "SkImageEncoder.h" | 14 #include "SkImageEncoder.h" |
16 #include "SkImageGenerator.h" | 15 #include "SkImageGenerator.h" |
17 #include "SkPaint.h" | 16 #include "SkPaint.h" |
18 #include "SkPicture.h" | 17 #include "SkPicture.h" |
19 #include "SkPictureUtils.h" | 18 #include "SkPictureUtils.h" |
| 19 #include "SkRRect.h" |
20 #include "SkRandom.h" | 20 #include "SkRandom.h" |
21 #include "SkRRect.h" | |
22 #include "SkShader.h" | 21 #include "SkShader.h" |
23 #include "SkStream.h" | 22 #include "SkStream.h" |
| 23 #include "Test.h" |
24 | 24 |
25 static const int gColorScale = 30; | 25 static const int gColorScale = 30; |
26 static const int gColorOffset = 60; | 26 static const int gColorOffset = 60; |
27 | 27 |
28 static void make_bm(SkBitmap* bm, int w, int h, SkColor color, bool immutable) { | 28 static void make_bm(SkBitmap* bm, int w, int h, SkColor color, bool immutable) { |
29 bm->setConfig(SkBitmap::kARGB_8888_Config, w, h); | 29 bm->setConfig(SkBitmap::kARGB_8888_Config, w, h); |
30 bm->allocPixels(); | 30 bm->allocPixels(); |
31 bm->eraseColor(color); | 31 bm->eraseColor(color); |
32 if (immutable) { | 32 if (immutable) { |
33 bm->setImmutable(); | 33 bm->setImmutable(); |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 #endif | 1025 #endif |
1026 test_peephole(); | 1026 test_peephole(); |
1027 test_gatherpixelrefs(reporter); | 1027 test_gatherpixelrefs(reporter); |
1028 test_gatherpixelrefsandrects(reporter); | 1028 test_gatherpixelrefsandrects(reporter); |
1029 test_bitmap_with_encoded_data(reporter); | 1029 test_bitmap_with_encoded_data(reporter); |
1030 test_clone_empty(reporter); | 1030 test_clone_empty(reporter); |
1031 test_clip_bound_opt(reporter); | 1031 test_clip_bound_opt(reporter); |
1032 test_clip_expansion(reporter); | 1032 test_clip_expansion(reporter); |
1033 test_hierarchical(reporter); | 1033 test_hierarchical(reporter); |
1034 } | 1034 } |
OLD | NEW |