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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 paint.getAnnotation()->writeToBuffer(buffer); | 1134 paint.getAnnotation()->writeToBuffer(buffer); |
1135 size = buffer.bytesWritten(); | 1135 size = buffer.bytesWritten(); |
1136 | 1136 |
1137 SkAutoMalloc storage(size); | 1137 SkAutoMalloc storage(size); |
1138 buffer.writeToMemory(storage.get()); | 1138 buffer.writeToMemory(storage.get()); |
1139 | 1139 |
1140 this->writeOp(kSetAnnotation_DrawOp, 0, 1); | 1140 this->writeOp(kSetAnnotation_DrawOp, 0, 1); |
1141 fWriter.write32(size); | 1141 fWriter.write32(size); |
1142 fWriter.write(storage.get(), size); | 1142 fWriter.write(storage.get(), size); |
1143 } | 1143 } |
| 1144 base.setAnnotation(paint.getAnnotation()); |
1144 } | 1145 } |
1145 } | 1146 } |
1146 | 1147 |
1147 /////////////////////////////////////////////////////////////////////////////// | 1148 /////////////////////////////////////////////////////////////////////////////// |
1148 | 1149 |
1149 #include "SkGPipe.h" | 1150 #include "SkGPipe.h" |
1150 | 1151 |
1151 SkGPipeController::~SkGPipeController() { | 1152 SkGPipeController::~SkGPipeController() { |
1152 SkSafeUnref(fCanvas); | 1153 SkSafeUnref(fCanvas); |
1153 } | 1154 } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 fCanvas->ref(); | 1211 fCanvas->ref(); |
1211 } | 1212 } |
1212 | 1213 |
1213 BitmapShuttle::~BitmapShuttle() { | 1214 BitmapShuttle::~BitmapShuttle() { |
1214 fCanvas->unref(); | 1215 fCanvas->unref(); |
1215 } | 1216 } |
1216 | 1217 |
1217 bool BitmapShuttle::insert(const SkBitmap& bitmap, int32_t slot) { | 1218 bool BitmapShuttle::insert(const SkBitmap& bitmap, int32_t slot) { |
1218 return fCanvas->shuttleBitmap(bitmap, slot); | 1219 return fCanvas->shuttleBitmap(bitmap, slot); |
1219 } | 1220 } |
OLD | NEW |