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

Side by Side Diff: src/core/SkBitmap.cpp

Issue 26702002: force readbuffer clients to use specialized readFoo for flattenables (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 int rowBytes = buffer.readInt(); 1608 int rowBytes = buffer.readInt();
1609 int config = buffer.readInt(); 1609 int config = buffer.readInt();
1610 1610
1611 this->setConfig((Config)config, width, height, rowBytes); 1611 this->setConfig((Config)config, width, height, rowBytes);
1612 this->setIsOpaque(buffer.readBool()); 1612 this->setIsOpaque(buffer.readBool());
1613 1613
1614 int reftype = buffer.readInt(); 1614 int reftype = buffer.readInt();
1615 switch (reftype) { 1615 switch (reftype) {
1616 case SERIALIZE_PIXELTYPE_REF_DATA: { 1616 case SERIALIZE_PIXELTYPE_REF_DATA: {
1617 size_t offset = buffer.readUInt(); 1617 size_t offset = buffer.readUInt();
1618 SkPixelRef* pr = buffer.readFlattenableT<SkPixelRef>(); 1618 SkPixelRef* pr = buffer.readPixelRef();
1619 SkSafeUnref(this->setPixelRef(pr, offset)); 1619 SkSafeUnref(this->setPixelRef(pr, offset));
1620 break; 1620 break;
1621 } 1621 }
1622 case SERIALIZE_PIXELTYPE_NONE: 1622 case SERIALIZE_PIXELTYPE_NONE:
1623 break; 1623 break;
1624 default: 1624 default:
1625 SkDEBUGFAIL("unrecognized pixeltype in serialized data"); 1625 SkDEBUGFAIL("unrecognized pixeltype in serialized data");
1626 sk_throw(); 1626 sk_throw();
1627 } 1627 }
1628 } 1628 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 if (NULL != uri) { 1699 if (NULL != uri) {
1700 str->appendf(" uri:\"%s\"", uri); 1700 str->appendf(" uri:\"%s\"", uri);
1701 } else { 1701 } else {
1702 str->appendf(" pixelref:%p", pr); 1702 str->appendf(" pixelref:%p", pr);
1703 } 1703 }
1704 } 1704 }
1705 1705
1706 str->append(")"); 1706 str->append(")");
1707 } 1707 }
1708 #endif 1708 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698