| 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 | 8 |
| 9 | 9 |
| 10 #include "SkBitmapHeap.h" | 10 #include "SkBitmapHeap.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 SkFlattenable* getFlat(unsigned index) const { | 101 SkFlattenable* getFlat(unsigned index) const { |
| 102 if (0 == index) { | 102 if (0 == index) { |
| 103 return NULL; | 103 return NULL; |
| 104 } | 104 } |
| 105 return fFlatArray[index - 1]; | 105 return fFlatArray[index - 1]; |
| 106 } | 106 } |
| 107 | 107 |
| 108 void defFlattenable(PaintFlats pf, int index) { | 108 void defFlattenable(PaintFlats pf, int index) { |
| 109 index--; | 109 index--; |
| 110 SkFlattenable* obj = fReader->readFlattenable(); | 110 SkFlattenable* obj = fReader->readFlattenable(kUnknown_SkEffectType); |
| 111 if (fFlatArray.count() == index) { | 111 if (fFlatArray.count() == index) { |
| 112 *fFlatArray.append() = obj; | 112 *fFlatArray.append() = obj; |
| 113 } else { | 113 } else { |
| 114 SkSafeUnref(fFlatArray[index]); | 114 SkSafeUnref(fFlatArray[index]); |
| 115 fFlatArray[index] = obj; | 115 fFlatArray[index] = obj; |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 | 118 |
| 119 void defFactory(const char* name) { | 119 void defFactory(const char* name) { |
| 120 SkFlattenable::Factory factory = SkFlattenable::NameToFactory(name); | 120 SkFlattenable::Factory factory = SkFlattenable::NameToFactory(name); |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 status = kReadAtom_Status; | 853 status = kReadAtom_Status; |
| 854 break; | 854 break; |
| 855 } | 855 } |
| 856 } | 856 } |
| 857 | 857 |
| 858 if (bytesRead) { | 858 if (bytesRead) { |
| 859 *bytesRead = reader.offset(); | 859 *bytesRead = reader.offset(); |
| 860 } | 860 } |
| 861 return status; | 861 return status; |
| 862 } | 862 } |
| OLD | NEW |