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

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
« no previous file with comments | « include/core/SkFlattenableBuffers.h ('k') | src/core/SkBlitter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « include/core/SkFlattenableBuffers.h ('k') | src/core/SkBlitter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698