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

Side by Side Diff: src/lazy/SkCachingPixelRef.cpp

Issue 507483002: retool image cache to be generic cache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 3 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 unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698