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

Side by Side Diff: src/gpu/SkGrPixelRef.cpp

Issue 960563002: only notify bitmaps that have been added to the cache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address reviewer comments Created 5 years, 10 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
« no previous file with comments | « src/core/SkResourceCache.cpp ('k') | src/lazy/SkCachingPixelRef.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 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 10
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 kSkia8888_GrPixelConfig, 182 kSkia8888_GrPixelConfig,
183 buffer, cachedBitmap.rowBytes()); 183 buffer, cachedBitmap.rowBytes());
184 184
185 if (!readPixelsOk) { 185 if (!readPixelsOk) {
186 return false; 186 return false;
187 } 187 }
188 188
189 // If we are here, pixels were read correctly from the surface. 189 // If we are here, pixels were read correctly from the surface.
190 cachedBitmap.setImmutable(); 190 cachedBitmap.setImmutable();
191 //Add to the cache 191 //Add to the cache
192 SkBitmapCache::Add(this->getGenerationID(), bounds, cachedBitmap); 192 SkBitmapCache::Add(this, bounds, cachedBitmap);
193 193
194 dst->swap(cachedBitmap); 194 dst->swap(cachedBitmap);
195 } 195 }
196 196
197 return true; 197 return true;
198 198
199 } 199 }
OLDNEW
« no previous file with comments | « src/core/SkResourceCache.cpp ('k') | src/lazy/SkCachingPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698