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

Unified Diff: skia/picture/SkPathHeap.cpp

Issue 113827: Remove the remainder of the skia source code from the Chromium repo.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « skia/picture/SkPathHeap.h ('k') | skia/picture/SkPicture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/picture/SkPathHeap.cpp
===================================================================
--- skia/picture/SkPathHeap.cpp (revision 16859)
+++ skia/picture/SkPathHeap.cpp (working copy)
@@ -1,55 +0,0 @@
-#include "SkPathHeap.h"
-#include "SkPath.h"
-#include "SkStream.h"
-#include "SkFlattenable.h"
-#include <new>
-
-#define kPathCount 64
-
-SkPathHeap::SkPathHeap() : fHeap(kPathCount * sizeof(SkPath)) {
-}
-
-SkPathHeap::SkPathHeap(SkFlattenableReadBuffer& buffer)
- : fHeap(kPathCount * sizeof(SkPath)) {
- int count = buffer.readS32();
-
- fPaths.setCount(count);
- SkPath** ptr = fPaths.begin();
- SkPath* p = (SkPath*)fHeap.allocThrow(count * sizeof(SkPath));
-
- for (int i = 0; i < count; i++) {
- new (p) SkPath;
- p->unflatten(buffer);
- *ptr++ = p; // record the pointer
- p++; // move to the next storage location
- }
-}
-
-SkPathHeap::~SkPathHeap() {
- SkPath** iter = fPaths.begin();
- SkPath** stop = fPaths.end();
- while (iter < stop) {
- (*iter)->~SkPath();
- iter++;
- }
-}
-
-int SkPathHeap::append(const SkPath& path) {
- SkPath* p = (SkPath*)fHeap.allocThrow(sizeof(SkPath));
- new (p) SkPath(path);
- *fPaths.append() = p;
- return fPaths.count();
-}
-
-void SkPathHeap::flatten(SkFlattenableWriteBuffer& buffer) const {
- int count = fPaths.count();
-
- buffer.write32(count);
- SkPath** iter = fPaths.begin();
- SkPath** stop = fPaths.end();
- while (iter < stop) {
- (*iter)->flatten(buffer);
- iter++;
- }
-}
-
« no previous file with comments | « skia/picture/SkPathHeap.h ('k') | skia/picture/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698