| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkBitmapSource.h" | 9 #include "SkBitmapSource.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| 11 #include "SkMallocPixelRef.h" | 11 #include "SkMallocPixelRef.h" |
| 12 #include "SkPictureRecorder.h" |
| 12 #include "SkTemplates.h" | 13 #include "SkTemplates.h" |
| 13 #include "SkWriteBuffer.h" | 14 #include "SkWriteBuffer.h" |
| 14 #include "SkValidatingReadBuffer.h" | 15 #include "SkValidatingReadBuffer.h" |
| 15 #include "SkXfermodeImageFilter.h" | 16 #include "SkXfermodeImageFilter.h" |
| 16 #include "Test.h" | 17 #include "Test.h" |
| 17 | 18 |
| 18 static const uint32_t kArraySize = 64; | 19 static const uint32_t kArraySize = 64; |
| 19 static const int kBitmapSize = 256; | 20 static const int kBitmapSize = 256; |
| 20 | 21 |
| 21 template<typename T> | 22 template<typename T> |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 SkAutoTMalloc<unsigned char> data(size); | 382 SkAutoTMalloc<unsigned char> data(size); |
| 382 writer.writeToMemory(static_cast<void*>(data.get())); | 383 writer.writeToMemory(static_cast<void*>(data.get())); |
| 383 | 384 |
| 384 // Deserialize picture | 385 // Deserialize picture |
| 385 SkValidatingReadBuffer reader(static_cast<void*>(data.get()), size); | 386 SkValidatingReadBuffer reader(static_cast<void*>(data.get()), size); |
| 386 SkAutoTUnref<SkPicture> readPict( | 387 SkAutoTUnref<SkPicture> readPict( |
| 387 SkPicture::CreateFromBuffer(reader)); | 388 SkPicture::CreateFromBuffer(reader)); |
| 388 REPORTER_ASSERT(reporter, NULL != readPict.get()); | 389 REPORTER_ASSERT(reporter, NULL != readPict.get()); |
| 389 } | 390 } |
| 390 } | 391 } |
| OLD | NEW |