| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 "SkImageRef_ashmem.h" | 8 #include "SkImageRef_ashmem.h" |
| 9 #include "SkImageDecoder.h" | 9 #include "SkImageDecoder.h" |
| 10 #include "SkFlattenableBuffers.h" | 10 #include "SkFlattenableBuffers.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 buffer.writeString(getURI()); | 216 buffer.writeString(getURI()); |
| 217 } | 217 } |
| 218 | 218 |
| 219 SkImageRef_ashmem::SkImageRef_ashmem(SkFlattenableReadBuffer& buffer) | 219 SkImageRef_ashmem::SkImageRef_ashmem(SkFlattenableReadBuffer& buffer) |
| 220 : INHERITED(buffer) { | 220 : INHERITED(buffer) { |
| 221 fRec.fFD = -1; | 221 fRec.fFD = -1; |
| 222 fRec.fAddr = NULL; | 222 fRec.fAddr = NULL; |
| 223 fRec.fSize = 0; | 223 fRec.fSize = 0; |
| 224 fRec.fPinned = false; | 224 fRec.fPinned = false; |
| 225 fCT = NULL; | 225 fCT = NULL; |
| 226 char* uri = buffer.readString(); | 226 |
| 227 if (uri) { | 227 SkString uri; |
| 228 setURI(uri); | 228 buffer.readString(&uri); |
| 229 sk_free(uri); | 229 this->setURI(uri); |
| 230 } | |
| 231 } | 230 } |
| OLD | NEW |