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

Side by Side Diff: src/core/SkPictureFlat.h

Issue 21046011: + ,fLastAllocated(NULL) (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 | « no previous file | no next file » | 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 2011 Google Inc. 3 * Copyright 2011 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 #ifndef SkPictureFlat_DEFINED 8 #ifndef SkPictureFlat_DEFINED
9 #define SkPictureFlat_DEFINED 9 #define SkPictureFlat_DEFINED
10 10
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 720
721 template <class T> 721 template <class T>
722 static void SkUnflattenObjectProc(SkOrderedReadBuffer& buffer, void* obj) { 722 static void SkUnflattenObjectProc(SkOrderedReadBuffer& buffer, void* obj) {
723 ((T*)obj)->unflatten(buffer); 723 ((T*)obj)->unflatten(buffer);
724 } 724 }
725 725
726 class SkChunkFlatController : public SkFlatController { 726 class SkChunkFlatController : public SkFlatController {
727 public: 727 public:
728 SkChunkFlatController(size_t minSize) 728 SkChunkFlatController(size_t minSize)
729 : fHeap(minSize) 729 : fHeap(minSize)
730 , fTypefaceSet(SkNEW(SkRefCntSet)) { 730 , fTypefaceSet(SkNEW(SkRefCntSet))
731 , fLastAllocated(NULL) {
731 this->setTypefaceSet(fTypefaceSet); 732 this->setTypefaceSet(fTypefaceSet);
732 this->setTypefacePlayback(&fTypefacePlayback); 733 this->setTypefacePlayback(&fTypefacePlayback);
733 } 734 }
734 735
735 virtual void* allocThrow(size_t bytes) SK_OVERRIDE { 736 virtual void* allocThrow(size_t bytes) SK_OVERRIDE {
736 fLastAllocated = fHeap.allocThrow(bytes); 737 fLastAllocated = fHeap.allocThrow(bytes);
737 return fLastAllocated; 738 return fLastAllocated;
738 } 739 }
739 740
740 virtual void unalloc(void* ptr) SK_OVERRIDE { 741 virtual void unalloc(void* ptr) SK_OVERRIDE {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 static void flattenRegion(SkOrderedWriteBuffer& buffer, const void* obj) { 798 static void flattenRegion(SkOrderedWriteBuffer& buffer, const void* obj) {
798 buffer.getWriter32()->writeRegion(*(SkRegion*)obj); 799 buffer.getWriter32()->writeRegion(*(SkRegion*)obj);
799 } 800 }
800 801
801 static void unflattenRegion(SkOrderedReadBuffer& buffer, void* obj) { 802 static void unflattenRegion(SkOrderedReadBuffer& buffer, void* obj) {
802 buffer.getReader32()->readRegion((SkRegion*)obj); 803 buffer.getReader32()->readRegion((SkRegion*)obj);
803 } 804 }
804 }; 805 };
805 806
806 #endif 807 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698