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

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

Issue 14437012: Fixes for piping bitmaps with encoded data. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Do not use bitmap storage when adding bitmaps to SkGPipeState. Created 7 years, 8 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 | « samplecode/SampleApp.cpp ('k') | src/pipe/SkGPipeRead.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 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 8
9 #ifndef SkOrderedReadBuffer_DEFINED 9 #ifndef SkOrderedReadBuffer_DEFINED
10 #define SkOrderedReadBuffer_DEFINED 10 #define SkOrderedReadBuffer_DEFINED
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // helpers to get info about arrays and binary data 66 // helpers to get info about arrays and binary data
67 virtual uint32_t getArrayCount() SK_OVERRIDE; 67 virtual uint32_t getArrayCount() SK_OVERRIDE;
68 68
69 virtual void readBitmap(SkBitmap* bitmap) SK_OVERRIDE; 69 virtual void readBitmap(SkBitmap* bitmap) SK_OVERRIDE;
70 virtual SkTypeface* readTypeface() SK_OVERRIDE; 70 virtual SkTypeface* readTypeface() SK_OVERRIDE;
71 71
72 void setBitmapStorage(SkBitmapHeapReader* bitmapStorage) { 72 void setBitmapStorage(SkBitmapHeapReader* bitmapStorage) {
73 SkRefCnt_SafeAssign(fBitmapStorage, bitmapStorage); 73 SkRefCnt_SafeAssign(fBitmapStorage, bitmapStorage);
74 } 74 }
75 75
76 /**
77 * Return a pointer to the bitmap storage. Does not affect its ref count.
78 */
79 SkBitmapHeapReader* getBitmapStorage() {
80 return fBitmapStorage;
81 }
82
76 void setTypefaceArray(SkTypeface* array[], int count) { 83 void setTypefaceArray(SkTypeface* array[], int count) {
77 fTFArray = array; 84 fTFArray = array;
78 fTFCount = count; 85 fTFCount = count;
79 } 86 }
80 87
81 /** 88 /**
82 * Call this with a pre-loaded array of Factories, in the same order as 89 * Call this with a pre-loaded array of Factories, in the same order as
83 * were created/written by the writer. SkPicture uses this. 90 * were created/written by the writer. SkPicture uses this.
84 */ 91 */
85 void setFactoryPlayback(SkFlattenable::Factory array[], int count) { 92 void setFactoryPlayback(SkFlattenable::Factory array[], int count) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 SkTDArray<SkFlattenable::Factory>* fFactoryTDArray; 126 SkTDArray<SkFlattenable::Factory>* fFactoryTDArray;
120 SkFlattenable::Factory* fFactoryArray; 127 SkFlattenable::Factory* fFactoryArray;
121 int fFactoryCount; 128 int fFactoryCount;
122 129
123 SkPicture::InstallPixelRefProc fBitmapDecoder; 130 SkPicture::InstallPixelRefProc fBitmapDecoder;
124 131
125 typedef SkFlattenableReadBuffer INHERITED; 132 typedef SkFlattenableReadBuffer INHERITED;
126 }; 133 };
127 134
128 #endif // SkOrderedReadBuffer_DEFINED 135 #endif // SkOrderedReadBuffer_DEFINED
OLDNEW
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | src/pipe/SkGPipeRead.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698