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 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1603 int rowBytes = buffer.readInt(); | 1603 int rowBytes = buffer.readInt(); |
1604 int config = buffer.readInt(); | 1604 int config = buffer.readInt(); |
1605 | 1605 |
1606 this->setConfig((Config)config, width, height, rowBytes); | 1606 this->setConfig((Config)config, width, height, rowBytes); |
1607 this->setIsOpaque(buffer.readBool()); | 1607 this->setIsOpaque(buffer.readBool()); |
1608 | 1608 |
1609 int reftype = buffer.readInt(); | 1609 int reftype = buffer.readInt(); |
1610 switch (reftype) { | 1610 switch (reftype) { |
1611 case SERIALIZE_PIXELTYPE_REF_DATA: { | 1611 case SERIALIZE_PIXELTYPE_REF_DATA: { |
1612 size_t offset = buffer.readUInt(); | 1612 size_t offset = buffer.readUInt(); |
1613 SkPixelRef* pr = buffer.readFlattenableT<SkPixelRef>(); | 1613 SkPixelRef* pr = buffer.readPixelRef(); |
1614 SkSafeUnref(this->setPixelRef(pr, offset)); | 1614 SkSafeUnref(this->setPixelRef(pr, offset)); |
1615 break; | 1615 break; |
1616 } | 1616 } |
1617 case SERIALIZE_PIXELTYPE_NONE: | 1617 case SERIALIZE_PIXELTYPE_NONE: |
1618 break; | 1618 break; |
1619 default: | 1619 default: |
1620 SkDEBUGFAIL("unrecognized pixeltype in serialized data"); | 1620 SkDEBUGFAIL("unrecognized pixeltype in serialized data"); |
1621 sk_throw(); | 1621 sk_throw(); |
1622 } | 1622 } |
1623 } | 1623 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1693 if (NULL != uri) { | 1693 if (NULL != uri) { |
1694 str->appendf(" uri:\"%s\"", uri); | 1694 str->appendf(" uri:\"%s\"", uri); |
1695 } else { | 1695 } else { |
1696 str->appendf(" pixelref:%p", pr); | 1696 str->appendf(" pixelref:%p", pr); |
1697 } | 1697 } |
1698 } | 1698 } |
1699 | 1699 |
1700 str->append(")"); | 1700 str->append(")"); |
1701 } | 1701 } |
1702 #endif | 1702 #endif |
OLD | NEW |