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

Side by Side Diff: include/core/SkWriter32.h

Issue 23757008: Revert "Create a semi-stable API for capturing the state of an SkCanvas and reconstructing that sta… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « gyp/utils.gyp ('k') | include/utils/SkCanvasStateUtils.h » ('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 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
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 9
10 #ifndef SkWriter32_DEFINED 10 #ifndef SkWriter32_DEFINED
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 void writePoint(const SkPoint& pt) { 109 void writePoint(const SkPoint& pt) {
110 *(SkPoint*)this->reserve(sizeof(pt)) = pt; 110 *(SkPoint*)this->reserve(sizeof(pt)) = pt;
111 } 111 }
112 112
113 void writeRect(const SkRect& rect) { 113 void writeRect(const SkRect& rect) {
114 *(SkRect*)this->reserve(sizeof(rect)) = rect; 114 *(SkRect*)this->reserve(sizeof(rect)) = rect;
115 } 115 }
116 116
117 void writeIRect(const SkIRect& rect) {
118 *(SkIRect*)this->reserve(sizeof(rect)) = rect;
119 }
120
121 void writeRRect(const SkRRect& rrect) { 117 void writeRRect(const SkRRect& rrect) {
122 rrect.writeToMemory(this->reserve(SkRRect::kSizeInMemory)); 118 rrect.writeToMemory(this->reserve(SkRRect::kSizeInMemory));
123 } 119 }
124 120
125 void writePath(const SkPath& path) { 121 void writePath(const SkPath& path) {
126 size_t size = path.writeToMemory(NULL); 122 size_t size = path.writeToMemory(NULL);
127 SkASSERT(SkAlign4(size) == size); 123 SkASSERT(SkAlign4(size) == size);
128 path.writeToMemory(this->reserve(size)); 124 path.writeToMemory(this->reserve(size));
129 } 125 }
130 126
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 292
297 private: 293 private:
298 union { 294 union {
299 void* fPtrAlignment; 295 void* fPtrAlignment;
300 double fDoubleAlignment; 296 double fDoubleAlignment;
301 char fStorage[SIZE]; 297 char fStorage[SIZE];
302 } fData; 298 } fData;
303 }; 299 };
304 300
305 #endif 301 #endif
OLDNEW
« no previous file with comments | « gyp/utils.gyp ('k') | include/utils/SkCanvasStateUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698