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

Side by Side Diff: src/core/SkFlattenableBuffers.cpp

Issue 61913002: Adding error checks to SkRBuffer (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Added doc 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 | « src/core/SkBuffer.cpp ('k') | src/core/SkPath.cpp » ('j') | 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 2012 Google Inc. 3 * Copyright 2012 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 #include "SkFlattenableBuffers.h" 8 #include "SkFlattenableBuffers.h"
9 #include "SkPaint.h" 9 #include "SkPaint.h"
10 #include "SkTypeface.h" 10 #include "SkTypeface.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 SkUnitMapper* SkFlattenableReadBuffer::readUnitMapper() { 84 SkUnitMapper* SkFlattenableReadBuffer::readUnitMapper() {
85 return this->readFlattenableT<SkUnitMapper>(); 85 return this->readFlattenableT<SkUnitMapper>();
86 } 86 }
87 87
88 SkXfermode* SkFlattenableReadBuffer::readXfermode() { 88 SkXfermode* SkFlattenableReadBuffer::readXfermode() {
89 return this->readFlattenableT<SkXfermode>(); 89 return this->readFlattenableT<SkXfermode>();
90 } 90 }
91 91
92 bool SkFlattenableReadBuffer::validate(bool isValid) {
93 return true;
94 }
95
92 /////////////////////////////////////////////////////////////////////////////// 96 ///////////////////////////////////////////////////////////////////////////////
93 97
94 SkFlattenableWriteBuffer::SkFlattenableWriteBuffer() { 98 SkFlattenableWriteBuffer::SkFlattenableWriteBuffer() {
95 fFlags = (Flags)0; 99 fFlags = (Flags)0;
96 } 100 }
97 101
98 SkFlattenableWriteBuffer::~SkFlattenableWriteBuffer() { } 102 SkFlattenableWriteBuffer::~SkFlattenableWriteBuffer() { }
99 103
100 void SkFlattenableWriteBuffer::writeFunctionPtr(void* ptr) { 104 void SkFlattenableWriteBuffer::writeFunctionPtr(void* ptr) {
101 void* ptrStorage[] = { ptr }; 105 void* ptrStorage[] = { ptr };
102 this->writeByteArray(ptrStorage, sizeof(void*)); 106 this->writeByteArray(ptrStorage, sizeof(void*));
103 } 107 }
104 108
105 void SkFlattenableWriteBuffer::writePaint(const SkPaint& paint) { 109 void SkFlattenableWriteBuffer::writePaint(const SkPaint& paint) {
106 paint.flatten(*this); 110 paint.flatten(*this);
107 } 111 }
108 112
109 void SkFlattenableWriteBuffer::flattenObject(const SkFlattenable* obj, 113 void SkFlattenableWriteBuffer::flattenObject(const SkFlattenable* obj,
110 SkFlattenableWriteBuffer& buffer) { 114 SkFlattenableWriteBuffer& buffer) {
111 obj->flatten(buffer); 115 obj->flatten(buffer);
112 } 116 }
OLDNEW
« no previous file with comments | « src/core/SkBuffer.cpp ('k') | src/core/SkPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698