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" | |
11 #include "SkBitmapHeap.h" | 10 #include "SkBitmapHeap.h" |
12 #include "SkCanvas.h" | 11 #include "SkCanvas.h" |
13 #include "SkColorFilter.h" | 12 #include "SkColorFilter.h" |
14 #include "SkData.h" | 13 #include "SkData.h" |
15 #include "SkDrawLooper.h" | 14 #include "SkDrawLooper.h" |
16 #include "SkGPipe.h" | 15 #include "SkGPipe.h" |
17 #include "SkGPipePriv.h" | 16 #include "SkGPipePriv.h" |
18 #include "SkImageFilter.h" | 17 #include "SkImageFilter.h" |
19 #include "SkMaskFilter.h" | 18 #include "SkMaskFilter.h" |
20 #include "SkWriteBuffer.h" | 19 #include "SkWriteBuffer.h" |
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 int32_t slot = this->find(img); | 1428 int32_t slot = this->find(img); |
1430 if (slot) { | 1429 if (slot) { |
1431 return slot; | 1430 return slot; |
1432 } | 1431 } |
1433 // TODO: SkImage does not expose bytes per pixel, 4 is just a best guess. | 1432 // TODO: SkImage does not expose bytes per pixel, 4 is just a best guess. |
1434 fBytesInCache += img->width() * img->height() * 4; | 1433 fBytesInCache += img->width() * img->height() * 4; |
1435 *fArray.append() = SkRef(img); | 1434 *fArray.append() = SkRef(img); |
1436 return fArray.count(); // slot is always index+1 | 1435 return fArray.count(); // slot is always index+1 |
1437 } | 1436 } |
1438 | 1437 |
OLD | NEW |