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

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

Issue 463493002: SkCanvas::drawPatch param SkPoint[12] (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Removed GPU headers from GM Created 6 years, 4 months 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
« no previous file with comments | « src/core/SkPictureRecord.cpp ('k') | src/core/SkRecordDraw.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 8
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkErrorInternals.h" 10 #include "SkErrorInternals.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 void SkReadBuffer::readRect(SkRect* rect) { 143 void SkReadBuffer::readRect(SkRect* rect) {
144 memcpy(rect, fReader.skip(sizeof(SkRect)), sizeof(SkRect)); 144 memcpy(rect, fReader.skip(sizeof(SkRect)), sizeof(SkRect));
145 } 145 }
146 146
147 void SkReadBuffer::readRegion(SkRegion* region) { 147 void SkReadBuffer::readRegion(SkRegion* region) {
148 fReader.readRegion(region); 148 fReader.readRegion(region);
149 } 149 }
150 150
151 void SkReadBuffer::readPatch(SkPatch* patch) {
152 fReader.readPatch(patch);
153 }
154
155 void SkReadBuffer::readPath(SkPath* path) { 151 void SkReadBuffer::readPath(SkPath* path) {
156 fReader.readPath(path); 152 fReader.readPath(path);
157 } 153 }
158 154
159 bool SkReadBuffer::readArray(void* value, size_t size, size_t elementSize) { 155 bool SkReadBuffer::readArray(void* value, size_t size, size_t elementSize) {
160 const size_t count = this->getArrayCount(); 156 const size_t count = this->getArrayCount();
161 if (count == size) { 157 if (count == size) {
162 (void)fReader.skip(sizeof(uint32_t)); // Skip array count 158 (void)fReader.skip(sizeof(uint32_t)); // Skip array count
163 const size_t byteLength = count * elementSize; 159 const size_t byteLength = count * elementSize;
164 memcpy(value, fReader.skip(SkAlign4(byteLength)), byteLength); 160 memcpy(value, fReader.skip(SkAlign4(byteLength)), byteLength);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 return; 355 return;
360 } 356 }
361 } else { 357 } else {
362 if (NULL == this->readFunctionPtr()) { 358 if (NULL == this->readFunctionPtr()) {
363 return; 359 return;
364 } 360 }
365 } 361 }
366 uint32_t sizeRecorded = fReader.readU32(); 362 uint32_t sizeRecorded = fReader.readU32();
367 fReader.skip(sizeRecorded); 363 fReader.skip(sizeRecorded);
368 } 364 }
OLDNEW
« no previous file with comments | « src/core/SkPictureRecord.cpp ('k') | src/core/SkRecordDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698