Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11769 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
e209a70d1e
commit
fbc58a3055
@ -98,7 +98,7 @@ public:
|
||||
this->readPoint(&point);
|
||||
return point;
|
||||
}
|
||||
|
||||
|
||||
SkData* readByteArrayAsData() {
|
||||
size_t len = this->getArrayCount();
|
||||
void* buffer = sk_malloc_throw(len);
|
||||
|
@ -120,7 +120,7 @@ void SkRTConf<T>::print(SkWStream *o) const {
|
||||
sprintf(outline, "%-30.30s", getName());
|
||||
outptr = &(outline[30]);
|
||||
}
|
||||
|
||||
|
||||
doPrint(outptr);
|
||||
sprintf(outptr+30, " %.128s", fDescription.c_str());
|
||||
for (size_t i = strlen(outline); i --> 0 && ' ' == outline[i];) {
|
||||
|
@ -155,4 +155,3 @@ SkData* SkData::NewWithCString(const char cstr[]) {
|
||||
}
|
||||
return NewWithCopy(cstr, size);
|
||||
}
|
||||
|
||||
|
@ -2186,7 +2186,7 @@ void SkPaint::unflatten(SkFlattenableReadBuffer& buffer) {
|
||||
SkSafeUnref(this->setRasterizer(buffer.readFlattenableT<SkRasterizer>()));
|
||||
SkSafeUnref(this->setLooper(buffer.readFlattenableT<SkDrawLooper>()));
|
||||
SkSafeUnref(this->setImageFilter(buffer.readFlattenableT<SkImageFilter>()));
|
||||
|
||||
|
||||
if (buffer.readBool()) {
|
||||
this->setAnnotation(SkNEW_ARGS(SkAnnotation, (buffer)))->unref();
|
||||
}
|
||||
|
@ -673,7 +673,7 @@ static void typeface_rp(SkCanvas*, SkReader32* reader, uint32_t,
|
||||
static void annotation_rp(SkCanvas*, SkReader32* reader, uint32_t op32,
|
||||
SkGPipeState* state) {
|
||||
SkPaint* p = state->editPaint();
|
||||
|
||||
|
||||
if (SkToBool(PaintOp_unpackData(op32))) {
|
||||
const size_t size = reader->readU32();
|
||||
SkAutoMalloc storage(size);
|
||||
|
@ -1125,7 +1125,7 @@ void SkGPipeCanvas::writePaint(const SkPaint& paint) {
|
||||
|
||||
//
|
||||
// Do these after we've written kPaintOp_DrawOp
|
||||
|
||||
|
||||
if (base.getAnnotation() != paint.getAnnotation()) {
|
||||
if (NULL == paint.getAnnotation()) {
|
||||
this->writeOp(kSetAnnotation_DrawOp, 0, 0);
|
||||
@ -1133,10 +1133,10 @@ void SkGPipeCanvas::writePaint(const SkPaint& paint) {
|
||||
SkOrderedWriteBuffer buffer(1024);
|
||||
paint.getAnnotation()->writeToBuffer(buffer);
|
||||
size = buffer.bytesWritten();
|
||||
|
||||
|
||||
SkAutoMalloc storage(size);
|
||||
buffer.writeToMemory(storage.get());
|
||||
|
||||
|
||||
this->writeOp(kSetAnnotation_DrawOp, 0, 1);
|
||||
fWriter.write32(size);
|
||||
fWriter.write(storage.get(), size);
|
||||
|
Loading…
Reference in New Issue
Block a user