| 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 "SkPixelRef.h" | 8 #include "SkPixelRef.h" |
| 9 #include "SkFlattenableBuffers.h" | 9 #include "SkFlattenableBuffers.h" |
| 10 #include "SkThread.h" | 10 #include "SkThread.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 } | 160 } |
| 161 | 161 |
| 162 bool SkPixelRef::lockPixelsAreWritable() const { | 162 bool SkPixelRef::lockPixelsAreWritable() const { |
| 163 return this->onLockPixelsAreWritable(); | 163 return this->onLockPixelsAreWritable(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 bool SkPixelRef::onLockPixelsAreWritable() const { | 166 bool SkPixelRef::onLockPixelsAreWritable() const { |
| 167 return true; | 167 return true; |
| 168 } | 168 } |
| 169 | 169 |
| 170 bool SkPixelRef::onImplementsDecodeInto() { |
| 171 return false; |
| 172 } |
| 173 |
| 174 bool SkPixelRef::onDecodeInto(int pow2, SkBitmap* bitmap) { |
| 175 return false; |
| 176 } |
| 177 |
| 170 uint32_t SkPixelRef::getGenerationID() const { | 178 uint32_t SkPixelRef::getGenerationID() const { |
| 171 if (0 == fGenerationID) { | 179 if (0 == fGenerationID) { |
| 172 fGenerationID = SkNextPixelRefGenerationID(); | 180 fGenerationID = SkNextPixelRefGenerationID(); |
| 173 } | 181 } |
| 174 return fGenerationID; | 182 return fGenerationID; |
| 175 } | 183 } |
| 176 | 184 |
| 177 void SkPixelRef::notifyPixelsChanged() { | 185 void SkPixelRef::notifyPixelsChanged() { |
| 178 #ifdef SK_DEBUG | 186 #ifdef SK_DEBUG |
| 179 if (fIsImmutable) { | 187 if (fIsImmutable) { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 204 | 212 |
| 205 #ifdef SK_BUILD_FOR_ANDROID | 213 #ifdef SK_BUILD_FOR_ANDROID |
| 206 void SkPixelRef::globalRef(void* data) { | 214 void SkPixelRef::globalRef(void* data) { |
| 207 this->ref(); | 215 this->ref(); |
| 208 } | 216 } |
| 209 | 217 |
| 210 void SkPixelRef::globalUnref() { | 218 void SkPixelRef::globalUnref() { |
| 211 this->unref(); | 219 this->unref(); |
| 212 } | 220 } |
| 213 #endif | 221 #endif |
| OLD | NEW |