| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkCachingPixelRef.h" | 8 #include "SkCachingPixelRef.h" |
| 9 #include "SkBitmapCache.h" | 9 #include "SkBitmapCache.h" |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // reference to the concrete PixelRef while this record is | 81 // reference to the concrete PixelRef while this record is |
| 82 // locked. | 82 // locked. |
| 83 rec->fPixels = pixels; | 83 rec->fPixels = pixels; |
| 84 rec->fColorTable = NULL; | 84 rec->fColorTable = NULL; |
| 85 rec->fRowBytes = bitmap.rowBytes(); | 85 rec->fRowBytes = bitmap.rowBytes(); |
| 86 return true; | 86 return true; |
| 87 } | 87 } |
| 88 | 88 |
| 89 void SkCachingPixelRef::onUnlockPixels() { | 89 void SkCachingPixelRef::onUnlockPixels() { |
| 90 SkASSERT(fScaledCacheId != NULL); | 90 SkASSERT(fScaledCacheId != NULL); |
| 91 SkScaledImageCache::Unlock( static_cast<SkScaledImageCache::ID*>(fScaledCach
eId)); | 91 SkScaledImageCache::Unlock(fScaledCacheId); |
| 92 fScaledCacheId = NULL; | 92 fScaledCacheId = NULL; |
| 93 } | 93 } |
| OLD | NEW |