| 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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
| 9 #include "SkData.h" | 9 #include "SkData.h" |
| 10 #include "SkDevice.h" | 10 #include "SkDevice.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 for (size_t i = 0; i < SK_ARRAY_COUNT(rec); ++i) { | 238 for (size_t i = 0; i < SK_ARRAY_COUNT(rec); ++i) { |
| 239 SkBitmap bm; | 239 SkBitmap bm; |
| 240 rec[i].fMakeProc(&bm); | 240 rec[i].fMakeProc(&bm); |
| 241 | 241 |
| 242 SkAutoTUnref<SkImage> image(SkImage::NewFromBitmap(bm)); | 242 SkAutoTUnref<SkImage> image(SkImage::NewFromBitmap(bm)); |
| 243 SkPixmap pmap; | 243 SkPixmap pmap; |
| 244 | 244 |
| 245 const bool sharedID = (image->uniqueID() == bm.getGenerationID()); | 245 const bool sharedID = (image->uniqueID() == bm.getGenerationID()); |
| 246 REPORTER_ASSERT(reporter, sharedID == rec[i].fExpectSharedID); | 246 REPORTER_ASSERT(reporter, sharedID == rec[i].fExpectSharedID); |
| 247 | 247 |
| 248 #if 0 // TODO: fix so that peek will succeed in the immutable case | |
| 249 const bool peekSuccess = image->peekPixels(&pmap); | 248 const bool peekSuccess = image->peekPixels(&pmap); |
| 250 REPORTER_ASSERT(reporter, peekSuccess == rec[i].fExpectPeekSuccess); | 249 REPORTER_ASSERT(reporter, peekSuccess == rec[i].fExpectPeekSuccess); |
| 251 #endif | |
| 252 } | 250 } |
| 253 } | 251 } |
| OLD | NEW |