Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/pipe/SkGPipeWrite.cpp

Issue 48273011: Fix pipe/annotation. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: after Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gm/internal_links.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « gm/internal_links.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698