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 "SkBitmapHeap.h" | 10 #include "SkBitmapHeap.h" |
10 #include "SkCanvas.h" | 11 #include "SkCanvas.h" |
11 #include "SkColorFilter.h" | 12 #include "SkColorFilter.h" |
12 #include "SkData.h" | 13 #include "SkData.h" |
13 #include "SkDrawLooper.h" | 14 #include "SkDrawLooper.h" |
14 #include "SkDevice.h" | 15 #include "SkDevice.h" |
15 #include "SkGPipe.h" | 16 #include "SkGPipe.h" |
16 #include "SkGPipePriv.h" | 17 #include "SkGPipePriv.h" |
17 #include "SkImageFilter.h" | 18 #include "SkImageFilter.h" |
18 #include "SkMaskFilter.h" | 19 #include "SkMaskFilter.h" |
(...skipping 21 matching lines...) Expand all Loading... |
40 SkASSERT(paintFlat < kCount_PaintFlats); | 41 SkASSERT(paintFlat < kCount_PaintFlats); |
41 switch (paintFlat) { | 42 switch (paintFlat) { |
42 case kColorFilter_PaintFlat: return paint.getColorFilter(); | 43 case kColorFilter_PaintFlat: return paint.getColorFilter(); |
43 case kDrawLooper_PaintFlat: return paint.getLooper(); | 44 case kDrawLooper_PaintFlat: return paint.getLooper(); |
44 case kMaskFilter_PaintFlat: return paint.getMaskFilter(); | 45 case kMaskFilter_PaintFlat: return paint.getMaskFilter(); |
45 case kPathEffect_PaintFlat: return paint.getPathEffect(); | 46 case kPathEffect_PaintFlat: return paint.getPathEffect(); |
46 case kRasterizer_PaintFlat: return paint.getRasterizer(); | 47 case kRasterizer_PaintFlat: return paint.getRasterizer(); |
47 case kShader_PaintFlat: return paint.getShader(); | 48 case kShader_PaintFlat: return paint.getShader(); |
48 case kImageFilter_PaintFlat: return paint.getImageFilter(); | 49 case kImageFilter_PaintFlat: return paint.getImageFilter(); |
49 case kXfermode_PaintFlat: return paint.getXfermode(); | 50 case kXfermode_PaintFlat: return paint.getXfermode(); |
| 51 case kAnnotation_PaintFlat: return paint.getAnnotation(); |
50 } | 52 } |
51 SkDEBUGFAIL("never gets here"); | 53 SkDEBUGFAIL("never gets here"); |
52 return NULL; | 54 return NULL; |
53 } | 55 } |
54 | 56 |
55 static size_t writeTypeface(SkWriter32* writer, SkTypeface* typeface) { | 57 static size_t writeTypeface(SkWriter32* writer, SkTypeface* typeface) { |
56 SkASSERT(typeface); | 58 SkASSERT(typeface); |
57 SkDynamicMemoryWStream stream; | 59 SkDynamicMemoryWStream stream; |
58 typeface->serialize(&stream); | 60 typeface->serialize(&stream); |
59 size_t size = stream.getOffset(); | 61 size_t size = stream.getOffset(); |
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 fCanvas->ref(); | 1171 fCanvas->ref(); |
1170 } | 1172 } |
1171 | 1173 |
1172 BitmapShuttle::~BitmapShuttle() { | 1174 BitmapShuttle::~BitmapShuttle() { |
1173 fCanvas->unref(); | 1175 fCanvas->unref(); |
1174 } | 1176 } |
1175 | 1177 |
1176 bool BitmapShuttle::insert(const SkBitmap& bitmap, int32_t slot) { | 1178 bool BitmapShuttle::insert(const SkBitmap& bitmap, int32_t slot) { |
1177 return fCanvas->shuttleBitmap(bitmap, slot); | 1179 return fCanvas->shuttleBitmap(bitmap, slot); |
1178 } | 1180 } |
OLD | NEW |