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

Unified Diff: src/utils/ios/SkStream_NSData.mm

Issue 1197963003: Remove old iOS porting files. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « src/utils/ios/SkOSFile_iOS.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/ios/SkStream_NSData.mm
diff --git a/src/utils/ios/SkStream_NSData.mm b/src/utils/ios/SkStream_NSData.mm
deleted file mode 100755
index ef20f63e132604432f69facb628b3caad4aab53e..0000000000000000000000000000000000000000
--- a/src/utils/ios/SkStream_NSData.mm
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "SkStream_NSData.h"
-
-NSData* NSData_dataWithStream(SkStream* stream) {
- size_t length = stream->getLength();
- void* src = malloc(length);
- size_t bytes = stream->read(src, length);
- SkASSERT(bytes == length);
- return [NSData dataWithBytesNoCopy:src length:length freeWhenDone:YES];
-}
-
-NSData* NSData_dataFromResource(const char cname[], const char csuffix[]) {
- NSBundle* bundle = [NSBundle mainBundle];
- NSString* name = [NSString stringWithUTF8String:cname];
- NSString* suffix = [NSString stringWithUTF8String:csuffix];
- NSString* path = [bundle pathForResource:name ofType:suffix];
- return [NSData dataWithContentsOfMappedFile:path];
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-SkStream_NSData::SkStream_NSData(NSData* data) {
- fNSData = data;
- [fNSData retain];
-
- this->setMemory([fNSData bytes], [fNSData length], false);
-}
-
-SkStream_NSData::~SkStream_NSData() {
- [fNSData release];
-}
-
-SkStream_NSData* SkStream_NSData::CreateFromResource(const char name[],
- const char suffix[]) {
- NSData* data = NSData_dataFromResource(name, suffix);
- return SkNEW_ARGS(SkStream_NSData, (data));
-}
-
« no previous file with comments | « src/utils/ios/SkOSFile_iOS.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698