| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2008 The Android Open Source Project | 3 * Copyright 2008 The Android Open Source Project |
| 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 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 return (fPixelRef) ? fPixelRef->getGenerationID() : 0; | 419 return (fPixelRef) ? fPixelRef->getGenerationID() : 0; |
| 420 } | 420 } |
| 421 | 421 |
| 422 void SkBitmap::notifyPixelsChanged() const { | 422 void SkBitmap::notifyPixelsChanged() const { |
| 423 SkASSERT(!this->isImmutable()); | 423 SkASSERT(!this->isImmutable()); |
| 424 if (fPixelRef) { | 424 if (fPixelRef) { |
| 425 fPixelRef->notifyPixelsChanged(); | 425 fPixelRef->notifyPixelsChanged(); |
| 426 } | 426 } |
| 427 } | 427 } |
| 428 | 428 |
| 429 SkGpuTexture* SkBitmap::getTexture() const { | 429 GrTexture* SkBitmap::getTexture() const { |
| 430 return fPixelRef ? fPixelRef->getTexture() : NULL; | 430 return fPixelRef ? fPixelRef->getTexture() : NULL; |
| 431 } | 431 } |
| 432 | 432 |
| 433 /////////////////////////////////////////////////////////////////////////////// | 433 /////////////////////////////////////////////////////////////////////////////// |
| 434 | 434 |
| 435 /** We explicitly use the same allocator for our pixels that SkMask does, | 435 /** We explicitly use the same allocator for our pixels that SkMask does, |
| 436 so that we can freely assign memory allocated by one class to the other. | 436 so that we can freely assign memory allocated by one class to the other. |
| 437 */ | 437 */ |
| 438 bool SkBitmap::HeapAllocator::allocPixelRef(SkBitmap* dst, | 438 bool SkBitmap::HeapAllocator::allocPixelRef(SkBitmap* dst, |
| 439 SkColorTable* ctable) { | 439 SkColorTable* ctable) { |
| (...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1679 if (NULL != uri) { | 1679 if (NULL != uri) { |
| 1680 str->appendf(" uri:\"%s\"", uri); | 1680 str->appendf(" uri:\"%s\"", uri); |
| 1681 } else { | 1681 } else { |
| 1682 str->appendf(" pixelref:%p", pr); | 1682 str->appendf(" pixelref:%p", pr); |
| 1683 } | 1683 } |
| 1684 } | 1684 } |
| 1685 | 1685 |
| 1686 str->append(")"); | 1686 str->append(")"); |
| 1687 } | 1687 } |
| 1688 #endif | 1688 #endif |
| OLD | NEW |