OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |