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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 fBitmap.unlockPixels(); | 47 fBitmap.unlockPixels(); |
48 } | 48 } |
49 | 49 |
50 bool SkROLockPixelsPixelRef::onLockPixelsAreWritable() const { | 50 bool SkROLockPixelsPixelRef::onLockPixelsAreWritable() const { |
51 return false; | 51 return false; |
52 } | 52 } |
53 | 53 |
54 /////////////////////////////////////////////////////////////////////////////// | 54 /////////////////////////////////////////////////////////////////////////////// |
55 | 55 |
56 static SkGrPixelRef* copy_to_new_texture_pixelref(GrTexture* texture, SkColorTyp
e dstCT, | 56 static SkGrPixelRef* copy_to_new_texture_pixelref(GrTexture* texture, SkColorTyp
e dstCT, |
57 const SkIRect* subset) { | 57 const SkIRect* subset) { |
58 if (NULL == texture || kUnknown_SkColorType == dstCT) { | 58 if (NULL == texture || kUnknown_SkColorType == dstCT) { |
59 return NULL; | 59 return NULL; |
60 } | 60 } |
61 GrContext* context = texture->getContext(); | 61 GrContext* context = texture->getContext(); |
62 if (NULL == context) { | 62 if (NULL == context) { |
63 return NULL; | 63 return NULL; |
64 } | 64 } |
65 GrTextureDesc desc; | 65 GrTextureDesc desc; |
66 | 66 |
67 SkIPoint pointStorage; | 67 SkIPoint pointStorage; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 cachedBitmap.setImmutable(); | 199 cachedBitmap.setImmutable(); |
200 //Add to the cache | 200 //Add to the cache |
201 SkBitmapCache::Add(this->getGenerationID(), bounds, cachedBitmap); | 201 SkBitmapCache::Add(this->getGenerationID(), bounds, cachedBitmap); |
202 | 202 |
203 dst->swap(cachedBitmap); | 203 dst->swap(cachedBitmap); |
204 } | 204 } |
205 | 205 |
206 return true; | 206 return true; |
207 | 207 |
208 } | 208 } |
OLD | NEW |