| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "SkAnnotation.h" | 9 #include "SkAnnotation.h" |
| 10 #include "SkBitmapDevice.h" | 10 #include "SkBitmapDevice.h" |
| (...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1442 } | 1442 } |
| 1443 | 1443 |
| 1444 int32_t SkImageHeap::insert(const SkImage* img) { | 1444 int32_t SkImageHeap::insert(const SkImage* img) { |
| 1445 int32_t slot = this->find(img); | 1445 int32_t slot = this->find(img); |
| 1446 if (slot) { | 1446 if (slot) { |
| 1447 return slot; | 1447 return slot; |
| 1448 } | 1448 } |
| 1449 // TODO: SkImage does not expose bytes per pixel, 4 is just a best guess. | 1449 // TODO: SkImage does not expose bytes per pixel, 4 is just a best guess. |
| 1450 fBytesInCache += img->width() * img->height() * 4; | 1450 fBytesInCache += img->width() * img->height() * 4; |
| 1451 *fArray.append() = SkRef(img); | 1451 *fArray.append() = SkRef(img); |
| 1452 printf("Images reff'ed: %d \n", fArray.count()); | |
| 1453 return fArray.count(); // slot is always index+1 | 1452 return fArray.count(); // slot is always index+1 |
| 1454 } | 1453 } |
| 1455 | 1454 |
| OLD | NEW |