| 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 "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
| 11 #include "SkData.h" | 11 #include "SkData.h" |
| 12 #include "SkDecodingImageGenerator.h" | 12 #include "SkDecodingImageGenerator.h" |
| 13 #include "SkError.h" | 13 #include "SkError.h" |
| 14 #include "SkImageEncoder.h" | 14 #include "SkImageEncoder.h" |
| 15 #include "SkImageGenerator.h" | 15 #include "SkImageGenerator.h" |
| 16 #include "SkPaint.h" | 16 #include "SkPaint.h" |
| 17 #include "SkPicture.h" | 17 #include "SkPicture.h" |
| 18 #include "SkPictureRecorder.h" |
| 18 #include "SkPictureUtils.h" | 19 #include "SkPictureUtils.h" |
| 19 #include "SkQuadTreePicture.h" | |
| 20 #include "SkRRect.h" | 20 #include "SkRRect.h" |
| 21 #include "SkRandom.h" | 21 #include "SkRandom.h" |
| 22 #include "SkRTreePicture.h" | |
| 23 #include "SkShader.h" | 22 #include "SkShader.h" |
| 24 #include "SkStream.h" | 23 #include "SkStream.h" |
| 25 #include "SkTileGrid.h" | |
| 26 #include "Test.h" | 24 #include "Test.h" |
| 27 | 25 |
| 28 static const int gColorScale = 30; | 26 static const int gColorScale = 30; |
| 29 static const int gColorOffset = 60; | 27 static const int gColorOffset = 60; |
| 30 | 28 |
| 31 static void make_bm(SkBitmap* bm, int w, int h, SkColor color, bool immutable) { | 29 static void make_bm(SkBitmap* bm, int w, int h, SkColor color, bool immutable) { |
| 32 bm->allocN32Pixels(w, h); | 30 bm->allocN32Pixels(w, h); |
| 33 bm->eraseColor(color); | 31 bm->eraseColor(color); |
| 34 if (immutable) { | 32 if (immutable) { |
| 35 bm->setImmutable(); | 33 bm->setImmutable(); |
| (...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1236 SkAutoTUnref<SkPicture> picture(recorder.endRecording()); | 1234 SkAutoTUnref<SkPicture> picture(recorder.endRecording()); |
| 1237 } | 1235 } |
| 1238 | 1236 |
| 1239 DEF_TEST(Canvas_EmptyBitmap, r) { | 1237 DEF_TEST(Canvas_EmptyBitmap, r) { |
| 1240 SkBitmap dst; | 1238 SkBitmap dst; |
| 1241 dst.allocN32Pixels(10, 10); | 1239 dst.allocN32Pixels(10, 10); |
| 1242 SkCanvas canvas(dst); | 1240 SkCanvas canvas(dst); |
| 1243 | 1241 |
| 1244 test_draw_bitmaps(&canvas); | 1242 test_draw_bitmaps(&canvas); |
| 1245 } | 1243 } |
| OLD | NEW |